0
$\begingroup$

Rosanswers logo

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>

Originally posted by N3UTR1NOS on ROS Answers with karma: 11 on 2012-03-21

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Cav with karma: 345 on 2012-03-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by mksun on 2015-11-25:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.