Skip to content

Allow unnamed composable nodes in XML and YAML frontends - #554

Open
Old-Ding wants to merge 2 commits into
ros2:rollingfrom
Old-Ding:codex/optional-composable-node-name
Open

Allow unnamed composable nodes in XML and YAML frontends#554
Old-Ding wants to merge 2 commits into
ros2:rollingfrom
Old-Ding:codex/optional-composable-node-name

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 11, 2026

Copy link
Copy Markdown

Summary

  • make the regular composable node name attribute optional in the shared XML/YAML parser, matching the Python ComposableNode API
  • omit the constructor argument when no name is provided so the component plugin can use its default name
  • allow unnamed composable lifecycle nodes when autostart is omitted or explicitly disabled
  • continue requiring a lifecycle node name when autostart is enabled or substitution-driven, because lifecycle event handling starts before the container returns the actual default name
  • add XML and YAML regression coverage for the supported and rejected cases

Testing

  • reproduced the regular composable node missing-name AttributeError with both real launch frontends
  • reproduced the original unconditional lifecycle-name rejection with autostart disabled
  • focused real frontend probe: XML/YAML omitted and explicit-false lifecycle autostart cases accepted; both true cases rejected
  • ament_flake8 on both follow-up files
  • ament_pep257 on both follow-up files
  • ament_copyright on both follow-up files
  • python -m py_compile on both follow-up files
  • git diff --check

The repository-native frontend test was not run locally because this Windows environment does not have the compiled ROS message packages or rclpy. The focused probes used the real launch_xml and launch_yaml frontends and replaced only the unavailable ROS import boundary.

@mergify

mergify Bot commented Jul 11, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Allow regular composable nodes to omit the frontend name attribute so the plugin can use its default name.

Keep names required for composable lifecycle nodes because autostart initializes lifecycle event handling before the container can return a default name.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
@Old-Ding
Old-Ding force-pushed the codex/optional-composable-node-name branch from f617e24 to 9ee24b4 Compare July 12, 2026 17:59
Only lifecycle autostart needs a name before the component container returns its default name. Let XML and YAML frontends omit the name when autostart is disabled, while retaining the existing guard for enabled or substituted autostart values.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant