ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There's a good tutorial on Markers on the ros.org wiki; make sure to go through that first.
Some things to watch out for in general (otherwise the markers won't be displayed):
marker.color.a
) to something non-zeromarker.pose.orientation.w = 1.0
)Some more specific answers to your question:
marker.pose
.visualization_msgs/Marker
, or put several of them into a MarkerArray and publish them on a topic of type visualization_msgs/MarkerArray
. The latter is more efficient than the former, but for your use case either should work.marker.ns = "satellites"
), and give each satellite a unique id (e.g., marker.id = 23
). Whenever you want to update the pose of a marker, just publish another Marker message with the same id (it will overwrite the previous one). Even if nothing changes, you should re-publish all existing markers regularly.In order to add text/name to a marker in RViz, just add a second marker of type TEXT_VIEW_FACING and fill out the text
property.