Rosserial_python died

Hi Michael,

I made some additional tests to reproduce your error. It turns out, that problem is not caused by your software - serial connection errors are caused by the way RPi is handling communication with its subsystems.
If CPU, GPU and WiFi are stressed to their maximum performance - serial connection will break within few seconds.
On the other hand, when CPU or GPU are almost unused, serial communication will work for hours without single warning.
RDP connection bring enough load to occasionally break serial, especially when moving windows or opening new apps.

Tests were also conducted on RPi with Ubuntu Mate and clean ROS installation, errors also exists.
The same tests on TinkerBoard resulted with no warnings regardless of device load.

The best solution would be to switch your SBC to TinkeBoard.
You can also connect to RPi remotely through SSH or use HDMI cable if you want graphical interface. Just keep in mind, that if you encounter serial errors, some computations should be moved to other device, e.g desktop computer.

Regards,
Łukasz

Hi Łukasz
That sounds not so good.
I searched a little bit in Web around Raspi serial communication problems and found some hints (e.g. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=165897 and http://www.ryanmartinphd.com/enable-serial-port-on-raspbian-jessie/ but they did not help.
Is there a way to reduce the baudrate or to enable serial handshake?
In theory every Raspi used together with Rosserial should have such problems.

Michael

Hi Łukasz
Again the question whether it is possible to reduce the baudrate or enable some handshaking to make the serial communication more robust.
Also I wonder if others have the same problems with the Raspberry.
Nevertheless I found the rosmon package, which was similar to roslaunch but is able to restart a node automatically in case of error. Maybe this helps others.

Michael

1 Like

Hi Michael
It s possible to reduce baudrate,

On Core2 add line:
RPi.setBaudrate(57600);
before:
nh.getHardware()->initWithDevice(&RPi);

Then launch rosserial with:
/opt/husarion/tools/rpi-linux/ros-core2-client /dev/ttyS1 _baud:=57600

Regards
Łukasz