autowarefoundation / ros2_socketcan

A ROS2 wrapper around Linux SocketCAN
Apache License 2.0
119 stars 57 forks source link

can not receive can data when dlc < 8 #14

Closed chenzhengxi closed 2 years ago

chenzhengxi commented 2 years ago

const auto ret = receive(&data_raw[0U], timeout); if (ret.length() != sizeof(data)) { throw std::runtime_error{"Received CAN data is of size incompatible with provided type!"}; } if can data length < 8, it will throw error

JWhitleyWork commented 2 years ago

Coould you please link to the line in the code where this exists? I'm not sure that this means what you think it means.