-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adds new brake axis state and an optional fallthrough on watchdog timeout #652
base: devel
Are you sure you want to change the base?
Conversation
… watchdog timeout
Jonas Witt seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Hi Jonas, thanks for the PR. Do you have test data you can share? |
//controller_.config_.control_mode = Controller::CONTROL_MODE_VELOCITY_CONTROL; | ||
//controller_.config_.input_mode = Controller::INPUT_MODE_PASSTHROUGH; | ||
//controller_.input_vel_ = 0; |
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.
Please remove commented code
Is there anything in this PR to prevent spurious communications from fighting with the watchdog for control of the axis? |
|
||
while ((requested_state_ == AXIS_STATE_UNDEFINED) && motor_.is_armed_) { | ||
controller_.config_.control_mode = Controller::CONTROL_MODE_VELOCITY_CONTROL; | ||
controller_.input_vel_ = 0.0f; |
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 if the axis isn't in in INPUT_MODE_PASSTHROUGH
?
This PR should be refactored and made to fix #704 |
This adds a new axis state
AXIS_STATE_BRAKE
that is the same as closed loop control with forced velocity control & zero velocity input. The main purpose of this new state is to allow a defined axis state that we can safely fallback to in case of a watchdog timeout. A new axis configurationenable_brake_state_fallthrough_on_watchdog_timeout
controls this behavior. This fallthrough is a useful safety feature for wheeled robots that may encounter a state where the controlling node disappears and a watchdog timeout is triggered to keep the wheeled robot from rolling down an incline uncontrolled in idle mode.