moveit2
The MoveIt Motion Planning Framework for ROS 2.
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
planning_scene_monitor::LockedPlanningSceneRO Class Reference

This is a convenience class for obtaining access to an instance of a locked PlanningScene. More...

#include <planning_scene_monitor.h>

Inheritance diagram for planning_scene_monitor::LockedPlanningSceneRO:
Inheritance graph
[legend]

Classes

struct  SingleUnlock
 

Public Member Functions

 LockedPlanningSceneRO (const PlanningSceneMonitorPtr &planning_scene_monitor)
 
const PlanningSceneMonitorPtr & getPlanningSceneMonitor ()
 
 operator bool () const
 
 operator const planning_scene::PlanningSceneConstPtr & () const
 
const planning_scene::PlanningSceneConstPtr & operator-> () const
 

Protected Member Functions

 LockedPlanningSceneRO (const PlanningSceneMonitorPtr &planning_scene_monitor, bool read_only)
 
void initialize (bool read_only)
 
 MOVEIT_STRUCT_FORWARD (SingleUnlock)
 

Protected Attributes

PlanningSceneMonitorPtr planning_scene_monitor_
 
SingleUnlockPtr lock_
 

Detailed Description

This is a convenience class for obtaining access to an instance of a locked PlanningScene.

Instances of this class can be used almost exactly like instances of a PlanningScenePtr because of the typecast operator and "operator->" functions. Therefore you will often see code like this:

moveit::core::RobotModelConstPtr model = ls->getRobotModel();
This is a convenience class for obtaining access to an instance of a locked PlanningScene.

The function "getRobotModel()" is a member of PlanningScene and not a member of this class. However because of the "operator->" here which returns a PlanningSceneConstPtr, this works.

Any number of these "ReadOnly" locks can exist at a given time. The intention is that users which only need to read from the PlanningScene will use these and will thus not interfere with each other.

See also
LockedPlanningSceneRW

Definition at line 644 of file planning_scene_monitor.h.

Constructor & Destructor Documentation

◆ LockedPlanningSceneRO() [1/2]

planning_scene_monitor::LockedPlanningSceneRO::LockedPlanningSceneRO ( const PlanningSceneMonitorPtr &  planning_scene_monitor)
inline

Definition at line 647 of file planning_scene_monitor.h.

Here is the call graph for this function:

◆ LockedPlanningSceneRO() [2/2]

planning_scene_monitor::LockedPlanningSceneRO::LockedPlanningSceneRO ( const PlanningSceneMonitorPtr &  planning_scene_monitor,
bool  read_only 
)
inlineprotected

Definition at line 674 of file planning_scene_monitor.h.

Here is the call graph for this function:

Member Function Documentation

◆ getPlanningSceneMonitor()

const PlanningSceneMonitorPtr& planning_scene_monitor::LockedPlanningSceneRO::getPlanningSceneMonitor ( )
inline

Definition at line 653 of file planning_scene_monitor.h.

◆ initialize()

void planning_scene_monitor::LockedPlanningSceneRO::initialize ( bool  read_only)
inlineprotected

Definition at line 680 of file planning_scene_monitor.h.

Here is the caller graph for this function:

◆ MOVEIT_STRUCT_FORWARD()

planning_scene_monitor::LockedPlanningSceneRO::MOVEIT_STRUCT_FORWARD ( SingleUnlock  )
protected

◆ operator bool()

planning_scene_monitor::LockedPlanningSceneRO::operator bool ( ) const
inline

Definition at line 658 of file planning_scene_monitor.h.

◆ operator const planning_scene::PlanningSceneConstPtr &()

planning_scene_monitor::LockedPlanningSceneRO::operator const planning_scene::PlanningSceneConstPtr & ( ) const
inline

Definition at line 663 of file planning_scene_monitor.h.

◆ operator->()

const planning_scene::PlanningSceneConstPtr& planning_scene_monitor::LockedPlanningSceneRO::operator-> ( ) const
inline

Definition at line 668 of file planning_scene_monitor.h.

Member Data Documentation

◆ lock_

SingleUnlockPtr planning_scene_monitor::LockedPlanningSceneRO::lock_
protected

Definition at line 712 of file planning_scene_monitor.h.

◆ planning_scene_monitor_

PlanningSceneMonitorPtr planning_scene_monitor::LockedPlanningSceneRO::planning_scene_monitor_
protected

Definition at line 711 of file planning_scene_monitor.h.


The documentation for this class was generated from the following file: