-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feedback for Fallback Controllers #60
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,25 @@ Right now, we don't have a way to manage controllers when they fail to perform t | |
### Example 1 | ||
A walking controller for a humanoid is also responsible for maintaining the balance of the robot along with footstep execution, however, there might be cases where the robot might fall after a few steps due to miscalibration or due to flexibility in some joints or it could be a different reason. In this case, we might want the robot to go to a safe position and be compliant enough for the impact, if not it might damage some joints or sensors onboard. | ||
|
||
--- | ||
|
||
How would the default controller know that the robot is falling and that it needs to return an ERROR so | ||
that a fallback controller can be activated? | ||
|
||
--- | ||
|
||
### Example 2 | ||
A mobile manipulator is performing a trajectory hits an obstacle and continues to apply force. In this case, we might want to switch to be more compliant mode, so that it doesn't damage the robot's joints. | ||
|
||
--- | ||
|
||
This example assume that the hardware is able to still accept commands after returning ERROR. | ||
Have we considered extending the `return_type` to have different levels of ok / error? | ||
(we could also consider extending my proposed [hardware_status message](https://docs.google.com/presentation/d/1rgxwsNiNlTIaVrAV20ZQQMJTylHi9SxjnChd6oCg4IA/edit#slide=id.g2292ceb8c50_0_18) to controllers) | ||
This would allow the developer to trigger a fallback controller before the hardware encounters a fatal fault. | ||
Comment on lines
+22
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here what we are trying to handle are the scenarios that are lead from the wrong control strategy rather than the hardware. The assumption is that the hardware is doing well, but then the controller fails to act, so it can allow another controller to jump in for safety reasons. Our humanoids weigh around 100 Kgs, if we don't make the robot fall strategically, it will result in blocking most of the harmonic drives on the robot. |
||
|
||
--- | ||
|
||
## Current implementation | ||
|
||
The current implementation fetches the return type from the current controller update cycle and then decides the return type status of the controller_manager's update cycle. | ||
|
@@ -50,6 +66,13 @@ controller_manager: | |
fallback_controllers: ["joint1_position_controller", "joint2_position_controller"] | ||
``` | ||
|
||
--- | ||
|
||
In this example should all of the fallback's be activated in the case of a fault? | ||
What is the value in specifying a fallback per joint? | ||
|
||
Comment on lines
+70
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad! What I wanted to demonstrate is not a controller per joint, but if needed to start a whole controller chain rather than a single controller itself. Moreover, depending on the fallback strategy, I might want to be able to spawn fallback controllers per leg and this allows some flexibility |
||
--- | ||
|
||
``` c++ | ||
struct ControllerInfo | ||
{ | ||
|
@@ -76,6 +99,15 @@ When trying to activate the controller with fallback controllers, the following | |
|
||
If any of the above checks fail, then activation of the primary controller fails. The user will always be able to run the primary controller without configuring the fallback controller. | ||
|
||
--- | ||
|
||
Who would be responsible for ensuring that all fallbacks could be activated? | ||
For example that each joint is not claimed by more than one controller. | ||
If a main controllers faults and it attempts to claim a joint that is already in use what should happen? | ||
Example: leg controller faults and the leg + arm controllers need to switch to compliant mode to protect the robot, but something else is commanding the arm. | ||
Comment on lines
+104
to
+107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very good question! For us, it would be very interesting to be able to get access to all the interfaces that the fallback controllers need because in the end, we want to protect the robot against major damage. The idea is that if the count of the interfaces claimed by the fallback controllers altogether doesn't match the count of interfaces used by the main controller, at the time of configuring the controllers to print a warning mentioning that when the controller fails it might disable other controllers inorder to protect the robot. So that the user can be aware if this is intended or not. In case they are same and match the interfaces of the main controller, then we simply know that we won't claim any extra resources at all. We can discuss and come to a conclusion on this part |
||
|
||
--- | ||
|
||
|
||
### The `update()` method | ||
|
||
|
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.
Basically, in our case, we have a locomotion controller for bipeds/quadrapeds that constantly checks, if the CoM is projected within the support polygon by the contact points of the foot in contact. Usually, as per theory if the CoM/CoP is not within this support polygon, the robot will loose balance and it will fall
In this case, the controller will return ERROR and then we can activate the fallback controller scenario. In the worst case, An estimator/safety controller can check if the robot is falling or not and the main controller can get this info via the interface exposed by the apriori. This way it will also be able to start the fallback controllers when the robot falls.
CoM - Center of Mass
CoP - Center of Pressure