rigid_body_motion.ros.ReferenceFrameMarkerPublisher¶
- class rigid_body_motion.ros.ReferenceFrameMarkerPublisher(frame, base=None, topic=None, max_points=1000, publish_interval=0.0, scale=0.1, color='#ffffffff', verbose=False)[source]¶
Bases:
rigid_body_motion.ros.visualization.BaseMarkerPublisher
Publisher for the translation of a reference frame wrt another.
- __init__(frame, base=None, topic=None, max_points=1000, publish_interval=0.0, scale=0.1, color='#ffffffff', verbose=False)[source]¶
Constructor.
- Parameters
- framestr or ReferenceFrame
Reference frame for which to publish the translation.
- basestr or ReferenceFrame, optional
Base reference wrt to which the translation is published. Defaults to the parent reference frame.
- topicstr, optional
Name of the topic on which to publish. Defaults to “/<frame>/path”.
- max_pointsint, default 1000
Maximum number of points to add to the marker. Actual translation array will be sub-sampled to this number of points.
- publish_intervalfloat, default 0.0
Time in seconds between publishing when calling
spin
.
Methods
__init__
(frame[, base, topic, max_points, …])Constructor.
get_ros3d_widget
([ros, tf_client])Get a ros3d.Marker widget to display in a ros3d.Viewer.
publish
()Publish a marker message.
spin
([block])Continuously publish messages.
stop
()Stop publishing.
- get_ros3d_widget(ros=None, tf_client=None)[source]¶
Get a ros3d.Marker widget to display in a ros3d.Viewer.
- Parameters
- rosjupyros.ros3d.ROSConnection, optional
ros3d ROS connection instance.
- tf_clientjupyros.ros3d.TFClient, optional
ros3d TF client instance.
- Returns
- jupyros.ros3d.Marker
ros3d marker widget.
- publish()¶
Publish a marker message.
- spin(block=False)¶
Continuously publish messages.
- Parameters
- block: bool, default False
If True, this method will block until the publisher is stopped, e.g. by calling stop(). Otherwise, the main loop is dispatched to a separate thread which is returned by this function.
- Returns
- thread: threading.Thread
If block=True, the Thread instance that runs the loop.
- stop()¶
Stop publishing.