Ask Your Question
0

Setting map_server resolution correctly to syncronize stageros and Rviz maps

asked 2014-01-21 04:25:55 -0500

fjp gravatar image

updated 2014-01-21 04:27:25 -0500

Our goal is to drive a nonholonomic robot around in a given map. We use the navigation_stage package in the navigation_tutorials stack.

Now follows a description what causes our problem: If the robot is moving a certain distance, its position is different in the Rviz-map and the map in stageros.

We guess it's the wrong set resolution parameter from the map_server inside our launch file which causes the problem:

<launch>

...

<!-- Run the map server (section inside the launch file) -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find Navigo)/world/our_world.pgm 0.12"/>

...

</launch>

The definition of this resolution parameter is: Resolution of the map, meters/pixel

Therefore we measured the corridor width, which is 1.85m, and the same spot inside the given our_world.pgm file which has 36pixels.

This leads to a resolution of:

1.85m/36pixels = 0.0514

But if we set this value instead of the 0.12 in our launch file, our robot is much to large inside the Rviz map.

The question is how to find the correct value or if there is another way of "sycronizing" these map resolutions. Do we have to change some parameters inside the world file or the Rviz our_world.vcg file?

Here is our our_world.world file:

define block model
(
  size [0.5 0.5 0.5]
  gui_nose 0
)

define topurg ranger
(
    sensor(             
    range [ 0.0  5.0 ]
    fov 240
   samples 666.7
  )

  # generic model properties
  color "black"
  size [ 0.05 0.05 0.07 ]
)

define erratic position
(
  #size [0.415 0.392 0.25]
  size [0.656 0.43 0.25]
  origin [-0.05 0 0 0]
  gui_nose 1
  drive "car"
  wheelbase 0.35
  topurg(pose [ 0.2375 0.000 0 0.150 ])
)

define floorplan model
(
  # sombre, sensible, artistic
  color "gray30"

  # most maps will need a bounding box
  boundary 1

  gui_nose 0
  gui_grid 0

  gui_outline 0
  gripper_return 0
  fiducial_return 0
  laser_return 1
)

# set the resolution of the underlying raytrace model in meters
resolution 0.02

interval_sim 100  # simulation timestep in milliseconds


window
( 
  size [ 745.000 448.000 ] 

  #rotate [ 0.000 -1.560 ]
  rotate [0.0 0.0]
  #scale 28.806
  scale 5.0
)

# load an environment bitmap
floorplan
( 
  name "our_world"
  bitmap "our_world.pgm"
  size [54.0 58.7 0.5]
  pose [20 28 0 6]
)

# throw in a robot
erratic( pose [34.5 16 0 90.0] name "car" color "blue")
block( pose [ -33 37 0 180.000 ] color "red") # An obstacle for testing
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-01-21 05:22:40 -0500

fjp gravatar image

We changed the resolution parameter to 0.1 and did also some adjustments on the floorplan size parameter values. Now it works much better!

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-01-21 04:25:55 -0500

Seen: 1,526 times

Last updated: Jan 21 '14