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

Revision history [back]

click to hide/show revision 1
initial version

There's no need to make a new type of display in Rviz. Instead, there are 3 simple things to do:

  1. Make sure the occupancy grid message you publish contains the correct frame name in the header (eg. /local_vehicle_tf)

  2. In RViz in the map display settings, make sure the "topic" field is set to listen to this new occupancy grid topic and not the one publishing the world map.

  3. Change the "Fixed Frame" field in Global Options to your new frame ("/local_vehicle_tf")

That should be enough to display your local "map" and any other data that can be transformed into that frame. Eventually, you will want to make sure that this new TF frame is connected to the other frames in your robot. For instance, you could have a transform between the global map frame and your local_vehicle_tf frame. When you have a fully connected transform tree, step 3 is no longer necessary.

One last thing, the /local_vehicle_tf frame sounds like the frame that's normally called "baselink" (See https://www.ros.org/reps/rep-0105.html). You might want to use the standard name if that is correct for your situation.