Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve resilience to faulty wiring (disable heartbeat) #252

Closed
PeterBowman opened this issue Sep 16, 2020 · 6 comments
Closed

Improve resilience to faulty wiring (disable heartbeat) #252

PeterBowman opened this issue Sep 16, 2020 · 6 comments

Comments

@PeterBowman
Copy link
Member

As reported in https://github.com/roboticslab-uc3m/teo-hardware-issues/issues/57, TEO is still experiencing degraded communications due to faulty wiring.

All iPOS-PC CAN connections are monitored via heartbeat protocol (#223 (comment)): the iPOS drive is configured to send dummy messages in regular intervals (currently every 100 milliseconds), and the TechnosoftIpos device spawns a dedicated thread at start to measure delays between consecutive heartbeat signals. In case the last signal was received more than half a second ago (ref), the drive is instructed to reset itself.

Idea: consider supporting special (e.g. negative?) values to the heartbeat period parameter in TechnosoftIpos. For instance, if the period is set to zero, the device would not try to spawn and use a monitoring thread as described above.

@PeterBowman
Copy link
Member Author

Not doing... This behavior feature has been supported from the very beginning, I have just improved a bit the way common and driver-specific parameters are handled: 31df0a2. Either omit the optional monitorPeriod parameter, or (especially if you have defined a global one), override it in your specific drive's .ini with a negative or zero value. Also, heartbeat is disabled whenever heartbeatPeriod is equal to zero (not negative!) or the monitor thread has been disabled as well.

@jgvictores
Copy link
Member

Sorry for re-using a closed thread, but just a quick question! Is the monitorPeriod parameter, if desired, intended to be added at files such as https://github.com/roboticslab-uc3m/teo-configuration-files/tree/3ee7fef05c325b756d5fb963d8196131aa86c81b/share/robots/teo/hardware/drivers ? Thanks!

@PeterBowman
Copy link
Member Author

Nope, please check the ref in:

In case the last signal was received more than half a second ago (ref), the drive is instructed to reset itself.

This is an iPOS-related configuration parameter. Therefore, you can put it in nodes/common-ipos.ini in case you want to reuse the same value across all nodes (or just set a default value), and optionally override it within individual nodes/idX-ipos.ini files for the specific iPOS nodes they relate to.

@jgvictores
Copy link
Member

Oh! Found it at https://github.com/roboticslab-uc3m/teo-configuration-files/blob/3ee7fef05c325b756d5fb963d8196131aa86c81b/share/robots/teo/nodes/common-ipos.ini#L10 via your comment. I should have just grepped it or used the GitHub search field. ^^

Thank you so much!

@PeterBowman
Copy link
Member Author

Also, heartbeat is disabled whenever heartbeatPeriod is equal to zero (not negative!) or the monitor thread has been disabled as well.

Not tested (yet) due to COVID, but 31a3361 should have made possible still having a worker thread for online boot-up signal treatment while disabling heartbeat checks. In this scenario, provide a zero value for heartbeatPeriod and keep monitorPeriod unchanged.

@PeterBowman
Copy link
Member Author

Not tested (yet) due to COVID, but 31a3361 should have made possible still having a worker thread for online boot-up signal treatment while disabling heartbeat checks.

Tested today. The driver attends to a boot-up signal once, just on start. Successive emergency stop&release actions (i.e. pressing the big red button of death) accomplish nothing, so this change has a pretty narrow use case anyway.

@PeterBowman PeterBowman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants