uml-robotics / ROS.NET

ROS.NET: ROS Client Library for Windows Development in C#
BSD 2-Clause "Simplified" License
93 stars 52 forks source link

fixes MD5 generation for certain messages #33

Closed beanstalk42 closed 8 years ago

beanstalk42 commented 8 years ago

MD5 was calculated wrong when one of the types in the message was substring of an other type

e.g. message moveit_msgs/RobotState.msg:

sensor_msgs/JointState joint_state
sensor_msgs/MultiDOFJointState multi_dof_joint_state
AttachedCollisionObject[]` attached_collision_objects
bool is_diff

resulted in this being hashed:

3066dcd76a6cfaef579bd0f34173e9fd joint_state
MultiDOF3066dcd76a6cfaef579bd0f34173e9fd multi_dof_joint_state
3ceac60b21e85bbd6c5b0ab9d476b752 attached_collision_objects
bool is_diff
nuclearmistake commented 8 years ago

Good catch. If I find time today, I'll add those messages to common_msgs and add their names+md5s to the md5 sum test

beanstalk42 commented 8 years ago

Great! Before you add those messages, you might want to look into my branch fix-messages-with-fieldname-object as e.g. moveit_msgs/AttachedCollisionObject.msg has a fieldname called 'object':

string link_name
CollisionObject object
string[] touch_links
trajectory_msgs/JointTrajectory detach_posture
float64 weight

As I'm not really sure what all that code in GenerationGuts.cs is doing I'm not very comfortable with my changes...

nuclearmistake commented 8 years ago

Yeah... that code's a stale hot mess, most of it naively composed circa-fuerte or spit+duct tape on top of that original design. //TODO