-
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
Plane: support precision QLOITER in quadplanes #26436
Conversation
added SIM_PLD_SHIP to make the precland location track the SIM_SHIP location, giving a nice way of having a landing marker on a moving ship
and allow for moving landing target
Vector2f target_accel; | ||
Vector2f target_speed_xy_cms{quadplane.poscontrol.velocity_match.x*100, quadplane.poscontrol.velocity_match.y*100}; | ||
quadplane.pos_control->input_vel_accel_xy(target_speed_xy_cms, target_accel); | ||
quadplane.poscontrol.last_velocity_match_ms = 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.
This means that you have to send matching at at least loop rate or it will start slowing down again? Why not just wait for the timeout to expire?
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.
it doesn't seem to, I checked with gdb and there doesn't seem to be anything else that overrides the velocity. I got the same speed with and without this for QLOITER, so I thought it was safer to apply once
@@ -29,6 +33,36 @@ void ModeQLoiter::update() | |||
void ModeQLoiter::run() | |||
{ | |||
const uint32_t now = AP_HAL::millis(); | |||
|
|||
#if AC_PRECLAND_ENABLED | |||
const uint32_t precland_timeout_ms = 250; |
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.
Elsewhere we use a 1 second 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.
my main concern is for users that use QLOITER as bail-out for QLAND if prec-land goes wrong. I wanted it to stop moving towards a bad target as soon as possible
note that there is a race condition with mode change and the lua script. I'd like to find a way to solve this, suggestions welcome
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.
Looks good.
This extends the plane_precland.lua script to support precision loiter, enabled with the same AUX function as for copter (value 39)