-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Robot Model
Turtlebot4 Lite
ROS distro
Humble
Networking Configuration
I do not know
OS
Ubuntu 22.04
Built from source or installed?
Installed
Package version
Most recent package version (updated today)
Type of issue
Navigation (SLAM, Nav2 etc.)
Expected behaviour
When running docking commands (from turtlebot4_navigation) on a second turtlebot in the simulations, it should dock correctly or identify if it is docked already.
It also will not connect to the second turtlebot.
Actual behaviour
The problem seems to be this block of code:
Start docked if not already
if not naviturt.getDockedStatus():
naviturt.info("Docking for start")
naviturt.dock()
The second turtlebot that is manually spawned, which starts docked, starts to spin (does not move laterally) until it fails the docking process.
In addition, it does not seem to be able to find the second turtlebot, even when the docking block is commented out.
Error messages
[INFO] [1715708891.541648342] [robot2.basic_navigator]: Docking before initialising pose
[INFO] [1715708891.542475943] [robot2.basic_navigator]: Docking...
[INFO] [1715708925.172902338] [robot2.basic_navigator]: Goal with failed with status code: None
[INFO] [1715708925.174651407] [robot2.basic_navigator]: Publishing Initial Pose
[INFO] [1715708927.225206005] [robot2.basic_navigator]: Setting initial pose
[INFO] [1715708927.226342431] [robot2.basic_navigator]: Publishing Initial Pose
[INFO] [1715708927.227725556] [robot2.basic_navigator]: Waiting for amcl_pose to be received
[INFO] [1715708927.229177251] [robot2.basic_navigator]: Setting initial pose
[INFO] [1715708927.230112375] [robot2.basic_navigator]: Publishing Initial Pose
[INFO] [1715708927.231118124] [robot2.basic_navigator]: Waiting for amcl_pose to be received
[INFO] [1715708927.232138761] [robot2.basic_navigator]: Setting initial pose
[INFO] [1715708927.232963335] [robot2.basic_navigator]: Publishing Initial Pose
[INFO] [1715708927.233806636] [robot2.basic_navigator]: Waiting for amcl_pose to be received
This is repeated forever and the turtlebot is never recognizedTo Reproduce
- Spin up a turtlebot in the simulator using
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py namespace:=robot1 x:=0.0 y:=1.0 model:=lite nav2:=true slam:=false localization:=true rviz:=true - Spawn a second turtlebot in the simulator using
ros2 launch turtlebot4_ignition_bringup turtlebot4_spawn.launch.py namespace:=/robot2 x:=0.0 y:=0.0 model:=lite nav2:=true slam:=false localization:=true rviz:=true - Run something that uses docking navigation; I am running it like so:
ros2 run my_nav my_nav_py_node --ros-args -r __ns:=/robot2 - See the problem
Other notes
I know the problem is probably not the starting position (I start the second turtlebot at (0, 0) and it still does not work).
It works fine for the first turtlebot, although it is possible I am somehow messing up namespacing.
Any ideas help a bunch!
Thanks!