This is a convenience class for obtaining access to an instance of a locked PlanningScene. More...
|LockedPlanningSceneRW (const PlanningSceneMonitorPtr &planning_scene_monitor)|
|operator const planning_scene::PlanningScenePtr & ()|
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::LockedPlanningSceneRW 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 PlanningScenePtr, this works.
Only one of these "ReadWrite" locks can exist at a given time. The intention is that users which need to write to the PlanningScene will use these, preventing other writers and readers from locking the same PlanningScene at the same time.
|planning_scene_monitor::LockedPlanningSceneRW::LockedPlanningSceneRW||(||const PlanningSceneMonitorPtr &||planning_scene_monitor||)||
|planning_scene_monitor::LockedPlanningSceneRW::operator const planning_scene::PlanningScenePtr &||(||)||
|const planning_scene::PlanningScenePtr& planning_scene_monitor::LockedPlanningSceneRW::operator->||(||)||