Ask Your Question
1

AMCL without using odomedry (but laser_scan_matcher instead)

asked 2012-03-21 04:32:47 -0500

N3UTR1NOS gravatar image

Hi, I have been trying to localize my robot using only an URG Hokuyo (so without any odometer) on a known static map. I have been able to run laser_scan_matcher to simulate odometry with gmapping to build the map. Now, using this map I'd like to use amcl to localize my robot in it but it doesn't seem to work since the laser data are not trying to fit the map...

$rviz: Image1

$rxgraph: Image2

$tf_monitor: RESULTS: for all Frames Frames: Frame: /base_link published by /laser_scan_matcher_node Average Delay: -0.00268532 Max Delay: 0.00239109 Frame: /laser published by /base_link_to_laser Average Delay: -0.039569 Max Delay: 0 Frame: /odom published by /amcl Average Delay: -0.0978399 Max Delay: 0 All Broadcasters: Node: /amcl 10.3673 Hz, Average Delay: -0.0978399 Max Delay: 0 Node: /base_link_to_laser 25.2033 Hz, Average Delay: -0.039569 Max Delay: 0 Node: /laser_scan_matcher_node 10.3616 Hz, Average Delay: -0.00268532 Max Delay: 0.00239109

$roslaunch:

<launch>

  <param name="/use_sim_time" value="false"/>


  <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" 
    args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /laser 40" />

  <node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find laser_scan_matcher)/demo_amcl.vcg"/>

  <node name="hokuyo" pkg="hokuyo_node" type="hokuyo_node" respawn="false" output="screen">
    <param name="calibrate_time" type="bool" value="false"/> 
    <param name="port" type="string" value="/dev/ttyACM0"/> 
    <param name="intensity" type="bool" value="false"/>
  </node>

  <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" 
    name="laser_scan_matcher_node" output="screen">
    <param name="fixed_frame" value = "odom"/>
    <param name="use_alpha_beta" value="true"/>
    <param name="max_iterations" value="10"/>
  </node>

 <node name="map_server" pkg="map_server" type="map_server" args="/home/neutri/maps/map1.yaml"/>

  <node pkg="amcl" type="amcl" name="amcl" output="screen" >
  <!-- Publish scans from best pose at a max of 10 Hz -->
  <param name="odom_model_type" value="diff"/>
  <param name="odom_alpha5" value="0.1"/>
  <param name="transform_tolerance" value="0.2" />
  <param name="gui_publish_rate" value="10.0"/>
  <param name="laser_max_beams" value="30"/>
  <param name="min_particles" value="500"/>
  <param name="max_particles" value="5000"/>
  <param name="kld_err" value="0.05"/>
  <param name="kld_z" value="0.99"/>
  <param name="odom_alpha1" value="0.2"/>
  <param name="odom_alpha2" value="0.2"/>
  <!-- translation std dev, m -->
  <param name="odom_alpha3" value="0.8"/>
  <param name="odom_alpha4" value="0.2"/>
  <param name="laser_z_hit" value="0.5"/>
  <param name="laser_z_short" value="0.05"/>
  <param name="laser_z_max" value="0.05"/>
  <param name="laser_z_rand" value="0.5"/>
  <param name="laser_sigma_hit" value="0.2"/>
  <param name="laser_lambda_short" value="0.1"/>
  <param name="laser_lambda_short" value="0.1"/>
  <param name="laser_model_type" value="likelihood_field"/>
  <!-- <param name="laser_model_type" value="beam"/> -->
  <param name="laser_likelihood_max_dist" value="2.0"/>
  <param name="update_min_d" value="0.2"/>
  <param name="update_min_a" value="0.5"/>
  <param name="odom_frame_id" value="odom"/>

  <param name="base_frame_id" type="str" value="base_link" />
  <param name="global_frame_id" type="str" value="map" />

  <param name="resample_interval" value="1"/>
  <param name="transform_tolerance" value="0.1"/>
  <param name="recovery_alpha_slow" value="0.0"/>
  <param name="recovery_alpha_fast" value="0.0"/>
  <param name="use_map_topic" value="true" />
  <param name="first_map_only" value="true" />
</node>

</launch>
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-03-23 01:38:57 -0500

Cav gravatar image

You'll have to work with odom_alpha parameters and simply try out what works best for you. You might also want to try hector_slam.

edit flag offensive delete link more

Comments

hello,can hector_slam locate the robot in a known map with amcl? how did you load the map? can you please share the lauch file?

mksun gravatar imagemksun ( 2015-11-25 20:16:25 -0500 )edit
0

answered 2012-03-21 04:57:27 -0500

N3UTR1NOS gravatar image

Yes I did so the map and the laser data would fit but when I move the robot the localization sometimes get lost and the data doesn't try fit the map back. /laser is localized to /base_link but not to /map. I don't know if you see what I mean. It's the same behavior like when I run the laser_scan_matcher alone, like if amcl wouldn't take the map into consideration.

edit flag offensive delete link more

Comments

hello,I have also met this problem,how did you solve it? can you please share?

mksun gravatar imagemksun ( 2015-11-25 19:28:23 -0500 )edit
0

answered 2012-03-21 04:46:03 -0500

dornhege gravatar image

First: Use the 2d pose estimate button in rviz to align the scan with the environment (set the initial pose) Second: Did you actually move the robot and thus give amcl a chance to localize?

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

3 followers

Stats

Asked: 2012-03-21 04:32:47 -0500

Seen: 2,854 times

Last updated: Mar 23 '12