rosactionclient failure due to version mismatch
5 views (last 30 days)
Show older comments
Dongjun Hyun
on 13 Apr 2018
Edited: Cam Salzberger
on 19 Jan 2021
I'm using
Windows7: MATLAB R2017b
Ubuntu 16.04: ROS kinetic, UR10 in Gazebo
My code is
[urArm, urGoalMsg] = rosactionclient('arm_controller/follow_joint_trajectory');
Error message of ROS is
[ERROR] [1523601174.867179119, 8.956000000]: Client [/matlab_global_node_65047] wants topic /arm_controller/follow_joint_trajectory/result to have datatype/md5sum [control_msgs/FollowJointTrajectoryActionResult/bce83d50f7bb28226801436caf0e2043], but our version has [control_msgs/FollowJointTrajectoryActionResult/c4fb3b000dc9da4fd99699380efcc5d9]. Dropping connection.
So, I replaced
MD5Checksum = 'bce83d50f7bb28226801436caf0e2043' % The MD5 Checksum of the message definition
with
MD5Checksum = 'c4fb3b000dc9da4fd99699380efcc5d9' % The MD5 Checksum of the message definition
in FollowJointTrajectoryResult.m
But, the same error message repeated
1 Comment
Accepted Answer
Cam Salzberger
on 19 Jan 2021
Edited: Cam Salzberger
on 19 Jan 2021
I realize this question is from a while ago, but I wanted to put in an answer to catch anyone else running into the same problem.
The MD5 checksum is used to ensure that both the origin and destination of the ROS message share the same message definition. If ROS tries to deserialize a message that is using a different message definition, the deserialization will be impossible. So if you are getting an MD5 checksum mismatch error, that means that the publisher (or client) is using a different message definition from the subscriber (or server).
Changing the MATLAB files that define the message object does not change the underlying message definition, nor will it have an impact on the back-end that does the serialization of the message. It will only ensure that "rosmsg md5 <type>" reports the incorrect value. Please do not change built-in MATLAB files, especially not without saving a back-up.
The correct way to handle this is to replace the standard messages that MATLAB uses to match the message definitions used by your external version of ROS. Before R2020b, MATLAB uses ROS Hydro/Indigo message definitions. Follow these instructions to update built-in message definitions using the custom message workflow.
R2020b has upgraded to ROS Melodic. In that release, to change to a different version of built-in message definitions you can simply call rosgenmsg on the folder with the desired definitions.
-Cam
0 Comments
More Answers (0)
See Also
Categories
Find more on Specialized Messages in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!