ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
517 stars 525 forks source link

message definition mismatch between rosserial python and cpp #548

Open YoannVarquet opened 3 years ago

YoannVarquet commented 3 years ago

I used to have my rosserial in python (rosserial_python), and I switched to the cpp (rosserial_server) yesterday. I made a bag of the data collected by the arduino, and I get mismatch message definition.

The message type is [std_msgs/Int8]. I can rostopic echo the messages when I replay the bag, but when I import it in plotjuggler OR I try to fix an active bag, they both complain about the message type.

Typically:

$ rosbag fix issue_arduino_2021_02_25_16_23_47.bag.active repaired.bag
WARNING: For type [std_msgs/Int8] stored md5sum [27ffa0c9c4b8fb8492252bcad9e5c57b] does not match message definition [d41d8cd98f00b204e9800998ecf8427e].
  Try: "rosrun rosbag fix_msg_defs.py old_bag new_bag."
Bag could not be migrated.  The following migrations could not be performed:
 * From: std_msgs/Int8 [d41d8cd98f00b204e9800998ecf8427e]
   To:   std_msgs/Int8 [27ffa0c9c4b8fb8492252bcad9e5c57b]
    1 rules missing:
     * From: std_msgs/Int8 [d41d8cd98f00b204e9800998ecf8427e]
       To:   std_msgs/Int8 [27ffa0c9c4b8fb8492252bcad9e5c57b]
Try running 'rosbag check' to create the necessary rule files or run 'rosbag fix' with the '--force' option.

Similarly on plotjjugler : download

running the recommended "fix_msg_defs.py" seems to solve the mismatch

$ rosrun rosbag fix_msg_defs.py issue_arduino_2021_02_25_16_23_47.bag fixed_bag.bag
WARNING: For type [std_msgs/Int8] stored md5sum [27ffa0c9c4b8fb8492252bcad9e5c57b] does not match message definition [d41d8cd98f00b204e9800998ecf8427e].
 Try: "rosrun rosbag fix_msg_defs.py old_bag new_bag."
FOUND: std_msgs/Int8 [27ffa0c9c4b8fb8492252bcad9e5c57b] was defined on your package path

A possible explanation is that the ros lib on arduino is the v0.9.1 whereas the rosserial_server is on kinetic (v0.7.7).

Anyone else experiencing that?

Cheers, Yoann