Operating System
Ubuntu 22.04 (ROS 2 Humble, ros-humble-turtlebot3-bringup 2.3.6)
Description
turtlebot3_bringup/launch/turtlebot3_state_publisher.launch.py reads
LaunchConfiguration('namespace') but never declares it and gives it no default
value. As a result the file can only be used when it is included from
robot.launch.py, which passes the argument explicitly. Launching it directly
fails before any node starts.
To reproduce
export TURTLEBOT3_MODEL=burger
ros2 launch turtlebot3_bringup turtlebot3_state_publisher.launch.py
urdf_file_name : turtlebot3_burger.urdf
[ERROR] [launch]: Caught exception in launch (see debug for traceback):
launch configuration 'namespace' does not exist
Where it comes from
Introduced in d81e95a
("Add namespace argument for multi robot control in turtlebot3 bringup launch",
2025-02-03).
That commit added both LaunchConfiguration('namespace', default='') and a
matching DeclareLaunchArgument('namespace', ...) to robot.launch.py, but added
only the LaunchConfiguration to turtlebot3_state_publisher.launch.py. The two
files are therefore inconsistent, and the child launch file depends on the parent to
supply the argument.
The affected file is byte-identical on main, jazzy and humble, so all three
branches are affected.
Impact
Any package that includes turtlebot3_state_publisher.launch.py without passing
namespace now fails. For example StanfordASL/asl-tb3-driver
(launch/bringup.launch.py) includes it with no launch arguments.
This may also be related to #1104, which reported a launch failure in this area and
was closed without a code change.
Suggested fix
Apply to turtlebot3_state_publisher.launch.py the same pattern already used in
robot.launch.py: give namespace a default and declare it. This keeps the
multi-robot behaviour intact (empty namespace when the argument is omitted,
namespace:=tb1 still prefixing frames) and additionally makes the argument visible
in ros2 launch ... --show-args.
A pull request with this change is attached.
Operating System
Ubuntu 22.04 (ROS 2 Humble,
ros-humble-turtlebot3-bringup2.3.6)Description
turtlebot3_bringup/launch/turtlebot3_state_publisher.launch.pyreadsLaunchConfiguration('namespace')but never declares it and gives it no defaultvalue. As a result the file can only be used when it is included from
robot.launch.py, which passes the argument explicitly. Launching it directlyfails before any node starts.
To reproduce
export TURTLEBOT3_MODEL=burger ros2 launch turtlebot3_bringup turtlebot3_state_publisher.launch.pyWhere it comes from
Introduced in d81e95a
("Add namespace argument for multi robot control in turtlebot3 bringup launch",
2025-02-03).
That commit added both
LaunchConfiguration('namespace', default='')and amatching
DeclareLaunchArgument('namespace', ...)torobot.launch.py, but addedonly the
LaunchConfigurationtoturtlebot3_state_publisher.launch.py. The twofiles are therefore inconsistent, and the child launch file depends on the parent to
supply the argument.
The affected file is byte-identical on
main,jazzyandhumble, so all threebranches are affected.
Impact
Any package that includes
turtlebot3_state_publisher.launch.pywithout passingnamespacenow fails. For exampleStanfordASL/asl-tb3-driver(
launch/bringup.launch.py) includes it with no launch arguments.This may also be related to #1104, which reported a launch failure in this area and
was closed without a code change.
Suggested fix
Apply to
turtlebot3_state_publisher.launch.pythe same pattern already used inrobot.launch.py: givenamespacea default and declare it. This keeps themulti-robot behaviour intact (empty namespace when the argument is omitted,
namespace:=tb1still prefixing frames) and additionally makes the argument visiblein
ros2 launch ... --show-args.A pull request with this change is attached.