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

about resolution on yaml

asked 2014-06-29 17:48:32 -0600

Ken_in_JAPAN gravatar image

updated 2014-06-29 17:49:39 -0600

My question:
As hokuyo laser URG-04LX has 1mm resolution, I should set 0.001 as resolution on global_costmap_params.yaml?
Because the resolution of hokuyo laser URG-04LX is 1mm. or Should I edit this parameter to match unit [m/pixel] in case that pgm has 312X512 pixels and actual map size has 2.7m wide and 5.3m height?
Could anybody tell me your experience?

Next article says more detailed information. I have a laser3.yaml and laser3.pgm like this. laser3.png
laser3.yaml

image: /home/turtlebot/laser3.pgm
resolution: 0.050000
origin: [-1.000000, -12.200000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

So, I'm editing my code like this.

map_upperboud = costmap_->getSizeInMetersX() -costmap_->getOriginX();
map_lowerbound = costmap_->getOriginX();
ROS_WARN("Setting upper bound and lower bound of map x-coordinate to (%f, %f).", map_upperbound, map_lowerbound);

When I execute this program, I get a next message.
[ WARN] [1404074825.515283246]: Setting upper bound and lower bound of map x-coordinate to (16.975000, -1.000000).
[ WARN] [1404074825.515418641]: Setting upper bound and lower bound of map y-coordinate to (37.775000, -12.200000). I think getOriginX() reads laser3.yaml. Actually, The map have 2.7m in X-axis and 5.3m in Y-axis. But, The result has 16.95 in X-axis and 37.775 in Y-axis. laser3.png that actually is laser3.pgm has 320X512 pixels. If calculating pixels, origin data and resolution in yaml with getSizeInMetersX(), I get 16.975 and 37.775.
So, resolution of parameter is written on laser3.yaml after reading a resolution in global_costmap_params.yaml.

edit retag flag offensive close merge delete

Comments

I think I should set 0.01[m/pixel] as a resolution, if I follow the map that has 312X512 pixels.

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-07-01 12:14:14 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-08-13 04:23:46 -0600

dornhege gravatar image

Do NOT do this. The resolution in the map's yaml file is the map's resolution, not the laser's. Those are two completely different things and manually changing the map resolution will almost surely make the map unusable.

edit flag offensive delete link more

Comments

Thanks @dornhege! Do you mean that you don't change a resolution of yaml? I also think that I should not change the resolution after building a map.

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2014-08-13 09:31:21 -0600 )edit

Exactly. The resolution is part of the map and was generated when building it.

dornhege gravatar image dornhege  ( 2014-08-13 09:37:42 -0600 )edit
1

answered 2014-08-13 00:11:37 -0600

Ken_in_JAPAN gravatar image

I want to explain the relationship between *.yaml and *.pgm.

kinectF1.yaml.

image: /home/turtlebot/kinectF1.pgm
resolution: 0.050000
origin: [-100.000000, -100.000000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

If you open kinectF1.pgm(4000x4000) with Gimp Image Editor, you will understand the relationship. resolution in kinectF1.yaml means m/pixel. 0 on x-axis, 0 on y-axis and 0 theta is origin. you can calculate origin in kinectF1.yaml by dividing -100.000000 by 0.05. The result is -2000. As the upper-right corner on kinectF1.pgm is origin, 2000 on Gimp is located at -2000 from origin. image description

If you understand above article, you can change origin.

edit flag offensive delete link more

Comments

@Ken,i think the map resolution 0.05 represents 0.05m/cell,how to use gimp to change the map resolution is 0.025? in my case,my map.pgm is (576,512),does change the map.pgm size (1152,1024) can change the resolution??

jxl gravatar image jxl  ( 2015-03-07 03:33:52 -0600 )edit

dornhege also says that map resolution shouldn't be changed. By the way, How do you make your map? With Kinect or URG-04LX? I recommend you follow the information the device got.

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2015-03-08 08:16:44 -0600 )edit

i saw the similar question ,does it mean that once you get map ,you shouldn't change the resolution of the map by some software,i got map by this

jxl gravatar image jxl  ( 2015-03-08 09:00:09 -0600 )edit

As having shown the picture at this page,I made a map clean with Gimp. But, I don't change the resolution of map with gedit.

Ken_in_JAPAN gravatar image Ken_in_JAPAN  ( 2015-03-09 08:55:08 -0600 )edit

Ok,thank you Ken, i understand

jxl gravatar image jxl  ( 2015-03-09 20:20:57 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2014-06-29 17:48:32 -0600

Seen: 2,602 times

Last updated: Aug 13 '14