Robotics StackExchange | Archived questions

Map origin with respect to which coordinate frame?

I'm subscribing to the /map topic, which gets nav_msgs/OccupancyGrid messages, which has origin data from MapMetaData.

The value of the map origin is (-1, -12). But I can't figure out that this value is with respect to which frame? I donot have a world frame, and I checked it's not wrt the /odom or /base_footprint.

Basically I detect corners in the map and then want to send the bot to the corner, but to do that, I need to transform the coordinates from the pgm map, and I can't understand where the point lies on the map.

Asked by parzival on 2019-11-11 05:07:21 UTC

Comments

Could you please include links to Q&As you've already found? Just so we can avoid discussing aspects of this you are already aware of?

There are multiple Q&As about this topic (with a very recent one being #q306110 fi and #q322919 seems like it would answer your question), and it would be great if we could avoid adding more (partial) duplicates.

Asked by gvdhoorn on 2019-11-11 05:13:46 UTC

Hi @gvdhoorn, I referred those, but didn't get the required answer. I'd keep in mind to tag these questions in future.

Asked by parzival on 2019-11-11 05:58:29 UTC

This answer by @ Stefan Kohlbrecher seems to answer your question:

The origin tag in the yaml states where the bottom left pixel of this image is located relative to the map's coordinate frame (supplied via the frame_id param in map_server, defaults to "map").

This is the second answer to #q322919.

Asked by gvdhoorn on 2019-11-11 06:07:56 UTC

Oh. Now I get it. Had read the answer previously but it didn't click at the time. Thanks a lot!

Asked by parzival on 2019-11-14 05:49:27 UTC

Answers