-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
ArduPlane: add guided timeout #28943
base: master
Are you sure you want to change the base?
ArduPlane: add guided timeout #28943
Conversation
* Preserve default of 3s Signed-off-by: Ryan Friedman <[email protected]>
5387901
to
73dbd8c
Compare
We were talking about adding offboard mode. That would leave guided with only commands that don't timeout (ie positions), so maybe the param is better referring to the new mode. |
ArduPlane/Parameters.cpp
Outdated
@@ -1303,6 +1303,14 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { | |||
// @User: Standard | |||
AP_GROUPINFO("RNGFND_LND_ORNT", 36, ParametersG2, rangefinder_land_orient, ROTATION_PITCH_270), | |||
#endif | |||
|
|||
// @Param: GUID_TIMEOUT |
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.
All the existing guided parameters use the prefix GUIDED_,
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.
That came from Copter. Looks like Plane and Copter chose different prefixes for the same mode.
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.
I matched GUIDED_
prefix. For some reason the other GUIDED_ parameters are part of plane and not ModeGuided.
This seems to be the same as my #28526 |
Signed-off-by: Ryan Friedman <[email protected]>
How would you like it done? Can we call it GUIDED_TIMEOUT when backported to 4.6, and OFFBOARD_TIMEOUT on 4.7+ assuming we get offboard mode written? |
It's not really a "timeout" though. Pretty sure it doesn't do this:
I used it in Plane Follow because from my testing it acts to throttle the messages, so that it won't accept new guided commands if they arrive < this value after the previous message. That's why I called it "UPD_LIM" - it acts to limit the frequency of updates received. |
It's different because
I agree with Pete's assessment here: #28526 (comment) Functionally, they achieve similar purposes to allow the plane to either
|
Purpose
Allow configurable guided timeout. For an application expecting to send 50hz guided velocity commands, if the offboard controller dies, ArduPlane should fall back to loiter much sooner. This allows a user to bump up the expected controller rate.
Difference from copter
The parameter is the same, but this one calls
constrain_float
on the parameter. Copter only enforces the minimum value.I also assumed that the plane will fall back to a guided loiter when control ends. Perhaps copter should enforce the max?
I also bumped the minimum period down to 0.01s. Copter doesn't seem to expect anything greater than 100mS between commands, but we know people operate controllers much faster than that. Perhaps copter's minimum should be bumped down too.
Testing Performed