how to use robot_pose_ekf together with amcl

asked 2016-09-28 09:10:27 -0500

gleb gravatar image

updated 2016-10-04 07:11:34 -0500

Hello everyone,

I have a carlike robot simulated in gazebo with a lidar and an imu sensor. I want to combine the odom delivered by hector slam and imu data with robot_pose_ekf and use odom_combined for amcl. The following are my launch files:


<?xml version="1.0"?>
<node pkg="amcl" type="amcl" name="amcl" output="screen">

  <!-- remap from="scan" to="hokuyo_laser_topic" / -->  
  <remap from="cmd_vel" to="/cmd_vel" />  
  <remap from="scan" to="/scan" />  

  <!-- Publish scans from best pose at a max of 10 Hz -->
  <param name="odom_model_type" value="diff-corrected"/>
  <param name="odom_alpha5" value="0.003"/>
  <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.005"/>
  <param name="odom_alpha2" value="0.005"/>
  <!-- translation std dev, m -->
  <param name="odom_alpha3" value="0.010"/>
  <param name="odom_alpha4" value="0.005"/>
  <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.1"/>
  <param name="update_min_a" value="0.1"/>
  <param name="odom_frame_id" value="/odom_combined"/>
  <param name="base_frame_id" value="base_footprint"/>
  <param name="global_frame_id" value="map"/>
  <param name="resample_interval" value="1"/>
  <param name="transform_tolerance" value="0.1"/>
  <param name="recovery_alpha_slow" value="0.01"/>
  <param name="recovery_alpha_fast" value="1"/>
  <param name="initial_pose_x" value ="0"/>
  <param name="initial_pose_y" value ="0"/>
  <param name="initial_pose_a" value ="0"/>



<?xml version="1.0"?>


<!--node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0.0 0.0 0.0 /odom /base_link 50" /-->
<node name="hector_mapping" pkg="hector_mapping" type="hector_mapping" output="screen">
    <remap from="map" to="/mapcurrent" />
    <param name="map_frame" value="/mapcurrent" />
    <param name="base_frame" value="/base_footprint" />
    <param name="odom_frame" value="/odom" />
    <param name="pub_odometry" value="true" />
    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="false" />

    <param name="map_resolution" value="0.025"/>
    <param name="map_size" value="2048"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5" />
    <param name="map_multi_res_levels" value="2" />

    <param name="update_factor_free" value="0.4" />
    <param name="update_factor_occupied" value="0.9" />    
    <param name="map_update_distance_thresh" value="0.4" />
    <param name="map_update_angle_thresh" value="0.06" />
    <param name="laser_z_min_value" value = "-1.0" />
    <param name="laser_z_max_value" value = "1.0" />

    <param name="advertise_map_service" value="true" />

    <param name="scan_subscriber_queue_size" value="5"/>
    <param name="scan_topic" value="/scan"/>
    <param name="pub_map_scanmatch_transform" value="false" />
    <param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />

<node name="odomtransformer" pkg="rbcar_navigation" type="" output="screen">
    <param name="odom_input" value="/scanmatch_odom" />
    <param name="tf_output" value="/base_footprint" />



    <?xml version="1.0"?>

  <node name="map_server" pkg="map_server" type="map_server" args="$(find rbcar_navigation)/maps/hector.yaml"/>

  <!-- Run AMCL -->
  <include file="$(find rbcar_navigation)/launch/navigation_amcl/amcl.launch" />

  <!-- Run move_base -->
  <node pkg ...
edit retag flag offensive close merge delete


hello, you got any solution, I am facing the same issue

Karim Ahmt gravatar image Karim Ahmt  ( 2018-09-21 22:43:50 -0500 )edit