Transform failed
Hello. I have a simple tf-tree (sorry, i have not enough point to download picture). May be it is available here.
If no: tf-tree is map -> odom -> base_link -> lazer. When i launch file with gmapping, not always there is an error:
Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future. Requested time 1436451359.820962500 but the latest data is at time 1436451359.720510500, when looking up transform from frame [base_link] to frame [odom].
It happens not always. But when after this file i launch the other contais hector_exploration_node, hector_exploration_planner and hector_costmap, it happens every time.
I changed the use_sim_time parameter: if it is false, there is the error, else there isn't error, but the navigation part(second launch file) only starts and doesn't work (freezes). I did this diagnostic. It works properly.
Edit:
Fist launch file:
<launch>
<node pkg="bot" type="tf_sender.py" name="tf_sender"> </node>
<node pkg="bot" type="vel_sender.py" name="vel_sender"> </node>
<node pkg="hokuyo_node" type="hokuyo_node" name="lidar"> </node>
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"/>
<node pkg="hector_mapping" type="hector_mapping" name="gmapping"> </node>
<node pkg="turtlesim" type="turtle_teleop_key" name="teleop"/> </launch>
Second:
<launch>
<!--node name="static_tf0" pkg="tf"
type="static_transform_publisher" args="2 0 0 0 0 0 /map /base_link 100"/-->
<node pkg="hector_exploration_node" type="exploration_planner_node" <br=""> name="hector_exploration_node" output="screen"> <rosparam file="$(find hector_exploration_node)/config/costmap.yaml" command="load"/> <rosparam file="$(find navigation_car)/costmap_common_params.yaml" command="load" ns="global_costmap"/> <rosparam file="$(find navigation_car)/costmap_common_params.yaml" command="load" ns="local_costmap"/> <rosparam file="$(find navigation_car)/local_costmap_params.yaml" command="load" ns="local_costmap"/> <rosparam file="$(find navigation_car)/global_costmap_params.yaml" command="load" ns="global_costmap"/> <rosparam file="$(find navigation_car)/base_local_planner_params.yaml" command="load"/> <rosparam file="$(find navigation_car)/minimal.yaml" command="load" ns="/costmap_node/costmap"/>
</node>
<node pkg="hector_exploration_controller" type="simple_exploration_controller" name="hector_exploration_controller" output="screen" respawn="true">
<remap from="/cmd_vel" to="/turtle1/cmd_vel"/> </node><node pkg="hector_costmap" type="hector_costmap" name="hector_costmap" output="screen" respawn="false">
<!-- Costmap parameters --> <param name="use_elevation_map" value="false" /> <param name="use_grid_map" value="true" /> <param name="use_cloud_map" value="false" /> <param name="initial_free_cells_radius"
value="0.3" /> </node>
</launch>
does this only happen at the very beginning, when you launch the nodes? Are also concurrently? If it is just at the beginning, it might be because the oldest
/odom->/base_link
transform is about 100ms older than the oldest/map->/odom
transform.Before second launch first lunch work properly, but after launch them (nodes with navigation), it (first launch) started issue the errors unceasingly.
please edit your answer with the order in which you start which launchfiles. also please include the launch files.
Sorry, i wasn't able to issue launch files carefully