asrob-uc3m / yarp-devices

Yet another place for YARP devices.
https://asrob.uc3m.es/yarp-devices/
GNU Lesser General Public License v2.1
0 stars 2 forks source link

Timeout needed in LaserTowerOfDeath #21

Closed PeterBowman closed 1 year ago

PeterBowman commented 5 years ago

@imontesino found out that the LTOD device crashes upon the initial connection check, namely while we try to read the welcome message arriving from the Arduino board:

https://github.com/asrob-uc3m/yarp-devices/blob/29965f0c296c07d0e0dc74e60a628566df00eaa0/libraries/YarpPlugins/LaserTowerOfDeathController/LaserTowerOfDeathController.cpp#L88-L96

The only change wrt previous successful executions: we replaced the Arduino Duemilanove with a Freaduino board (https://github.com/asrob-uc3m/laser-tower-of-death/issues/1#issuecomment-441367894). It was observed that a convenient one-second delay placed right before said lines fixes this issue. Is this a valid approach?

jgvictores commented 5 years ago

There seem to be more sophisticated methods in the API, for example see isOpen() and AlreadyOpen.

Anyway, I've never been a big fan of libserial, see my comments at https://github.com/asrob-uc3m/yarp-devices/issues/13#issuecomment-443159311

PeterBowman commented 1 year ago

No longer an issue after https://github.com/asrob-uc3m/yarp-devices/issues/13#issuecomment-1326759379 (migrated to YARP's serialport device).