Hello,
Right now Navigation2 minimal demo of the simulation with multiple mobile robots with Nav2 stacks doesn't seem to work at all. Every goal is rejected by server, on both robots, every time. I tried to find a bug there but I don't know how to fix it.
I have used:
- Ubuntu 20.04
- ROS2 Galactic (binaries)
Steps to reproduce:
- Source ROS, your workspace and start the script:
ros2 launch nav2_bringup multi_tb3_simulation_launch.py
Click 'Startup' in both RViz for Nav2 stack and set initial poses for both TB3s.
Try to give any sensible Nav2 goal to
robot1
orrobot2
Expected behavior - similar to these from single TB3 demo:
[rviz2-4] Start navigation
[rviz2-4] [INFO] [1638358971.369842831] [_]: NavigateToPose will be called using the BT Navigators default behavior tree.
[bt_navigator-11] [INFO] [1638358971.371246080] [bt_navigator]: Begin navigating from current location to (-1.15, -0.68)
[controller_server-8] [INFO] [1638358971.392980651] [controller_server]: Received a goal, begin computing control effort.
[controller_server-8] [WARN] [1638358971.393121450] [controller_server]: No goal checker was specified in parameter 'current_goal_checker'. Server will use only plugin loaded general_goal_checker . This warning will appear once.
[controller_server-8] [INFO] [1638358972.443702721] [controller_server]: Passing new path to controller.
[controller_server-8] [INFO] [1638358973.493587536] [controller_server]: Passing new path to controller.
[controller_server-8] [INFO] [1638358973.849973317] [controller_server]: Reached the goal!
[bt_navigator-11] [INFO] [1638358973.881616953] [bt_navigator]: Goal succeeded
Chosen TB3 navigates to the goal.
Actual behavior
Every goal is rejected by server, on both robots, every time.
(...)
[rviz2-4] Start navigation
[rviz2-4] [INFO] [1638358155.906285384] [robot1._]: NavigateToPose will be called using the BT Navigator's default behavior tree.
[rviz2-4] [ERROR] [1638358155.908410790] [robot1._]: Goal was rejected by server
(...)
When I have tried to find the error source, I have found these lines in terminal log:
[waypoint_follower-24] [FATAL] [1642597452.744755801] [robot2.waypoint_follower]: Can not get 'plugin' param value for wait_at_waypoint
[ERROR] [waypoint_follower-24]: process has died [pid 45587, exit code 255, cmd '/opt/ros/galactic/lib/nav2_waypoint_follower/waypoint_follower --ros-args -r __node:=waypoint_follower -r __ns:=/robot2 --params-file /tmp/tmpvn927bmw -r /tf:=tf -r /tf_static:=tf_static'].
...
[rviz2-15] Start navigation
[rviz2-15] [INFO] [1642597504.499973379] [robot2._]: NavigateToPose will be called using the BT Navigators default behavior tree.
[rviz2-15] [ERROR] [1642597504.500514584] [robot2._]: Goal was rejected by server
...
[waypoint_follower-13] [INFO] [1642597516.141306448] [robot1.waypoint_follower]: Configuring
[waypoint_follower-13] [FATAL] [1642597516.153151747] [robot1.waypoint_follower]: Can not get 'plugin' param value for wait_at_waypoint
[ERROR] [waypoint_follower-13]: process has died [pid 45413, exit code 255, cmd '/opt/ros/galactic/lib/nav2_waypoint_follower/waypoint_follower --ros-args -r __node:=waypoint_follower -r __ns:=/robot1 --params-file /tmp/tmpj1a15_ie -r /tf:=tf -r /tf_static:=tf_static'].
...
rviz2-15] Start navigation
[rviz2-15] [INFO] [1642597562.923893887] [robot2._]: NavigateToPose will be called using the BT Navigators default behavior tree.
[rviz2-15] [ERROR] [1642597562.924373425] [robot2._]: Goal was rejected by server
[rviz2-4] Start navigation
[rviz2-4] [INFO] [1642597567.179889265] [robot1._]: NavigateToPose will be called using the BT Navigators default behavior tree.
[rviz2-4] [ERROR] [1642597567.180410933] [robot1._]: Goal was rejected by server
It seems like something in the waypoint_follower
isn't configured correctly (plugin param value for wait_at_waypoint
?).
How should I try to fix it (in the configuration?)?
I asked it a while ago there: https://github.com/ros-planning/navigation2/issues/2719
But I didn't have time to check it closer until now.
EDIT 1:
Version of my Nav2 packages - everything was installed through sudo apt-get install ros-galactic-nav2*
- I supposed it was enough to get last. Maybe I was wrong there.
I have used the launch file from nav2_bringup
called multi_tb3_simulation_launch.py
without changes. I will compare this version with the newest in the Nav2 repository.
EDIT 2:
The simulation started working after updating in the nav2_bringup
package on the branch galactic
the YAML files (nav2_multirobot_params_1.yaml
and nav2_multirobot_params_2.yaml
in the folder params
) with:
waypoint_follower:
ros__parameters:
loop_rate: 20
stop_on_failure: false
waypoint_task_executor_plugin: "wait_at_waypoint"
wait_at_waypoint:
plugin: "nav2_waypoint_follower::WaitAtWaypoint"
enabled: True
waypoint_pause_duration: 200
at the end (similar to the nav2_params.yaml
).
I guess the binary version installed through sudo apt-get install ros-galactic-nav2-bringup
has the same incorrect parameters for multi-robot simulation there.
Originally posted by ljaniec on ROS Answers with karma: 3064 on 2022-01-20
Post score: 0