ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Transform failed

asked 2015-07-09 10:57:08 -0500

flaminga gravatar image

updated 2015-07-10 03:58:35 -0500

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>

edit retag flag offensive close merge delete

Comments

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.

mgruhler gravatar image mgruhler  ( 2015-07-10 01:17:47 -0500 )edit

Before second launch first lunch work properly, but after launch them (nodes with navigation), it (first launch) started issue the errors unceasingly.

flaminga gravatar image flaminga  ( 2015-07-10 02:06:01 -0500 )edit

please edit your answer with the order in which you start which launchfiles. also please include the launch files.

mgruhler gravatar image mgruhler  ( 2015-07-10 03:37:12 -0500 )edit

Sorry, i wasn't able to issue launch files carefully

flaminga gravatar image flaminga  ( 2015-07-10 04:02:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-09 10:27:34 -0500

you should put these lines to your code: <broadcasttf>1</broadcasttf> <odometryframe>odom</odometryframe>

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-09 10:57:08 -0500

Seen: 2,402 times

Last updated: Jul 10 '15