Ask Your Question
0

To understand the concept of Origin field from map_server

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

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
2

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

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

Comments

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 imageharderthan ( 2019-05-10 23:11:45 -0500 )edit
1

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

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

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

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

Seen: 95 times

Last updated: May 13