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

To understand the concept of Origin field from map_server

asked 2019-05-10 09:54:11 -0600

harderthan gravatar image

Hello. I'm trying to run some tutorial which have a ROS Navigation Stack sample. On doing, I couldn't understand the concept of ORIGIN field from yaml which the map_server create after mapping.

Here is a description by ROS wiki.

origin : The 2-D pose of the lower-left pixel in the map, as (x, y, yaw), with yaw as counterclockwise rotation (yaw=0 means no rotation). Many parts of the system currently ignore yaw.

What this, "the lower-left pixel in the map", mean??

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-05-13 04:17:56 -0600

Veera Ragav gravatar image

image description

The red arrow in the image shows the position of the lower-left pixel. Assign a coordinate to that pixel using origin field. The coordinates of other pixels are calculated relative to the value that you had assigned to lower-left pixel.

edit flag offensive delete link more


Thank you for the answer!

harderthan gravatar image harderthan  ( 2019-07-21 01:47:12 -0600 )edit

answered 2019-05-10 15:33:31 -0600

Map files in pgm format can be viewed just as any image editing in tools like GIMP. See for instance also this one here:

image description

(Link taken from Q/A 37762)

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

edit flag offensive delete link more


Thanks for the answer. Then, if I resize the size of the image file, then I need to calculate new origin field using the resolution and old origin field. right?

harderthan gravatar image harderthan  ( 2019-05-10 23:11:45 -0600 )edit

Question Tools



Asked: 2019-05-10 09:54:11 -0600

Seen: 2,890 times

Last updated: May 13 '19