Skip to content

Conversation

peterbarker
Copy link
Contributor

@peterbarker peterbarker commented Dec 17, 2020

This will make rudder-arming consistent across our vehicles.

One known behaviour change is that the rover arm interval has moved from 2 to 3 seconds (to be like Copter and Plane).

Other known changes in behaviour:

  • Copter and Rover will try to arm if your throttle is non-zero, and you will get a warning that your throttle is non-zero. In master we don't try to arm. I think this new behaviour is far preferable from a user's standpoint as they're told why they can't arm right now in the case they meant to arm! The new code has the same behaviour as Plane in master

We can't move the rudder-specific arming checks into the RC_Channels library as ToyMode also arms with a reason of "rudder" and presumably wants the same checks We did some surgery to fix this

@peterbarker peterbarker force-pushed the pr/rudder-arming-up branch 3 times, most recently from 5570908 to f71ac3b Compare December 18, 2020 03:13
@peterbarker peterbarker force-pushed the pr/rudder-arming-up branch 4 times, most recently from e7c327b to 827ff0d Compare January 1, 2021 01:55
@peterbarker peterbarker force-pushed the pr/rudder-arming-up branch 2 times, most recently from 157f4c3 to 9ef65ee Compare March 27, 2021 01:51
@peterbarker peterbarker removed the WIP label Apr 1, 2021
@peterbarker peterbarker force-pushed the pr/rudder-arming-up branch from 9ef65ee to 24377cf Compare April 1, 2021 14:04
@peterbarker
Copy link
Contributor Author

Tested in SITL - standard arming and RUDDER_DISARM values.

@peterbarker peterbarker force-pushed the pr/rudder-arming-up branch 3 times, most recently from ab489a5 to 2815824 Compare April 6, 2021 06:41
@tridge tridge removed the DevCallEU label Apr 7, 2021
@tridge
Copy link
Contributor

tridge commented Apr 7, 2021

@rmackay9 also noted on the call that he's happy for the 10s trim feature to be removed if whoever removes it ensures docs are updated

@rmackay9
Copy link
Contributor

rmackay9 commented Apr 7, 2021

Docs for autotrim are here: https://ardupilot.org/copter/docs/autotrim.html and here: https://ardupilot.org/copter/docs/arming_the_motors.html. The 2nd link in particular has a warning that could be updated to be clear it only applies to 4.0 (and earlier)

stops uwarning the user instantly
we do not run the arming checks if ARMING_CHECK is zero
this was ineffective as Blimp was not enforcing the parameter.  We do now
as required by PR feedback (ArduPilot#16091) and my DevCall decision.
it was decided that your throttle-is-zero check was really part of the gesture and thus belonged in RC_Channels, not in AP_Arming.
@peterbarker peterbarker force-pushed the pr/rudder-arming-up branch from c6ef41f to 90a1319 Compare June 22, 2025 00:14
it was decided that your throttle-is-zero check was really part of the gesture and thus belonged in RC_Channels, not in AP_Arming.
 - does it really matter if the user does this when they can just throttle up to take off?
 - stops spreading oymode stuff through the code
 - kind of weird doing this in Arming anyway
as opposed to trying to arm and have the arming library say no
for setting a single bit
Copy link
Contributor

@rmackay9 rmackay9 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 happy for this to be merged once @andyp1per has completed his testing and has approved

@peterbarker peterbarker requested a review from rmackay9 June 25, 2025 07:41
Copy link
Contributor

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

Think its ok, just a couple of questions

// only permit arming if the vehicle isn't being commanded to
// move via RC input
const auto &c = rc().get_throttle_channel();
if (c.get_control_in() != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

don't you want to use the deadzone version here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so - this is pilot stick input we want to be inactive. It would be really, really difficult for a Rover user to get zero input on a mid-stick-is-zero throttle input without a dz :-)

}

if (method == AP_Arming::Method::RUDDER) {
if (!copter.flightmode->has_manual_throttle() && !copter.ap.land_complete) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering whether we should remove the manual throttle check here. Disarming mid-air at zero throttle, full yaw seems bad.

Copy link
Contributor

@rmackay9 rmackay9 Jul 5, 2025

Choose a reason for hiding this comment

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

Thanks AndyP very much for helping test this important PR

we should certainly be careful about changes in behaviour because it is also bad to be unable to disarm the vehicle waiting for the land-complete to become true. That can lead to vehicles flopping around on the ground.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't given this enough thought one way or the other. I absolutely don't want to change something so fundamental/dangerous in this PR.

I do agree mid-air-accidental-disarms sound very bad. But we might end up with people not able to disarm depending on how the landing detector modifies its behaviour based on manual throttle etc etc.

We could document our way out of it - suggest people doing inverted yaw spins may want to set the disarm-via-stick to false. We could potentially change the default value to disallow it in minimize-fpv-osd setups. We could say that if you've armed-with-a-switch-with-airmode then we don't do it. Lots of options, lots of thought, a very small amount of coding, a lot of testing!

I'd also say that I've never actually heard of someone managing to hit this problem - I do find that a bit of a surprise.

tldr; sure, we need to think about it, but I do not want to do it as part of this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking that perhaps the right check was manual throttle without airmode, that would probably cover the majority case in a safe way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking that perhaps the right check was manual throttle without airmode, that would probably cover the majority case in a safe way.

Probably right - but not for this PR.

Are you OK with this one, @andyp1per ?

@peterbarker peterbarker merged commit 02a6ba0 into ArduPilot:master Jul 7, 2025
107 of 108 checks passed
peterbarker added a commit that referenced this pull request Jul 7, 2025
as required by PR feedback (#16091) and my DevCall decision.
@peterbarker peterbarker deleted the pr/rudder-arming-up branch July 7, 2025 22:54
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.

7 participants