ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found the problem. Basically, a chain reaction caused by a buffer overflow.

I have a base controller that runs on an STM32 microcontroller that connects via USB to a Raspberry Pi running ros_serial. The microcontroller was publishing on /odom but there was a buffer error and the result was random garbage was being sent over the serial USB connection in addition to correct odometry. ros_serial interpreted this random gibberish as pointer to a standard message type "string" that contained just an ASCII "blank space" character being published on the /imu topic. This the just random luck.

I increased the size of a statically allocated buffer in the microcontroller and then robot-localization (running on the Pi3) stops writing errors messages.

So, what did I learn? ROS nodes are more tightly coupled than I would think. Buffer overflow on microcontroller causes unrelated node on another computer to fail. We need to better validate all incoming data to better contain errors