ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Export your environment as a collada file and then write a node which streams it as a marker (see http://ros.org/wiki/rviz/DisplayTypes/Marker).

The problem is that it will consume ressources to send regularly the position. If you want to avoid that, you could write a dedicated rviz plugin.

Export your environment as a collada file and then write a node which streams it as a marker (see http://ros.org/wiki/rviz/DisplayTypes/Marker).

The problem is that it will consume ressources to send regularly the position. If you want to avoid that, you could write a dedicated rviz plugin.

edit:

  1. Follow this tutorial to see a simple example: http://ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes

  2. then take a look at the Marker message definition: http://www.ros.org/doc/api/visualization_msgs/html/msg/Marker.html You can see that using the MESH_RESOURCE type, a model can be displayed in rviz. See also http://ros.org/wiki/rviz/DisplayTypes/Marker#Mesh_Resource_.28MESH_RESOURCE.3D10.29_.5B1.1.2B-.5D

  3. Change the tutorial code to send a mesh instead by filling the appropriate fields in the message definition. To start you can use whatever model is available on your machine.

  4. Once the model is streamed correctly, you can use a 3d modeler of your choice to create the objects you need using a format that rviz understands (i.e. collada for instance).