Multi robot navigation in Nav2
Hi,
have tried multi robot navigation with custom robot and maps using ROS 2 ( ROS2 :) ) galactic and Nav2 and navigatethroughposes and followwaypoints gives below message. robots have base link as `
[bt_navigator-18] Warning: Invalid frame ID "base_link" passed to canTransform argument source_frame - frame does not exist
[bt_navigator-18] at line 156 in /tmp/binarydeb/ros-galactic-tf2-0.17.4/src/buffer_core.cpp
And navigatetopose action moves the robot to the position and calls recovery server with below messages
[controller_server-20] [ERROR] [1677631324.152204040] [robot2.controller_server]: Failed to make progress
[controller_server-20] [WARN] [1677631324.152314973] [robot2.controller_server_rclcpp_node]: [follow_path] [ActionServer] Aborting handle.
[controller_server-20] [INFO] [1677631324.170587528] [robot2.local_costmap.local_costmap]: Received request to clear entirely the local_costmap
[controller_server-20] [INFO] [1677631324.171202662] [robot2.controller_server]: Received a goal, begin computing control effort.
Please find below rviz and gazebo screenshot and let me know if I messed something.
Thanks!
Asked by Manirajan on 2023-02-28 20:07:12 UTC
Answers
Can you check if the YAML file with parameters have your namespace in the BT Navigator set correctly? E.g. like in this project.
You can try this approach used here for setting it with launchers:
https://github.com/igrak34/TurtleBot2-on-ROS2/blob/main/turtlebot2_nav/launch/nav2.launch.py
https://github.com/igrak34/TurtleBot2-on-ROS2/blob/main/turtlebot2_nav/param/nav2_params.yaml
In nav2_params.yaml
you have odom_topic: /namespace/odom
etc.
In the Nav2 launch file you would have
use_namespace=LaunchConfiguration('use_namespace')
namespace=LaunchConfiguration('namespace')
...
namespaced_params= ReplaceString(
source_file=param_path, replacements={"/namespace":("/",namespace)}
)
namespaced_rviz_config_file = ReplaceString(
source_file=rviz_config_file, replacements={"/tb2": ("/", namespace)})
Also, remember about preparing the RViz file:
Partially copied from my other answer here. You can find it useful, I think.
Asked by ljaniec on 2023-03-01 04:02:48 UTC
Comments
Hi Ćukasz, Thanks for your comment, navigate_to_pose is working fine and issue with navigate_through_poses
Please find below demo
Thanks
Asked by Manirajan on 2023-03-01 08:54:33 UTC
Maybe it is caused by too small values in the parameters in the goal or progress checker plugins? Can you add your TF frames graph to the question? We could check if the base_link
is connected to the rest of the tree like it should
Asked by ljaniec on 2023-03-08 09:52:42 UTC
Comments