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

Multi robot navigation in Nav2

asked 2023-02-28 19:07:12 -0600

Manirajan gravatar image

updated 2023-03-01 02:58:40 -0600

ljaniec gravatar image

Hi, have tried multi robot navigation with custom robot and maps using ROS 2 ( ROS2 :) ) galactic and Nav2 and navigate_through_poses and follow_waypoints gives below message. robots have base link as <namespace>/base_link. each robot has separate planner, controller, recovery, bt_navigator and costmaps

[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 navigate_to_pose 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.

image description

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-03-01 03:02:48 -0600

ljaniec gravatar image

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:

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.

edit flag offensive delete link more

Comments

Hi Łukasz, Thanks for your comment, navigate_to_pose is working fine and issue with navigate_through_poses

Please find below demo

https://youtu.be/ulvfvl0HIx8

Thanks

Manirajan gravatar image Manirajan  ( 2023-03-01 07:54:33 -0600 )edit

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

ljaniec gravatar image ljaniec  ( 2023-03-08 08:52:42 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2023-02-28 19:07:12 -0600

Seen: 1,540 times

Last updated: Mar 01 '23