ROS2 bag record issue
I have a custom ROS2 message, which I built and sourced correctly and it successfully publishes and subscribes on the node I create. However, when I try to record the bag files using
ros2 bag record -topicname
it throws this error,
Failed to record: Something went wrong loading the typesupport library for message type package_name/msgname. Library could not be found.
I don't know why this error, is it because it is a custom message? Or is it because I need to link the custom messages somewhere?
I played around a bit myself with this, if you've properly sourced the package with the ROS2 message, there shouldn't be any issues. I tried running
ros2 bag
without sourcing the ROS2 message being published, but I don't get this error, it just hangs listening for topics.If you are properly sourced,
ros2 topic echo /your_topic
should work. Otherwise, this might be a bug.This ticket might be related: https://github.com/ros2/rosbag2/issue...