Skip to content

rosbag2 fails to record messages generated directly from IDL #127

Closed
@davidhodo

Description

@davidhodo

Bug report

  • Operating System:
    • MacOS 10.14.5 (Mojave)
  • Installation type:
    • Binaries
  • Version or commit hash:
    • Dashing
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

ROS2 bag fails to subscribe to messages generated directly from .idl files. An example package that creates a simple string message using idl can be found at: ros2_idl_demo. Building the message (idl_msgs) and sample publisher (idl_pub) packages and then running ros2 run idl_pub idl_pub and 'ros2 bag record -a' or 'ros2 bag record /chatter' fails to record the message published from idl_pub.

Expected behavior

davidhodo@Davids-MacBook-Pro:idl_test_ws∫ ros2 bag record /chatter
[INFO] [rosbag2_storage]: Opened database 'rosbag2_2019_06_08-12_29_58'.
[INFO] [rosbag2_transport]: Listening for topics...
[INFO] [rosbag2_transport]: Subscribed to topic '/chatter'
[INFO] [rosbag2_transport]: All requested topics are subscribed. Stopping discovery...

Actual behavior

davidhodo@Davids-MacBook-Pro:idl_test_ws∫ ros2 bag record /chatter
[INFO] [rosbag2_storage]: Opened database 'rosbag2_2019_06_08-12_17_47'.
[INFO] [rosbag2_transport]: Listening for topics...

Additional information

Could this be related to the message type / package name changes when using idl directly as described in this issue?

[UPDATE]
In typesupport_helpers.cpp:99 there is a hardcoded "__msg__" in the generation of the symbol name. Changing this to "__idl__" allows the idl message to be recorded at the expense of no longer working for standard messages. This value should be set based on the package type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions