ros2 / ros1_bridge

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
Apache License 2.0
452 stars 288 forks source link

Fix Bridging of bool[] #288

Closed RaAndOn closed 4 years ago

RaAndOn commented 4 years ago

As explained in the ROS documentation, the C++ type of a bool[] field is std::vector<uint8_t>. This is because std::vector<bool> is a vector of bytes, not booleans, and cannot easily be converted to booleans.

This change ensures that the cpptype of a bool[] is recorded as UInt8.

Apologies, in advance if I didn't follow the proper bug/PR process. I'm new to the community!