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?