Skip to content

Remap two nodes of one executable file with same node name in different namespaces  #806

@iuhilnehc-ynos

Description

@iuhilnehc-ynos

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

$ ros2 run examples_rclcpp_minimal_composition composition_composed \
    --ros-args \
    -r publisher_node:__node:=aaa \
    -r aaa:__ns:=/ns1 \                                     // Must use aaa because of current `Order of Applying Remapping Rules`
    -r subscriber_node:__node:=aaa \
    -r aaa:__ns:=/ns2                                       // bad

Expected behavior

$ ros2 run examples_rclcpp_minimal_composition composition_composed \
    --ros-args \
    -r publisher_node:__ns:=/ns1 \
    -r publisher_node:__node:=aaa \
    -r subscriber_node:__ns:=/ns2 \
    -r subscriber_node:__node:=aaa

$ ros2 node list
/ns1/aaa
/ns2/aaa

Actual behavior

$ ros2 node list
/ns1/aaa
/ns1/aaa

Additional information

Remapping rules are applied in the following order:

    1. Node name remapping
    1. Namespace remapping // Should namespace remapping be the first one?
    1. All other rules

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions