# Where does "rosmsg md5" get the md5sum from?

I am trying to get my robot to work with my pc, which have two different ROS versions (due to circumstances I am not able to upgrade the robot). Therefore in a message I use, the md5sum is different and it gives the following error:

Client [/move_group] wants topic /move_group/goal to have datatype/md5sum [moveit_msgs/MoveGroupActionGoal/af242119c3633849fe07bc300952a4c0], but our version has [moveit_msgs/MoveGroupActionGoal/df11ac1a643d87b6e6a6fe5af1823709]. Dropping connection.


I figured out that the .msg file on the robot has one line missing, which is present on the .msg file on my pc. This results in the md5 hash to be different. So I tried deleting the line in the .msg file on my pc and "catkin build" my package. Now running:

rosmsg show moveit_msgs/MoveGroupActionGoal | grep max_acceleration_scaling_factor


Gives me nothing, which means that this line is correctly deleted in the message. However when I now run:

rosmsg md5 moveit_msgs/MoveGroupActionGoal


It still gives me:

df11ac1a643d87b6e6a6fe5af1823709


Which means that it gets the md5sum from somewhere else. What I found is that in the "MoveGroupActionGoal.h" header file the md5sum is hard coded. Here I changed the return value in the MD5Sum from "df11ac1a643d87b6e6a6fe5af1823709" to "af242119c3633849fe07bc300952a4c0".

However after using "catkin build" in my package and again running:

rosmsg md5 moveit_msgs/MoveGroupActionGoal


Still gives me the wrong md5sum, hence my question is where does "rosmsg md5 moveit_msgs/MoveGroupActionGoal" gets its md5sum from? Apparently not from the .msg file and not from the header file. Thanks a lot in advance for answering.

edit retag close merge delete

Sort by » oldest newest most voted

where does "rosmsg md5 moveit_msgs/MoveGroupActionGoal" gets its md5sum from?

There are numerous Q&As that answer this, see #q233654 and #q308593 for instance.

As to your problem: hacking the hashes into files is not going to be a very robust or maintainable approach. Those hashes are used for compatibility checks, and changing the hash will lead to data corruption in the end.

I figured out that the .msg file on the robot has one line missing, which is present on the .msg file on my pc. This results in the md5 hash to be different. So I tried deleting the line in the .msg file on my pc and "catkin build" my package.

This would be one way to work-around the version difference, but note that this leads to a difficult situation: you should rebuild all packages that use this message to make sure that no (de)serialisation issues crop up. From the description in your question, I guess that won't be possible.

Disregarding that, for now it would probably make sense to try and figure out why rosmsg md5 .. seems to not pick up the edited version of your file. Where did you actually "delete the line in the .msg file"? In a package in your Catkin workspace, or in /opt/ros/kinetic/..?

more