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

'Messages.MsgTypes' does not contain a definition for 'std_msgs__short' #13

Closed nickkazepis closed 9 years ago

nickkazepis commented 9 years ago

I'm trying to compile a custom message that contains the line: std_msgs/Int16[] data and I get multiple errors: _'Messages.MsgTypes' does not contain a definition for 'std_msgs_short'

Tracing the code creation I found that the type Int16 is not recognized as a ros type and the "meta" variable is being set to true. Can you please help?

nuclearmistake commented 9 years ago

Remove std_msgs from your custom message definition... Should just be Int16

nickkazepis commented 9 years ago

It was a custom message from shadow robot (http://wiki.ros.org/shadow_robot). Thank you!

gavanderhoorn commented 9 years ago

Just to clarify: Int16 is a member of the std_msgs package / namespace. See wiki.ros.org/std_msgs and std_msgs/Int16.

nuclearmistake commented 9 years ago

Their messages have "int16"... Their messages wouldn't error. On Jun 2, 2015 6:10 AM, "nickkazepis" notifications@github.com wrote:

It was a custom message from shadow robot ( http://wiki.ros.org/shadow_robot). Thank you!

— Reply to this email directly or view it on GitHub https://github.com/uml-robotics/ROS.NET/issues/13#issuecomment-107948574 .

nickkazepis commented 9 years ago

This is the message I tried to compile: https://github.com/shadow-robot/sr-ros-interface/blob/indigo-devel/sr_robot_msgs/msg/Tactile.msg It explicitly states std_msgs/Int16[] data

nuclearmistake commented 9 years ago

Yes... But literal types in custom messages don't need their fully qualified type names.

gavanderhoorn commented 9 years ago

But it is valid, according to the rosmsg spec.

Edit: and it isn't a primitive type, it's actually the wrapped version.

nuclearmistake commented 9 years ago

Aye. I'm not debating the spec. I'm telling you how to make it compile and hopefully match md5sums with ROS.NET.

gavanderhoorn commented 9 years ago

Ah ok. My apologies.

Any reason Int16.msg is not directly supported?

nuclearmistake commented 9 years ago

Have you seen YAMLParse and SerializationHelper?

gavanderhoorn commented 9 years ago

I think I can say 'yes' to both, but I don't quite follow ..

nuclearmistake commented 9 years ago

They tend to be quirky... But once custom nessages build and md5s match, message generation issues quickly become less apparent, so I don't get around to fixing them.

Shorts for example, weren't even tested that intensely.

nuclearmistake commented 9 years ago

https://github.com/uml-robotics/ROS.NET/blob/master/common_msgs/sensor_msgs/Joy.msg

If you format the int16 array in Tactile.msg like that, or like int8[] in CompressedImage, then the md5sum of Tactile.msg should match the unmodified Ubuntu version.