Use imu in Hector mapping with low cost laser distance sensor

asked 2017-07-18 01:49:54 -0600

scopus gravatar image

updated 2017-07-18 19:30:15 -0600

We are using a low cost laser distance sensor rplidar A2 on a turtlebot2 robot . Because in some cases(probably due to similar environment) there is false scan matching leading to inconsistent map, we are considering using imu data from turtlebot2 to solve this problem. We are using robot_pose_ekf to fuse the information from wheel odometry with imu. By this way, the imu data is fused into the tf tree.

We found that in hector mapping, if the parameter "use_tf_pose_start_estimate" is set to be true (of course, another parameter "use_tf_scan_transformation" is set to te true beforehand), the tf data can be used during the mapping process.

However, it always outputs an error:

[ERROR] [1500360203.142398818, 11186.930000000]: Transform from map to base_link failed with Lookup would require extrapolation into the future.  Requested time 11185.970000000 but the latest data is at time 11185.370000000, when looking up transform from frame [base_link] to frame [map]

We find this error is generated here in the source code.

The above error is generated not only in the experiments on the real robot but also in the simulated environments created by gazebo. Even if we increase the duration in waitfortransform to be 2.0, the error still exists.

@StefanKohlbrecher If possible, we are looking forwards one of the author of hector mapping give us great advices. Thank you!


Thanks for attention! @allenh1 Below is the content of launch file.

<launch> <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

<!-- Topic names -->
<param name="scan_topic" value="scan" />

<!-- Frame names -->
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="odom"/>
<param name="output_timing" value="true"/>

<!-- Tf use -->
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="true"/>
<param name="pub_map_odom_transform" value="true"/>
<param name="advertise_map_service" value="true"/>
<param name="map_with_known_poses" value="true"/>
<param name="pub_odometry" value ="true"/>
<!-- Map size / start point -->
<param name="map_resolution" value="0.02"/>
<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="6" />

<!-- Map update parameters -->
<param name="map_pub_period" value="0.5"/>
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.9" />
<param name="map_update_distance_thresh" value="0.3"/>
<param name="map_update_angle_thresh" value="0.9" />
 <param name="laser_min_dist" value="0.2"/>
 <param name="laser_max_dist" value="5.5"/>

  <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
    <param name="output_frame" value="odom"/>
    <param name="sensor_timeout" value="1.0"/>
    <param name="freq" value="30.0"/>
    <param name="odom_used" value="true"/>
    <param name="imu_used" value="true"/>
    <param name="vo_used" value="false"/>
    <param name="debug" value="false"/>
    <param name="self_diagnose" value="false"/>
    <remap from="imu_data" to="/mobile_base/sensors/imu_data"/>
edit retag flag offensive close merge delete


Can you provide a list of the parameters you used?

allenh1 gravatar image allenh1  ( 2017-07-18 19:24:00 -0600 )edit

@scopus Did you ever solve this?

tropic gravatar image tropic  ( 2019-04-06 14:13:44 -0600 )edit