This is a convenience class for obtaining access to an instance of a locked PlanningScene. More...
#include <planning_scene_monitor.h>
Classes | |
struct | SingleUnlock |
Public Member Functions | |
const PlanningSceneMonitorPtr & | getPlanningSceneMonitor () |
LockedPlanningSceneRO (const PlanningSceneMonitorPtr &planning_scene_monitor) | |
operator bool () const | |
operator const planning_scene::PlanningSceneConstPtr & () const | |
const planning_scene::PlanningSceneConstPtr & | operator-> () const |
Protected Member Functions | |
void | initialize (bool read_only) |
LockedPlanningSceneRO (const PlanningSceneMonitorPtr &planning_scene_monitor, bool read_only) | |
Protected Attributes | |
boost::shared_ptr< SingleUnlock > | lock_ |
PlanningSceneMonitorPtr | planning_scene_monitor_ |
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:
planning_scene_monitor::LockedPlanningSceneRO ls(planning_scene_monitor); robot_model::RobotModelConstPtr model = ls->getRobotModel();
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.
Definition at line 538 of file planning_scene_monitor.h.
planning_scene_monitor::LockedPlanningSceneRO::LockedPlanningSceneRO | ( | const PlanningSceneMonitorPtr & | planning_scene_monitor | ) | [inline] |
Definition at line 542 of file planning_scene_monitor.h.
planning_scene_monitor::LockedPlanningSceneRO::LockedPlanningSceneRO | ( | const PlanningSceneMonitorPtr & | planning_scene_monitor, |
bool | read_only | ||
) | [inline, protected] |
Definition at line 570 of file planning_scene_monitor.h.
const PlanningSceneMonitorPtr& planning_scene_monitor::LockedPlanningSceneRO::getPlanningSceneMonitor | ( | ) | [inline] |
Definition at line 548 of file planning_scene_monitor.h.
void planning_scene_monitor::LockedPlanningSceneRO::initialize | ( | bool | read_only | ) | [inline, protected] |
Definition at line 576 of file planning_scene_monitor.h.
planning_scene_monitor::LockedPlanningSceneRO::operator bool | ( | ) | const [inline] |
Definition at line 553 of file planning_scene_monitor.h.
planning_scene_monitor::LockedPlanningSceneRO::operator const planning_scene::PlanningSceneConstPtr & | ( | ) | const [inline] |
Definition at line 558 of file planning_scene_monitor.h.
const planning_scene::PlanningSceneConstPtr& planning_scene_monitor::LockedPlanningSceneRO::operator-> | ( | ) | const [inline] |
Definition at line 563 of file planning_scene_monitor.h.
boost::shared_ptr<SingleUnlock> planning_scene_monitor::LockedPlanningSceneRO::lock_ [protected] |
Definition at line 606 of file planning_scene_monitor.h.
PlanningSceneMonitorPtr planning_scene_monitor::LockedPlanningSceneRO::planning_scene_monitor_ [protected] |
Definition at line 605 of file planning_scene_monitor.h.