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

Create land and sky in rviz?

asked 2011-11-27 15:43:57 -0500

gavinmachine gravatar image

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2011-11-27 19:54:16 -0500

Thomas gravatar image

updated 2011-11-28 19:40:13 -0500

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

edit flag offensive delete link more

Comments

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!
gavinmachine gravatar image gavinmachine  ( 2011-11-28 03:40:07 -0500 )edit
I updated my post to explain more.
Thomas gravatar image Thomas  ( 2011-11-28 19:35:52 -0500 )edit

Question Tools

Stats

Asked: 2011-11-27 15:43:57 -0500

Seen: 979 times

Last updated: Nov 28 '11