Bag files invalid
When I play mkz_20151207.bag and try to echo topic /can_bus_dbw/can_rx I get the error:
ERROR: Cannot load message class for [dataspeed_can_msgs/CanMessageStamped]. Are your messages built?
Upon further investigation, I found can_msgs_migration.md in dataspeed_can which says that frame format is obsolete in favor of can_msgs/Frame and that I can convert an old bag with 'rosbag fix old.bag new.bag'. But, when I run rosbag fix mkz_20151207.bag mkz_20151207_fixed.bag', I get this error message:
Bag could not be migrated. The following migrations could not be performed: * From: dataspeed_can_msgs/CanMessageStamped [33747cb98e223cafb806d7e94cb4071f] To: Unknown 1 rules missing: * From: dataspeed_can_msgs/CanMessageStamped [33747cb98e223cafb806d7e94cb4071f] To: Unknown Try running 'rosbag check' to create the necessary rule files or run 'rosbag fix' with the '--force' option.
Running 'rosbag check mkz_20151207.bag' produces:
The following migrations need to occur: * From: dataspeed_can_msgs/CanMessageStamped [33747cb98e223cafb806d7e94cb4071f] To: Unknown 1 rules missing: * From: dataspeed_can_msgs/CanMessageStamped [33747cb98e223cafb806d7e94cb4071f] To: Unknown
To generate rules, please run with -g <rulefile>
I don't know how to provide this rule and can_msgs_migration.md seems to imply it should just be available as part of the package. Plus, "Unknown" seems like the wrong target any way.
How can I successfully play back the ROS bags provided in dbw_mkz_ros? (Or any example ROS bag; I'm just trying to produce example output prior to connecting to our actual hardware)
Comments (4)
-
-
reporter I got started on this machine by running the "One Line ROS and SDK Install (binary)" in ROS_SETUP.md, but indeed that seems to be missing ros-kinetic-dataspeed-can-msgs which the above command resolves. Upon installation of that package, rosbag fix works, and playing back that fixed bag seems to make everything work properly.
I'd recommend updating the install script to include this missing package + include instructions about rosbag fix in ROS_BAGS.md, or just fix the bags linked from ROS_BAGS.md (the ros-kinetic-dataspeed-can-msgs package wouldn't be needed for the fixed bag, right?) But regardless, all the problems in my individual setup have been resolved -- thanks!
-
The
dataspeed_can_msgs
package is not normally needed, so I'll just add a note about installing it in the bag fix tutorials.I'll probably upload newer bags soon too.
Good to hear you got it working.
-
- changed status to resolved
- Log in to comment
Make sure that you have both message types installed. The migration rule is part of
dataspeed_can_msgs
.We also provide a simulator that generates CAN traffic. It does not support all messages, but it's a good start.
https://bitbucket.org/DataspeedInc/dbw_mkz_simulation