Ask Your Question
4

How do I check if a ROS message has changed?

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

jbarry gravatar image

Hi,

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

Comments

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
3

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

In rospy:

import roslib
roslib.load_manifest('std_msgs')
import rospy
import std_msgs.msg

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 441 times

Last updated: May 08 '14