-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
FlightTaskManualAltitude: adjust speed downwards when close to ground… #10410
Conversation
if (PX4_ISFINITE(_dist_to_bottom)) { | ||
dist_to_ground = _dist_to_bottom; | ||
|
||
} else if (PX4_ISFINITE(_sub_home_position->get().valid_alt)) { |
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 you're nowhere near home?
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 will slow-down as well. This "feature" is actually just a legacy "feature" (https://github.com/PX4/Firmware/pull/9368/files#diff-fc77c3ef569029d45764664c75d4b0c1L2429), I just added it back.
Unfortunately, I cannot find anymore the discussion we had when this "feature" got introduced. I was strongly against it, but the decision was different. At least this time I added the check that if there is a distance sensor to ground, then use the distance to ground instead of blindly use the altitude above home
Build failure is real. Once fixed please rebase on master to resolve other recent CI issues. |
… and distance to bottom or home-altitude is known.
9515556
to
f2a0fd2
Compare
|
||
// if there is a valid distance to bottom or distance to home, then | ||
// adjust speed downwards gradually within the limits MPC_LAND_ALT1 and MPC_LAND_ALT2. | ||
if (_sticks(2) > 0.0f) { //user demands speed downwards |
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.
Why not using _sticks_expo(2)
to be consistent with #10653 ?
} | ||
|
||
if (PX4_ISFINITE(dist_to_ground)) { | ||
_velocity_setpoint(2) = math::gradual(dist_to_ground, MPC_LAND_ALT2.get(), |
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 will not generate a linear setpoint change as the slope is defined by the actual - changing - velocity setpoint: _velocity_setpoint = f(_velocity_setpoint, dist_to_ground)
. Is that the required behavior?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as stale. |
slow down when close to ground/home altitude when in manual