ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How do I check if a ROS message has changed?

asked 2014-05-08 14:31:26 -0500

jbarry gravatar image


I'm trying to write a unit test that tests converting between some messages types and one of the things I'd like to do is have a test that fails if the message's .msg file has changed at all (this is because it's important that the conversion functions be updated with the changed message and I want a reminder to do so). I'd be happy to just hard code the current message MD5 sum into my test, but how do I check the MD5 sum of the message to make sure it matches?

Thanks, Jenny

edit retag flag offensive close merge delete


I'm pretty sure are ways to retrieve a message's MD5 sum through the C++ and python APIs. I'm not sure how well it's documented, so you may want to inspect the generated python or C++ files.

ahendrix gravatar image ahendrix  ( 2014-05-08 16:44:38 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-05-08 23:17:29 -0500

In rospy:

import roslib
import rospy
import std_msgs.msg

print std_msgs.msg.Header._md5sum
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-05-08 14:31:26 -0500

Seen: 637 times

Last updated: May 08 '14