The method vector::reserve() only change its capacity, not its size, which causes the out data to be empty.
The above result shows that the size of out data's size hasn't been changed, which occurs a bug in serial_driver that the msg published in /serial_read has no data in it.
The method
vector::reserve()
only change its capacity, not its size, which causes the out data to be empty.The above result shows that the size of out data's size hasn't been changed, which occurs a bug in serial_driver that the msg published in
/serial_read
has no data in it.And the bug is the same with
/serial_wirte
, as the convertion using the same method. https://github.com/ros-drivers/transport_drivers/blob/0140e5e7c0702a675472ee0e5bff22955e45729c/io_context/include/msg_converters/example_interfaces.hpp#L34