Ask Your Question
0

questions about 2d map structure ?

asked 2014-10-07 04:37:33 -0500

jxl gravatar image

updated 2014-10-07 06:01:58 -0500

hello everyone,

i did the turtlebot gmapping tutorial,got a map(width=768,height=512,resolution=0.05). does it mean that the actual size of the environment is (768 multiply by 0.05,512 multiply by0.05) ,the grid map of X from [0,767],Y from [ 0,511] or maybe X-Y axes reverse,the [0,0]cell is the lower left corner of the grid map,am i right?

then i saw the OccupancyGrid andMapMetaData , and when i saw the link1,link2and link3,There are few points unclear.

  1. when gmapping over with the turtlebot stop ,but the node slam_gmapping not kill, then i want to see the map data,sorosrun echo /map > map_data.txt,but the data are only three type: 0,100 and -1.But the Image_format said the "occupancy is represented as an integer in the range [0,100]",why?
  2. from the experiment ,i got the map.info.origin.position=[-12.2,-12.2,0] , map.info.origin.orientation=[0,0,0,1],it suggest that there is no orientation between the grid map frame coordinate and the /map frame coordinate,am i right ?how does the map_server make the grid map 's X-Y axes parallel to the /map frame's X-Y? if i do experiment in a rectangular totally free room ,i let the initial pose of turtlebot located in the diagonal of the environment ,facing to another diagonal corner,the /map frame's axes-X isn't parallel to the future build grid map frame's axes-X, the /map frame's axes-Y is also not parallel to map frame's axes-Y,can i understand like this ?

Thanks for your time and attention.sorry,my english is poor ,i hope i will not confuse you .your any ideas will be appreciated,thank you very much !!

jxl

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2014-10-07 08:03:45 -0500

dornhege gravatar image

First, your interpretations are correct.

  1. It's still correct as per the definition. My guess is that it's easier for later algorithm to work with binary data than make the thresholding themselves as like this everyone is working on the same representation.

  2. Yes this is correct. gmapping always uses 0 orientation. In principle you can use maps with other orientation, but I would not recommend that as as far as I known neither amcl nor the static map currently support that.

edit flag offensive delete link more

Comments

1

Addendum on 1: Map data is represented by an unsigned char, with 255 (or -1 after conversion to signed) being a special value to represent unknown space. link

paulbovbel gravatar imagepaulbovbel ( 2014-10-07 08:29:04 -0500 )edit

Yes, this is also in the message spec: http://docs.ros.org/api/nav_msgs/html...

dornhege gravatar imagedornhege ( 2014-10-07 08:43:43 -0500 )edit

hello @dornhege,you mean the value of the grid map published by /slam_gmapping node is only have three values,there is no value is (0,100),such as 87,18 and so on ?

jxl gravatar imagejxl ( 2014-10-07 08:53:57 -0500 )edit

It probably is internally, but is thresholed before publishing.

dornhege gravatar imagedornhege ( 2014-10-07 09:30:06 -0500 )edit

sorry for late reply ,thank you .in other place i see the origin.position of the /map in the /world can be set by yaml file which initialize map_server,where is it ? i only rosrun map_server map_saver -f /tmp/map.yaml,not set the origin ,does the origin get the fault value ?how can i set it?

jxl gravatar imagejxl ( 2014-10-07 22:14:43 -0500 )edit
0

answered 2014-10-08 08:41:42 -0500

jxl gravatar image

sorry ,i mistake the origin of the map .In the gmapping processing, while the robot is moving ,the origin of the map is changing,also the map size is changing .Only while the robot is not moving ,the origin and the map size are not changeable.The final origin and the map size are set by something automatically,anybody agree? when gmapping ,in rviz,we can see the /map frame,it doesn't change in the whole process,is it namely the fixed world frame ,the origin of the map is said relative to it ?

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

1 follower

Stats

Asked: 2014-10-07 04:37:33 -0500

Seen: 594 times

Last updated: Oct 08 '14