Problem with hector_slam on ground robot

asked 2015-06-05 04:55:15 -0600

jacobsolid gravatar image

updated 2015-06-05 05:04:52 -0600

Hello, I am running hector_slam from bag file (see attached) on a ground robot with scan and odom, my ubuntu is 12.04 and ros groovy, I am getting troubles in having a good map, please see below:

image description

while the one generated by gmaping (which is much realistic) is:

image description

The problem occur, the same, when using odom or not! Also during operation the robot lose its pose many times, please see errors output bellow:

[ERROR] [1433495487.294562401, 1433426017.832633360]: Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future.  Requested time 1433426017.330863000 but the latest data is at time 1433426017.230337000, when looking up transform from frame [/base_link] to frame [/odom]
[ERROR] [1433495607.287131881, 1433426137.816147320]: Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future.  Requested time 1433426137.308339000 but the latest data is at time 1433426137.264338000, when looking up transform from frame [/base_link] to frame [/odom]

[ERROR] [1433495727.312635641, 1433426257.845137521]: Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future.  Requested time 1433426257.340338000 but the latest data is at time 1433426257.286338000, when looking up transform from frame [/base_link] to frame [/odom]

[ERROR] [1433495847.291968401, 1433426377.822590880]: Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future.  Requested time 1433426377.320336000 but the latest data is at time 1433426377.218335000, when looking up transform from frame [/base_link] to frame [/odom]

My lunch file of mapping_default is:

<launch>
  <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
  <arg name="base_frame" default="base_footprint"/>
  <arg name="odom_frame" default="nav"/>
  <arg name="pub_map_odom_transform" default="true"/>
  <arg name="scan_subscriber_queue_size" default="5"/>
  <arg name="scan_topic" default="scan"/>
  <arg name="map_size" default="2048"/>
  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

<!-- Frame names -->
<!--param name="map_frame" value="map" />
<param name="base_frame" value="$(arg base_frame)" />
<param name="odom_frame" value="$(arg odom_frame)" /-->

<!-- ADD to configure our robot -->
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_link" />
<!--param name="base_stabilized" value="base_link" /-->
    <param name="odom_frame" value="odom" />

<!-- Tf use -->
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>

<!-- Map size / start point -->
<param name="map_resolution" value="0.050"/>
<param name="map_size" value="$(arg map_size)"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="map_multi_res_levels" value="2" />

<!-- Map update parameters -->
<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" />

<!-- Advertising config --> 
<param name="advertise_map_service" value="true"/>

<param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/>
<param name="scan_topic" value="$(arg scan_topic)"/>

<param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />
  </node>

  <!--<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 100"/>-->
</launch>

Please any help thank you in advance ?

edit retag flag offensive close merge delete

Comments

How did you fix this?

Subodh Malgonde gravatar image Subodh Malgonde  ( 2018-10-15 06:33:12 -0600 )edit