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

Transform data too old when converting from map to odom in nav2_straightline_planner

asked 2021-04-12 00:42:12 -0500

root-robot gravatar image

updated 2022-11-03 06:38:39 -0500

ljaniec gravatar image

Bug report

I was trying to use nav2_straightline_planner as mentioned here: https://navigation.ros.org/plugin_tut...

Required Info:

Operating System: ubuntu20.04

ROS2 Version: foxy

Version or commit hash: a1028c5

Error Log:

[controller_server-4] [INFO] [1617794494.106441780] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794494.107058570] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794494.107080741] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 826s 621000000ns
[controller_server-4] [INFO] [1617794495.106504024] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794495.106999333] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794495.107018282] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 827s 521000000ns
[controller_server-4] [INFO] [1617794496.106503821] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794496.106976139] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794496.106996291] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 828s 621000000ns
[controller_server-4] [INFO] [1617794497.306577073] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794497.307159186] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794497.307185101] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 829s 721000000ns
[controller_server-4] [INFO] [1617794498.306491576] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794498.306999256] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794498.307018059] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 830s 721000000ns
[controller_server-4] [INFO] [1617794499.306503259] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794499.307099119] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794499.307125979] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 831s 721000000ns
[controller_server-4] [INFO] [1617794500.306443555] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794500.307062602] [tf_help]: Transform data too old when converting from map to odom
[controller_server-4] [ERROR] [1617794500.307088974] [tf_help]: Data time: 1617794473s 481323259ns, Transform time: 832s 721000000ns
[controller_server-4] [INFO] [1617794501.306475765] [controller_server]: Passing new path to controller.
[controller_server-4] [ERROR] [1617794501.307010382] [tf_help]: Transform data too old when converting from map to odom

Current Behaviour:

When visualising on rviz2 the planner plans perfectly and also the controller follows the path correctly, but when the bot reaches the end of path neither the controller nor the bt_navigator shows the message "Navigation Succeded " and hence the bot never successfully completes its navigation and keeps on trying to reach the goal.

Ideal Behaviour:

Bot successfully completes its navigation task and [tf_help] error should not come.

Here is my navigation2.yaml file:

amcl:
  ros__parameters:
    use_sim_time: False
    alpha1: 0.2
    alpha2: 0.2
    alpha3: 0.2
    alpha4: 0.2
    alpha5: 0.2
    base_frame_id: "base_footprint"
    beam_skip_distance: 0.5
    beam_skip_error_threshold: 0.9
    beam_skip_threshold: 0.3
    do_beamskip: false
    global_frame_id: "map"
    lambda_short: 0.1
    laser_likelihood_max_dist: 2.0
    laser_max_range: 10.0
    laser_min_range: 0.22
    laser_model_type: "likelihood_field"
    max_beams: 60
    max_particles: 2000
    min_particles: 500
    odom_frame_id: "odom"
    pf_err: 0.05
    pf_z: 0.99
    recovery_alpha_fast: 0.0
    recovery_alpha_slow: 0.0
    resample_interval: 1
    robot_model_type: "differential"
    save_pose_rate: 0.5
    sigma_hit: 0.2
    tf_broadcast: true
    transform_tolerance: 1.0  
    update_min_a: 0.2
    update_min_d: 0.25
    z_hit: 0.5
    z_max: 0.05
    z_rand: 0.5
    z_short: 0.05
    scan_topic ...
(more)
edit retag flag offensive close merge delete

Comments

1

Hi! I am facing the same problem with straight_line_planner, Did you find solution?

igrak34 gravatar image igrak34  ( 2022-11-03 06:04:12 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2022-11-03 07:19:36 -0500

igrak34 gravatar image

I found the solution. It simply requires to comment the

global_path.poses.push_back(goal);

in the straight_line_planner.cpp file (line 136).

After that, planner works flawlessly.

edit flag offensive delete link more
0

answered 2022-11-03 06:31:08 -0500

ljaniec gravatar image

updated 2022-11-03 06:36:46 -0500

It looks like this one tutorial for straigh_line_plannerhttps://github.com/ros-planning/navig... has not been updated in the last ~2 years, when was the last time it worked flawlessly?

I tried it on ROS2 Galactic and it failed to get the robot to move - it claimed the goal was reached without any movement to the goal.

Path planner was working, I could see the path in the RViz.

EDIT: Related issue from Nav2 repo:

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-04-12 00:39:18 -0500

Seen: 369 times

Last updated: Nov 03 '22