Ask Your Question
0

Map Display: Use different frame then /map

asked 2019-11-12 09:37:31 -0600

BenQ1110 gravatar image

Hi,

I might have a very simple question but haven't found the solution yet. I am using Map display to visualize the Occupancy Grid type of message. Occupancy grid's frame should be centered at the vehicle (in-vehicle local frame e.g. like in an AV's occupancy grid visualizations).

However, in my stack, someone is already using /map frame to define the global frame of the world map, i.e. it doesn't translate with the vehicle.

Question is how can I change the frame used in Map display in rviz so I could use some newly defined frame, e.g. /local_vehicle_tf, rather than /map? Should I just define my new type of display in rviz? That seems to be overkill just to change the frame.

It's kind of a simple question but I haven't figured it out.

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-12 11:46:37 -0600

Carl D gravatar image

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.

edit flag offensive delete link more

Comments

Thanks! That solves it.

BenQ1110 gravatar imageBenQ1110 ( 2019-12-02 12:33:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-11-12 09:37:31 -0600

Seen: 16 times

Last updated: Nov 12