eProsima / Micro-XRCE-DDS

An XRCE DDS implementation. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
158 stars 15 forks source link

if ROS agent gets this error: eprosima::fastcdr::exception::BadParamException: Unexpected byte value in Cdr::deserialize(bool), expected 0 or 1,we need change ucdr serialize bool #173

Open clippinglee opened 4 months ago

clippinglee commented 4 months ago

If ROS gets this error,we need change all "ucdr_serialize_bool"in xrce_types.c. liskes: image

There is no real bool type in a microcontroller, and a value >0 is considered true,but if true not equal 0x01,(SOC)it will be error. So we should input 0 or 1 parameters for ucdr_serialize_bool();

pablogs9 commented 4 months ago

Could you please open a PR with your change proposal?

clippinglee commented 4 months ago

sure , i try .Please review PR

pablogs9 commented 4 months ago

Could you report the compiler error you are having here?

clippinglee commented 4 months ago

oh,it is not compiler error ,it is test error.

This is the error reported by ros agent that I found in my testing on the TDA4 A core linux. image

clippinglee commented 4 months ago

https://github.com/eProsima/Fast-CDR/issues/41 you can see the issue in ROS2