-
Notifications
You must be signed in to change notification settings - Fork 310
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
Handle HW errors on read and write in CM by stopping controllers #742
Handle HW errors on read and write in CM by stopping controllers #742
Conversation
This pull request is in conflict. Could you fix it @destogl? |
If a hardware stopped working you would stop the controller. |
I think (and hope) you missed something 😄 There is a service And yes, unfortunately, this is manual process for now. I hope to get some external components soon that would be a state-machines for ros2_control. Adding this into framework would it make even more cluttered and complex. |
I'll split this into two PRs |
@@ -1496,6 +1541,20 @@ void ControllerManager::list_hardware_components_srv_cb( | |||
hwi.name = interface; | |||
hwi.is_available = resource_manager_->command_interface_is_available(interface); | |||
hwi.is_claimed = resource_manager_->command_interface_is_claimed(interface); | |||
// TODO(destogl): Add here mapping to controller that has claimed or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what shall we do with this?
c6a0e1e
to
0970d01
Compare
This pull request is in conflict. Could you fix it @destogl? |
…ead and write. Fix misleading variable name in the tests. Error handling in RM of read/write is tested. Remove all interface from available list for hardware when an error happens. Working verison of stopping controller on read error. Write error also works but the tests are missing. Finalized tests for deactivating controllers when write failes. Do some more variable renaming to the new nomenclature.
0970d01
to
64ec9e2
Compare
@Mergifyio backport humble |
Add code for deactivating controller when hardware gets an error on read and write. Fix misleading variable name in the tests. Remove all interface from available list for hardware when an error happens. Do some more variable renaming to the new nomenclature. (cherry picked from commit ecf6c69)
✅ Backports have been created
|
Add code for deactivating controller when hardware gets an error on read and write. Fix misleading variable name in the tests. Remove all interface from available list for hardware when an error happens. Do some more variable renaming to the new nomenclature. (cherry picked from commit ecf6c69)
Add code for deactivating controller when hardware gets an error on read and write. Fix misleading variable name in the tests. Remove all interface from available list for hardware when an error happens. Do some more variable renaming to the new nomenclature. (cherry picked from commit ecf6c69)
Add code for deactivating controller when hardware gets an error on read and write. Fix misleading variable name in the tests. Remove all interface from available list for hardware when an error happens. Do some more variable renaming to the new nomenclature. (cherry picked from commit ecf6c69)
(cherry picked from commit 5178503) Co-authored-by: Christoph Fröhlich <[email protected]>
In short: when a hardware fails, i.e., error happens on read and write and hardware goes to "UNCONFIGURED" or "FINALIZED" state, controllers should be stopped automatically.
this addresses few recent issues.
Add code for deactivating controller when hardware gets an error on read and write.
Remove all interface from available list for hardware when an error happens.
To add in follow up PR: automatically restart Broadcasters (and trigger publishing before stopping)