pycram.ros_utils.tf_broadcaster#
Classes#
Broadcaster that publishes TF frames for every object in the World. |
Module Contents#
- class pycram.ros_utils.tf_broadcaster.TFBroadcaster(projection_namespace=ExecutionType.SIMULATED, odom_frame='odom', interval=0.1)#
Broadcaster that publishes TF frames for every object in the World.
- world#
- tf_static_publisher#
- tf_publisher#
- thread#
- kill_event#
- interval = 0.1#
- projection_namespace#
- odom_frame = 'odom'#
- update()#
Updates the TFs for the static odom frame and all objects currently in the World.
- _update_objects() None#
Publishes the current pose of all objects in the World. As well as the poses of all links of these objects.
- _update_static_odom() None#
Publishes a static odom frame to the tf_static topic.
- _publish_pose(child_frame_id: str, pose: pycram.datastructures.pose.PoseStamped, static=False) None#
Publishes the given pose to the ROS TF topic. First the pose is converted to a Transform between pose.frame and the given child_frame_id. Afterward, the frames of the Transform are prefixed with the projection namespace.
- Parameters:
child_frame_id – Name of the TF frame which the pose points to
pose – Pose that should be published
static – If the pose should be published to the tf_static topic
- _publish() None#
Constantly publishes the positions of all objects in the World.
- _stop_publishing() None#
Called when the process ends, sets the kill_event which terminates the thread that publishes to the TF topic.