Ask Your Question
0

robot_localization (elf_se) fails

asked 2019-05-13 22:01:29 -0500

chrisalbertson gravatar image

updated 2019-05-14 02:36:27 -0500

gvdhoorn gravatar image

I have two launch files thay are identical except that one starts one additional node. Robot_localization fails in one case and not in the other. The error makes me think of uninitialized memory someplace in the robot_localiztion node.

[ERROR] [1557801978.336296726]: Client [/ekf_se] wants topic /imu to have datatype/md5sum [sensor_msgs/Imu/6a62c6daae103f4ff57a132d6f95cec2], but our version has [std_msgs/String/992ce8a1687cec8c8bd883ec73ca41d1]. Dropping connection.
^C[ekf_se-5]

I get the above if I start ros_serial server before robot_locaization. No error if serial server is stated later.

The error does not seem to make sense. Is there really a topic called "992ce8a1687cec8c8bd883ec73ca41d1"?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-05-14 02:34:54 -0500

chrisalbertson gravatar image

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

edit flag offensive delete link more

Comments

1

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

In this case it was rosserial that misinterpreted data. The rest of the system essentially never saw any of that data as due to md5 mismatches no connections could be setup.

rosserial could probably be extended with more extensive checking.

gvdhoorn gravatar imagegvdhoorn ( 2019-05-14 02:39:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-05-13 22:01:29 -0500

Seen: 21 times

Last updated: May 14