0
$\begingroup$

Rosanswers logo

Hey Everyone,

Is there a way that anyone knows of that would allow me to make the rviz environment look like the land and the sky (instead of the standard grid and background color)?

Thanks a lot!


Originally posted by gavinmachine on ROS Answers with karma: 353 on 2011-11-27

Post score: 3

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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).


Originally posted by Thomas with karma: 4478 on 2011-11-27

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Thomas on 2011-11-28:
I updated my post to explain more.

Comment by gavinmachine on 2011-11-28:
Is there a tutorial that explains that? What you're saying makes sense, I'm just a little stuck on where the environment gets designed (i.e. where do I make it look like the land and sky), and how I integrate the collada file into a node (i.e. which topic does it publish on, etc)... Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.