Skip to content

AP_Arming_Copter: Allow arming with unhealthy visodom in non-gps modes #29264

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vabe7
Copy link

@Vabe7 Vabe7 commented Feb 9, 2025

This is essentially the fixed version of #29258, see more info about that at the bottom.

This allows arming in non-GPS flight modes like Stabilize, even if the visual odometry is unhealthy. The behavior is mostly copied from gps_checks.

I compiled one board with (fmuv3) and one without (Kakute F7 Mini) visual odometry. And for both boards I compiled plane and copter. I also tested it on a barebones fmuv3. With:

  • VISO_TYPE=1
  • EK3_SRC1_POSXY = 6
  • EK3_SRC1_VELXY = 0
  • EK3_SRC1_POSZ = 1
  • EK3_SRC1_VELZ = 0
    on Copter 4.5.7. the prearm message visodom unhealthy is shown in Stabilize. With this branch the message disappears in Stabilize, but appears again when changing to Loiter.

I initially only tested it for copter on sitl and fmuv3, after opening the initial pull request I got all the error messages about compiler errors in other vehicles and boards with only 1MB of storage. Realizing my mistake I closed the pull request. Now due to the rebase and force-push I can't reopen the original pull request. I'm sorry about the inconvenience, but on a positive note, I learned a lot about git today...

@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 2 times, most recently from 5b1383f to 2218afd Compare February 10, 2025 12:50
@rishabsingh3003 rishabsingh3003 self-requested a review February 10, 2025 22:17
@rishabsingh3003
Copy link
Contributor

rishabsingh3003 commented Feb 10, 2025

I will test this, I was about to raise a PR myself

@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 8 times, most recently from d9226c4 to 4a7d8bf Compare February 17, 2025 15:32
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 6 times, most recently from eb1dcb6 to 84dcab9 Compare February 24, 2025 09:56
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 3 times, most recently from 2978dbc to f702274 Compare March 2, 2025 09:12
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 3 times, most recently from aceb932 to 1d7b05b Compare March 10, 2025 09:20
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

I'm a bit concerned that some users may require these checks to be good before arming. They're probably doing something silly anyway - but have you considered GUIDED_NOGPS mode when writing this check?

// performs pre_arm visodom related checks and returns true if passed
bool AP_Arming_Copter::visodom_checks(bool display_failure)
{
// check if fence requires GPS/position
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing check for require_location == RequireLocation::YES in here

@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 2 times, most recently from 68f0c2b to a48284b Compare March 18, 2025 05:46
@Vabe7
Copy link
Author

Vabe7 commented Mar 18, 2025

The requested changes should be in now.

I want this because I'm currently building a positioning system for my stampfly to use loiter and so on. But I also want to fly it in Stabilize or Althold if I'm somewhere else, so Guided-NoGPS doesn't really fit the case.

@Vabe7 Vabe7 requested a review from peterbarker March 18, 2025 09:08
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch from a48284b to fc4d282 Compare March 18, 2025 13:51
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 8 times, most recently from 8b9c5b2 to 5daa83a Compare March 26, 2025 10:29
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 3 times, most recently from 5a035ff to b677f24 Compare April 1, 2025 09:06
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch 4 times, most recently from f640046 to c554f55 Compare April 9, 2025 09:01
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch from c554f55 to ceab06e Compare April 14, 2025 09:09
@Vabe7 Vabe7 force-pushed the allow_arming_with_unhealthy_visodom branch from ceab06e to 8307a57 Compare April 15, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants