Ask Your Question
0

Failed to access gmapping parameter

asked 2012-06-25 17:47:35 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I need help.
I'm trying to make map by using hokuyo_node and gmapping.
Although I can check constructing of a map by rviz, I can't access to any parameters of gmapping.
When I tried rosparam list, the following message is displayed:

hoge@hoge:~$ rosparam list
/hokuyo_node/allow_unsafe_settings
/hokuyo_node/calibrate_time
/hokuyo_node/cluster
/hokuyo_node/frame_id
/hokuyo_node/intensity
/hokuyo_node/max_ang
/hokuyo_node/max_ang_limit
/hokuyo_node/max_range
/hokuyo_node/min_ang
/hokuyo_node/min_ang_limit
/hokuyo_node/min_range
/hokuyo_node/port /hokuyo_node/skip
/hokuyo_node/time_offset /map_frame
/rosdistro
/roslaunch/uris/host_hoge__36584
/roslaunch/uris/host_hoge__44203
/rosparam/map_frame /rosversion
/run_id /temporalUpdate

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2012-06-25 22:52:00 -0500

Lorenz gravatar image

It seems like you just didn't set any parameters for gmapping. I guess you were not running it using a launch file but rosrun. Just running a node normally will not set anything on the parameter server, the node will just use the default values as documented at the gmapping wiki page. To actually set parameters, the most common way is to use a launch file. There are a few packages that contain launch files to start gmapping, e.g. in pr2_navigation_slam or in turtlebot_navigation.

You can create a file gmapping.launch and put the following content in it:

<launch>
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <rosparam>
      odom_frame: odom
      map_update_interval: 1.0
      maxUrange: 30.0
      maxRange: 60.0
      sigma: 0.05
      kernelSize: 1
      lstep: 0.05
      astep: 0.05
      iterations: 5
      lsigma: 0.075
      ogain: 3.0
      lskip: 0
      linearUpdate: 0.5
      angularUpdate: 0.436
      temporalUpdate: -1.0
      resampleThreshold: 0.5
      particles: 80
      xmin: -1.0
      ymin: -1.0
      xmax: 1.0
      ymax: 1.0
      delta: 0.025
      llsamplerange: 0.01
      llsamplestep: 0.01
      lasamplerange: 0.005
      lasamplestep: 0.005
      base_frame: base_link
    </rosparam>
    <remap from="/scan" to="/base_scan" />
  </node>
</launch>

Have a look at the remap line at the end. You need to replace the topic base_scan by whatever topic your laser publishes to. If that happens to be scan you can just remove that line. Also, make sure that the odom_frame and the base_frame match your configuration.

Now you should be able to execute roslaunch gmapping.launch. After that call, the gmapping parameters should all be shown by rosparam list.

Note that rosparam set won't change anything for roslaunch or gmapping since roslaunch will overwrite the parameters again and gmapping parses them only when it's started up. If you want to change parameters, edit the launch file.

edit flag offensive delete link more
0

answered 2012-06-28 21:15:21 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Thank you for your very kind answer.
I was able to set the parameters by using the launch file.

edit flag offensive delete link more
0

answered 2012-06-25 20:58:42 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Read point number 4 at http://www.ros.org/wiki/rosparam

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

Stats

Asked: 2012-06-25 17:47:35 -0500

Seen: 1,181 times

Last updated: Jun 28 '12