Skip to content

Message namespaces returned from rmw layer are always 'msg' #677

@jacobperron

Description

@jacobperron

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS and RTI Connext
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

Not the most succinct example, but demonstrates the roadblock for the forthcoming action graph API:

  1. Check out new action graph API rcl (branch: action_graph).

    mkdir -p action_graph_ws/src
    cd action_graph_ws
    git clone https://github.com/ros2/rcl -b action_graph src/rcl

  2. Build (overlay on existing ros2 workspace)

     . ~/ros2_ws/install/setup.bash
     colcon build
    
  3. Run the rcl_action graph test with Fast-RTPS, Connext, and Opensplice

     . install/local_setup.bash
     build/rcl_action/test_graph__rmw_fastrtps_cpp
     RMW_IMPLEMENTATION=rmw_connext_cpp build/rcl_action/test_graph__rmw_connext_cpp
     RMW_IMPLEMENTATION=rmw_opensplice_cpp build/rcl_action/test_graph__rmw_opensplice_cpp
    

Actual behavior

The Fast-RTPS and Connext tests pass, but the OpenSplice test fails due to unexpected message types, e.g.

    Expected equality of these values:
      nat.types[0].data[0]
        Which is: "test_msgs::action::dds_::Fibonacci_"
      "test_msgs/Fibonacci"

This occurs because the type demangling in the rmw layer expects to find the msg namespace, but finds an action namespace instead:

https://github.com/ros2/rmw_opensplice/blob/b38080cf4927aad0313edeab16e5eadab6f15cf9/rmw_opensplice_cpp/src/demangle.cpp#L39

Expected behavior

It turns out that OpenSplice is exhibiting the correct behavior, since the action message types are defined in the action namespace.

The tests are incorrectly passing for Fast-RTPS and Connext as they report that the action types are in the msg namespace (which they are not).

Additional information

Looking closer at the rmw_fastrtps and rmw_connext, we see that they hard-code registered topics and services with the namespace msg and srv respectively:

https://github.com/ros2/rmw_fastrtps/blob/c9e496560d098b0de2e12aee9af31b1b990156ce/rmw_fastrtps_cpp/src/rmw_publisher.cpp#L104

https://github.com/ros2/rmw_fastrtps/blob/c9e496560d098b0de2e12aee9af31b1b990156ce/rmw_fastrtps_cpp/src/rmw_service.cpp#L118-L119

https://github.com/ros2/rmw_connext/blob/43d6833977ddfc3d8fa599a51c7b01bcb3008fa3/rmw_connext_cpp/src/rmw_publisher.cpp#L87

Although OpenSplice has a similar implementation:

https://github.com/ros2/rmw_opensplice/blob/b38080cf4927aad0313edeab16e5eadab6f15cf9/rmw_opensplice_cpp/src/rmw_publisher.cpp#L105

It is not immediately clear why it exhibits the correct behavior; more investigation is required.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions