41namespace bind_planning_scene_monitor
45 moveit_msgs::msg::CollisionObject& collision_object_msg,
46 std::optional<moveit_msgs::msg::ObjectColor> color_msg)
48 moveit_msgs::msg::CollisionObject::ConstSharedPtr const_ptr =
49 std::make_shared<const moveit_msgs::msg::CollisionObject>(collision_object_msg);
58 moveit_msgs::msg::AttachedCollisionObject& attached_collision_object_msg)
60 moveit_msgs::msg::AttachedCollisionObject::ConstSharedPtr const_ptr =
61 std::make_shared<const moveit_msgs::msg::AttachedCollisionObject>(attached_collision_object_msg);
65LockedPlanningSceneContextManagerRO
71LockedPlanningSceneContextManagerRW
104 py::class_<planning_scene_monitor::PlanningSceneMonitor, planning_scene_monitor::PlanningSceneMonitorPtr>(
105 m,
"PlanningSceneMonitor", R
"(
106 Maintains the internal state of the planning scene.
111 str: The name of this planning scene monitor.
116 Update the transforms for the frames that are not part of the kinematic model using tf.
118 Examples of these frames are the "map" and "odom_combined" transforms. This function is automatically called
119 when data that uses transforms is received.
120 However, this function should also be called before starting a planning request, for example.
125 Starts the scene monitor.
130 Stops the scene monitor.
135 Starts the state monitor.
140 Stops the state monitor.
143 py::arg(
"service_name"),
145 Request the planning scene.
148 service_name (str): The name of the service to call.
153 Waits for the current robot state to be received.
161 py::arg(
"collision_object_msg"), py::arg(
"color_msg") =
nullptr,
163 Apply a collision object to the planning scene.
166 collision_object_msg (moveit_msgs.msg.CollisionObject): The collision object to apply to the planning scene.
168 .def("process_attached_collision_object",
170 py::arg(
"attached_collision_object_msg"),
172 Apply an attached collision object msg to the planning scene.
175 attached_collision_object_msg (moveit_msgs.msg.AttachedCollisionObject): The attached collision object to apply to the planning scene.
181 Called to update the planning scene with a new message.
184 scene (moveit_msgs.msg.PlanningScene): The new planning scene message.
189 Returns a read-only context manager for the planning scene.
194 Returns a read-write context manager for the planning scene.
203 py::class_<moveit_py::bind_planning_scene_monitor::LockedPlanningSceneContextManagerRO>(
204 m,
"LockedPlanningSceneContextManagerRO", R
"(
205 A context manager that locks the planning scene for reading.
211 Special method that is used with the with statement, provides access to a locked plannning scene instance.
213 :py:class:`moveit_py.core.PlanningScene`: The locked planning scene.
218 Special method that is used with the with statement, releases the lock on the planning scene.
222 py::class_<moveit_py::bind_planning_scene_monitor::LockedPlanningSceneContextManagerRW>(
223 m,
"LockedPlanningSceneContextManagerRW", R
"(
224 A context manager that locks the planning scene for reading and writing.
229 py::return_value_policy::take_ownership,
231 Special method that is used with the with statement, provides access to a locked plannning scene instance.
233 :py:class:`moveit_py.core.PlanningScene`: The locked planning scene.
239 Special method that is used with the with statement, releases the lock on the planning scene.
const planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_
const planning_scene::PlanningSceneConstPtr & lockedPlanningSceneRoEnter() const
void lockedPlanningSceneRoExit(const py::object &type, const py::object &value, const py::object &traceback)
std::unique_ptr< const planning_scene_monitor::LockedPlanningSceneRO > ls_ro_
const planning_scene::PlanningScenePtr & lockedPlanningSceneRwEnter()
const planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_
std::unique_ptr< const planning_scene_monitor::LockedPlanningSceneRW > ls_rw_
void lockedPlanningSceneRwExit(const py::object &type, const py::object &value, const py::object &traceback)
PlanningSceneMonitor Subscribes to the topic planning_scene.
bool newPlanningSceneMessage(const moveit_msgs::msg::PlanningScene &scene)
void startStateMonitor(const std::string &joint_states_topic=DEFAULT_JOINT_STATES_TOPIC, const std::string &attached_objects_topic=DEFAULT_ATTACHED_COLLISION_OBJECT_TOPIC)
Start the current state monitor.
void stopStateMonitor()
Stop the state monitor.
void startSceneMonitor(const std::string &scene_topic=DEFAULT_PLANNING_SCENE_TOPIC)
Start the scene monitor (ROS topic-based)
bool waitForCurrentRobotState(const rclcpp::Time &t, double wait_time=1.)
Wait for robot state to become more recent than time t.
void stopSceneMonitor()
Stop the scene monitor.
bool requestPlanningSceneState(const std::string &service_name=DEFAULT_PLANNING_SCENE_SERVICE)
Request a full planning scene state using a service call Be careful not to use this in conjunction wi...
const std::string & getName() const
Get the name of this monitor.
const planning_scene::PlanningScenePtr & getPlanningScene()
Avoid this function! Returns an unsafe pointer to the current planning scene.
void updateFrameTransforms()
Update the transforms for the frames that are not part of the kinematic model using tf....
bool processAttachedCollisionObjectMsg(const planning_scene_monitor::PlanningSceneMonitorPtr &planning_scene_monitor, moveit_msgs::msg::AttachedCollisionObject &attached_collision_object_msg)
LockedPlanningSceneContextManagerRW readWrite(const planning_scene_monitor::PlanningSceneMonitorPtr &planning_scene_monitor)
bool processCollisionObject(const planning_scene_monitor::PlanningSceneMonitorPtr &planning_scene_monitor, moveit_msgs::msg::CollisionObject &collision_object_msg, std::optional< moveit_msgs::msg::ObjectColor > color_msg)
LockedPlanningSceneContextManagerRO readOnly(const planning_scene_monitor::PlanningSceneMonitorPtr &planning_scene_monitor)
void initContextManagers(py::module &m)
void initPlanningSceneMonitor(py::module &m)