Discussion - Nav2 Introduction (Making a Mobile Robot Pt 16)

hello community
When I launch

ros2 launch nav2_bringup navigation_launch.py use_sim_time:=true

and use 2D Goal Pose
There will be a problem.

[planner_server-3] [INFO] [1703402794.884508361] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[planner_server-3] [ERROR] [1703402796.096544021] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future.  Requested time 1703402745.783910 but the latest data is at time 731.607000, when looking up transform from frame [odom] to frame [map]
[planner_server-3] 
[planner_server-3] [WARN] [1703402796.096618534] [planner_server]: Could not transform the start or goal pose in the costmap frame
[planner_server-3] [WARN] [1703402796.096663225] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
[behavior_server-4] [INFO] [1703402796.112731234] [behavior_server]: Running backup
[behavior_server-4] [WARN] [1703402806.118608888] [behavior_server]: Exceeded time allowance before reaching the DriveOnHeading goal - Exiting DriveOnHeading
[behavior_server-4] [WARN] [1703402806.118794687] [behavior_server]: backup failed
[behavior_server-4] [WARN] [1703402806.118853410] [behavior_server]: [backup] [ActionServer] Aborting handle.
[controller_server-1] [INFO] [1703402806.167201610] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap
[planner_server-3] [INFO] [1703402806.194430683] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[bt_navigator-5] [WARN] [1703402806.270823741] [bt_navigator_navigate_to_pose_rclcpp_node]: Timed out while waiting for action server to acknowledge goal request for compute_path_to_pose
[planner_server-3] [INFO] [1703402806.275882344] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[planner_server-3] [ERROR] [1703402807.097615127] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future.  Requested time 1703402745.783910 but the latest data is at time 736.232000, when looking up transform from frame [odom] to frame [map]
[planner_server-3] 
[planner_server-3] [WARN] [1703402807.103436113] [planner_server]: Could not transform the start or goal pose in the costmap frame
[planner_server-3] [WARN] [1703402807.103546444] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
[behavior_server-4] [INFO] [1703402807.169281308] [behavior_server]: Running spin
[behavior_server-4] [INFO] [1703402807.169574092] [behavior_server]: Turning 1.57 for spin behavior.
[behavior_server-4] [INFO] [1703402810.275975743] [behavior_server]: spin completed successfully
[planner_server-3] [ERROR] [1703402811.187078389] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future.  Requested time 1703402745.783910 but the latest data is at time 738.292000, when looking up transform from frame [odom] to frame [map]
[planner_server-3] 
[planner_server-3] [WARN] [1703402811.194227126] [planner_server]: Could not transform the start or goal pose in the costmap frame
[planner_server-3] [WARN] [1703402811.194322182] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
[planner_server-3] [INFO] [1703402811.262905966] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[bt_navigator-5] [WARN] [1703402811.268427021] [bt_navigator_navigate_to_pose_rclcpp_node]: Node timed out while executing service call to global_costmap/clear_entirely_global_costmap.
[bt_navigator-5] [ERROR] [1703402811.269075529] [bt_navigator]: Goal failed
[bt_navigator-5] [WARN] [1703402811.269169754] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.

And then you just run the rotation, and all of a sudden the wheel rolls back.
What should I do?
I’m using humble

Im facing the issue on real robot , the same error message you received . Any advice on how you solved it ?

change spawner.py to spawner in the launch file

Hi Josh,

I have the following problem. Simulatioin has the following Problem, it is possible that real robot also.
If I start my system following your great tutorial every thing works.

If I leave the system for half an hour or more I see my robot on other place without action from my side. After some hours it is on completely different place.

What can I do to overcome this drift ?

Thank you very much in advance!

Cheers,
Ivo

Hi
Just a small query regarding waypoints. So I see how you manually assigned goal pose which the bot was following. I was wondering if there is any way to put multiple waypoints and then save it in the map itself. So that next time I run the simulation the bot follows the same trajectory from the same input goal poses or waypoints. This way I can actually have a fully autonomous simulation model.

I hae a question, If we are using ros2 navigation stack how it is communicating with the hardware. I do know that we have to write the custom hardware interface but how to move motors according the path planning plugins. I am working on similar project. I was able to connect my robot with Arduino through serial communication but I don’t know how to move the motors according the navigation2 path plan.
is there any arduino code.

what I am trying to do is send the encoded values to custom interface, for odometery but I have no idea what commands should be send to arduino, so it can move according to the path planning given by rviz2

Is it possible to use different path tracking algorithm, such as pure pursuit or standley, instead of nav2?

Hello
Thank you for your tutorial set. Thanks to that I finally understood basic levels of nav2. I am trying to create a custom behaviour tree using existing behaviour nodes. However, when I try to give the path to this custom file, it always takes the default nav2 BT. I tried the tutorials of Nav2 website but still not clear on what to do. Could you kindly give me the step by step process on how to give the link to my custom created BT? It would be a grate help!

Continuing the discussion from Discussion - Nav2 Introduction (Making a Mobile Robot Pt 16):

hi , I m really in need of help in navigation, the map creation using slam is perfect but when i try to navigate by giving the goal i m getting exploartion errors, Behavior Tree tick rate,etc and not moving an inch .Every other terminal seems to be working fine except the nav2 terminal

[bt_navigator-5] [INFO] [1743701696.297607268] [bt_navigator]: Begin navigating from current location (-2.62, -0.08) to (-1.36, 0.01)
[planner_server-3] [ERROR] [1743701696.761987230] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1743701696.294112 but the latest data is at time 844.250000, when looking up transform from frame [odom] to frame [map]
[planner_server-3]
[planner_server-3] [WARN] [1743701696.762257369] [planner_server]: Could not transform the start or goal pose in the costmap frame
[planner_server-3] [WARN] [1743701696.762371245] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
[planner_server-3] [INFO] [1743701696.782962024] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[planner_server-3] [ERROR] [1743701697.872118599] [transformPoseInTargetFrame]: Extrapolation Error looking up target frame: Lookup would require extrapolation into the future. Requested time 1743701696.294112 but the latest data is at time 845.050000, when looking up transform from frame [odom] to frame [map]
[planner_server-3]
[planner_server-3] [WARN] [1743701697.874073618] [planner_server]: Could not transform the start or goal pose in the costmap frame
[planner_server-3] [WARN] [1743701697.874485703] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
[controller_server-1] [INFO] [1743701697.888284498] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap
[planner_server-3] [INFO] [1743701697.890384788] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[bt_navigator-5] [WARN] [1743701698.799354508] [BehaviorTreeEngine]: Behavior Tree tick rate 100.00 was exceeded!

The errors still goes…

i finally made it to work,it was just a silly mistake,What happened was when running the twist mux, instead of cmd_vel_unstamped i typed cmd_vel_unstamed.Yes a typo , so someone had any kind of error check for the spellings of the command