ros2 bag record native (RTI) DDS topics

asked 2022-04-20 05:34:46 -0600

lmiller gravatar image

updated 2022-04-20 05:57:00 -0600

Hello,

I have a device speaking native DDS (RTI 6.0.1) and another speaking ROS2 Galactic.

The device talking native DDS sends me the topic /joint_states from type sensor_msgs::msg::JointState

Communication between those work and I can send messages between them. Now I want to record multiple topics with the ros2 bag record command. But I got an error cause of message type error:

$ ros2 bag record /joint_states /some_topics /some_other_topics
[INFO] [1650450066.704245832] [rosbag2_storage]: Opened database 'rosbag2_2022_04_20-12_21_06/rosbag2_2022_04_20-12_21_06_0.db3' for READ_WRITE.
[INFO] [1650450066.704330117] [rosbag2_recorder]: Listening for topics...
[INFO] [1650450066.705113237] [rosbag2_cpp]: Writing remaining messages from cache to the bag. It may take a while
Message type is not of the form package/type and cannot be processed

I know that the ros2 topic echo has the opportunity to set the message type e.g.:

$ ros2 topic echo /joint_states
The message type 'sensor_msgs::msg::JointState' is invalid

but with message_definition it works

$ ros2 topic echo /joint_states sensor_msgs/msg/JointState

Is there something like this for the ros2 bag record command? Or is there another way to record native DDS messages to a bag file?

edit retag flag offensive close merge delete