FaciRob / ROS 2 source explorer
A real TurtleBot3 standalone launch issue
Choose another public issue case
TurtleBot3 · Public launch issue · Reviewed local correction
The state-publisher launcher reads namespace without a local declaration or default. The reported direct launch fails unless an external caller supplies that value.
Read upstream issue #1149 · Inspect the pinned source · Existing upstream proposed fix #1150
TurtleBot3 is ROBOTIS's mobile-robot platform. At capture its public repository had 2,078 stars and 1,188 forks. These are public interest signals, not clone counts or customer validation.
The issue and existing proposed fix were open when checked on 18 October 2026. This comparison uses current main snapshot fc817ce3073af1d6032397c64504134882af5e9a; it does not track later changes. The issue reporter already described the cause and proposed correction.
- Reported standalone failure
Direct launch reports that the namespace configuration does not exist.
- Check local argument requirements
RD304 identifies a literal configuration with no local declaration, assignment, or substitution default.
- Declare an empty default
Add the namespace argument and default while retaining the same named substitution for caller overrides.
Before the correction: the source-backed finding
This check is informational: included launch files may intentionally inherit values from a parent. Source review and the existing issue establish why standalone use matters here.
infoRD304confidence 80%Launch configuration requires external context
Launch configuration 'namespace' has no local declaration, assignment, or substitution default in this file. A parent launch or command-line value may supply it; direct launch requires review.
Inspect turtlebot3_bringup/launch/turtlebot3_state_publisher.launch.py:33
Recommended repair: Review the launch entry point and either declare the argument, provide a safe default, or document the caller-supplied value.
- Check whether this file is intended to run directly or only through a parent launch.
- For standalone use, declare the argument with an appropriate default; preserve explicit caller overrides.
Commands to verify
ros2 launch turtlebot3_bringup turtlebot3_state_publisher.launch.py --show-argsSuggested files: turtlebot3_bringup/launch/turtlebot3_state_publisher.launch.py
Patch hint
DeclareLaunchArgument('namespace', default_value='<reviewed-default>')Source evidence
| File | Line | Extractor | Snippet |
|---|---|---|---|
| turtlebot3_bringup/launch/turtlebot3_state_publisher.launch.py | 33 | python_launch_configuration | |
The reviewed local correction
turtlebot3_bringup/launch/turtlebot3_state_publisher.launch.py
- namespace = LaunchConfiguration('namespace')
+ namespace = LaunchConfiguration('namespace', default='')
+ DeclareLaunchArgument(
+ 'namespace',
+ default_value='',
+ description='Robot namespace'),
The empty default permits an omitted namespace, and the declaration exposes it as a launch argument. The substitution still uses the name namespace so a caller can provide a value such as tb1. This is a local reproduction of the already proposed upstream approach.
After the correction: the local requirement finding is absent
Target finding: 1 → 0. Informational findings: 6 → 5. Other diagnostics remain, including an unrelated error; the repository is not declared healthy.
The corrected file parses as Python. AST checks verify the empty substitution default, namespace declaration, and unchanged named binding for overrides. Only this launch file changes, and every unrelated diagnostic is identical.
Verification boundary: no ROS build, launch, simulation, or physical robot test was run. The TURTLEBOT3_MODEL environment variable is still required. Omitted and explicit namespace values still need separate ROS launch tests.
How the analyzer improved for this case
The original detector at 48cb3c1 missed this condition. The generic RD304 check recognizes imported Python LaunchConfiguration calls with literal names, without executing them. Declarations, local assignments through SetLaunchConfiguration, and substitution defaults prevent a finding; dynamic or shadowed APIs are handled conservatively. No TurtleBot3 names were added to detector rules. This is an issue-guided reproduction, not blind discovery.
Evidence and reproduction
Case provenanceOriginal detector scanImproved detector: beforeImproved detector: after
Repeat with tools/run_turtlebot3_case_study.py and the pinned source. Reproduction instructions · Upstream attribution · Apache-2.0 license. No upstream comment or pull request has been submitted by this work.