Skip to content
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 inverted rangefinder for landing #27262

Closed
wants to merge 1 commit into from

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Jun 6, 2024

this allows for planes where the rangefinder is setup so it sees the ground when landing inverted.

Inverted landing can be useful for some types of payload

this allows for planes where the rangefinder is setup so it sees the
ground when landing inverted.

Inverted landing can be useful for some types of payload
@tridge tridge added the Plane label Jun 6, 2024
@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Jun 6, 2024
@IamPete1
Copy link
Member

IamPete1 commented Jun 7, 2024

I'm not a fan, this requires you set a upwards facing rangefinder as facing downwards. I would like to see support of this via the new surface distance lib. We would need start using it in plane and then allow it to automatically select the best rangefinder based on the vehicle attitude.

@magicrub
Copy link
Contributor

I agree with @IamPete1 , we should add support to Orientation_90

@zyromskij
Copy link

Hi everyone, this functionality is extremely important for us - for now we had to resort to an "emergency flare" lua script which triggers flare action below a certain rangefinder altitude but obviously doesn't allow for precise terrain tracking, etc. making our landings a bit unsafe.
Is there anything we can do to help with this? We can start test flights right away if someone could confirm that it's implemented correctly.

@tridge
Copy link
Contributor Author

tridge commented Jun 23, 2024

I would like to see support of this via the new surface distance lib. We would need start using it in plane and then allow it to automatically select the best rangefinder based on the vehicle attitude

we only use rangefinders for landing in fixed wing. When you only do inverted landings this PR offers a very simple and robust solution. We don't want to do ceiling tracking like copter can do, it just makes no sense for planes, and would add a whole heap of complexity and entanglement unnecessarily

@tridge
Copy link
Contributor Author

tridge commented Jun 23, 2024

we should add support to Orientation_90

possible, but we'd need to add a parameter specifying the orientation we want to use for landing. That is much heaver weight as a change than this is.
Or we make this option same option bit from the PR make plane use Orientation_90 for the landing. It will add quite a lot more flash, no more functionality, but maybe you'd prefer the aesthetics?

@IamPete1
Copy link
Member

we only use rangefinders for landing in fixed wing. When you only do inverted landings this PR offers a very simple and robust solution. We don't want to do ceiling tracking like copter can do, it just makes no sense for planes, and would add a whole heap of complexity and entanglement unnecessarily

I will explain in more detail.

There should be no reason we need to specify a rangefinder, and no reason we need to use only one. We know the attitude of the vehicle and the orientation of the rangefinder relative to the vehicle. So we can automatically pick the one which is pointing at the ground. That is my eventual goal for the surface tracking library. What it adds is for the rangefinder being used to change during flight (or use more that one at once) so need some method to transition between them smoothly. The same thing could be used on copter to move between the -90 deg rangefinder to a -45 deg one which will be closer to down if the vehicle is pitched over at 30 deg. It also fixes the current issue of rangefinder landing not working on tailsitters because the -90 deg rangefinder is not down in VTOL modes.

@tridge
Copy link
Contributor Author

tridge commented Jun 24, 2024

@IamPete1 ok, but that is a much larger change, and is addressing something that nobody has (to my knowledge) asked for on plane. This costs 36 bytes and solves the exact problem that the partner has

@IamPete1
Copy link
Member

IamPete1 commented Jun 24, 2024

@IamPete1 ok, but that is a much larger change, and is addressing something that nobody has (to my knowledge) asked for on plane. This costs 36 bytes and solves the exact problem that the partner has

The tailsitter issue is long standing, I have a PR from 2022 (#20074) although I was never that happy with it.

My main problem with this is that is really takes users down a dead end where they have to set a range finder that is really facing up as facing down. That leaves us no path to update to a more comprehensive method in the future.

@@ -1084,6 +1084,7 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
// @Bitmask: 11: Disable suppression of fixed wing rate gains in ground mode
// @Bitmask: 12: Enable FBWB style loiter altitude control
// @Bitmask: 13: Indicate takeoff waiting for neutral rudder with flight control surfaces
// @Bitmask: 14: Support inverted landings
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

henry asked for expanding the comment

@tridge
Copy link
Contributor Author

tridge commented Jun 25, 2024

think about a vehicle:set_hagl(height_agl, timeout_ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plane WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants