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

Enable auto disarm by default #12346

Merged
merged 1 commit into from
Jul 18, 2019
Merged

Enable auto disarm by default #12346

merged 1 commit into from
Jul 18, 2019

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Jun 27, 2019

Describe problem solved by the proposed pull request
Based on defaults used by products at Yuneec and Auterion, feedback from @MikeGoesDrones and discussions with @RomanBapst and @LorenzMeier I think we need to adjust our defaults to the more common use-case of adopters having a good out of the box experience instead of needing to look up how to enable everything that seems intuitive.

Test data / coverage
Untested but it's only a parameter change to a configuration that was used a lot before.

@MaEtUgR MaEtUgR requested a review from LorenzMeier June 27, 2019 06:09
@MaEtUgR MaEtUgR self-assigned this Jun 27, 2019
@dagar
Copy link
Member

dagar commented Jun 27, 2019

I agree with the COM_DISARM_LAND change, but not so sure about COM_RC_OVERRIDE. It was quite a long time ago, but I recall several developers (not necessarily users) reporting it as unexpected/concerning behavior. A large part of this might be existing expectation though.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jun 28, 2019

but I recall several developers (not necessarily users) reporting it as unexpected/concerning behavior

@dagar I can't think of one single person that didn't react with oh nice, why do I have to find this parameter first to make it intuitive. That said there might be corner cases for a mapping drone with a pilot that accidentally moves the stick while it's far away. But in that case you still see in telemetry that the mission was interrupted and there is the option to disable it.

@igalloway
Copy link
Contributor

igalloway commented Jun 28, 2019 via email

@dagar
Copy link
Member

dagar commented Jun 28, 2019

auto disarm on kill switch

@igalloway this was added for v1.9

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jun 28, 2019

why does the kill switch not disarm the vehicle after
a short period?

it does after 5 seconds since #10175 (contained in 1.9)

@LorenzMeier
Copy link
Member

Let’s get this - we need to drive the UX in PX4 towards what people expect.

@dagar
Copy link
Member

dagar commented Jun 29, 2019

I'm in favor of the change I'd just like to be sure we understand why it was objectionable in the first place.
COM_RC_OVERRIDE was added by @sanderux in #7025. Was the concern FW going into position control mode from RTL or something else?

As a side note this is a good example of the how we should try to capture more context in PRs to understand the background motivation.

@sanderux
Copy link
Member

sanderux commented Jun 29, 2019

The concern was that we had clients that were flying missions with an RC that was sending some noise, or they accidentally touched a stick. It then went into POSTCTL without their knowledge and they only barely got it back.

I added this because it needs to be extremely clear in what mode the vehicle is flying, suddenly changing out of auto mission because a stick was touched seems like a very bad idea to me. perhaps on a quadcopter its not so much an issue, but a vtol/fw will just fly away

@sanderux
Copy link
Member

Perhaps COM_RC_OVERRIDE should only default to 1 on vehicles that hold position in POSCTL

@LorenzMeier
Copy link
Member

That’s a sensible suggestion.

@dagar
Copy link
Member

dagar commented Jun 29, 2019

Thanks for the quick response @sanderux.

How about we limit the override evaluation to rotary wing (including VTOLs in MC mode) and update the param comment?

https://github.com/PX4/Firmware/blob/423219c60ed2a9e4f97484634e2e4f4adc218d5b/src/modules/commander/Commander.cpp#L1825-L1867

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 16, 2019

Sounds like a good idea to me. I can do that.

@MaEtUgR MaEtUgR force-pushed the auto-disarm-default branch from 8f7a3e7 to 0b23c8f Compare July 16, 2019 13:32
@MaEtUgR MaEtUgR changed the title Enable auto disarm and RC override by default Enable auto disarm by default Jul 16, 2019
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 16, 2019

Based on the discussion I suggest we separate this pr and only enable auto disarming after land detection by default and I'll create another pr to implement #12346 (comment) and link it here.

I rebased on master and took out the RC override changes.

@Antiheavy
Copy link
Contributor

Auto-disarm after land detection is problematic for hand launched fixed wing drones. We are working on a PR in a custom branch that will address this and allow auto-disarm to be enabled by default. It blocks auto-disarm whenever LaunchDetection is running using a new uORB message that lets the system know when LaunchDetection is running. FYI @Kjkinney

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 16, 2019

@Antiheavy Thanks for pointing that out. So should I put it to disabled in the fixed-wing defaults in the meantime?

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 16, 2019

Separate pr for RC override default now here: #12495

@Antiheavy
Copy link
Contributor

@Antiheavy Thanks for pointing that out. So should I put it to disabled in the fixed-wing defaults in the meantime?

From a safety standpoint I still think it is a good idea to default the parameter to enabled for all. Maybe this is a good excuse for us to push the LaunchDetection disarm blocker upstream sooner rather than later.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 17, 2019

@Antiheavy Ok, then I leave it like it is.

I guess for the hand launch mode case you would want to take a look at the variable have_taken_off_since_arming https://github.com/PX4/Firmware/blob/4a02475dd183721701536fbcb4a4229d55911006/src/modules/commander/Commander.cpp#L1632

@MaEtUgR MaEtUgR requested a review from RomanBapst July 17, 2019 07:40
@hamishwillee
Copy link
Contributor

@MaEtUgR @RomanBapst When this goes in can you confirm the actual change -for docs because there is a lot of discussion here.

  1. Will COM_DISARM_LAND enabled by default be applied to all frames or just some?
  2. Was the COM_RC_OVERRIDE =1 implemented, and if so, for vehicles that hold position in POSCTL? I presume this means MC and VTOL in MC mode?
  3. Anything else?

auto disarm on kill switch

this was added for v1.9

@dagar Did this have any configuration? Is this immediate?

@MaEtUgR MaEtUgR merged commit aaad71f into master Jul 18, 2019
@MaEtUgR MaEtUgR deleted the auto-disarm-default branch July 18, 2019 12:36
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 18, 2019

  1. Will COM_DISARM_LAND enabled by default be applied to all frames or just some?

Yes, I asked again in the dev call yesterday and it seemed appropriate for the user experience on all platforms except for the corner case of the launch mode mentioned by @Antiheavy above. He said he'll take care that it will not disarm during fixed-wing hand launch when the feature is finished.

  1. Was the COM_RC_OVERRIDE =1 implemented, and if so, for vehicles that hold position in POSCTL? I presume this means MC and VTOL in MC mode?

That moved to #12495 and there were some misunderstandings. The result of yesterdays devcall discussion was that this functionality is only useful for multicopter flying.

I think we just need to change http://docs.px4.io/master/en/config/safety.html#kill_switch where we say "The vehicle is not disarmed, and the motors will restart if the switch is reverted."

Yes, it's not configurable and it's planned to stay like this according to my understanding. I don't see any problem with that except that apparently the docs are off.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 18, 2019

@hamishwillee Suggestion for documentation for kill switch PX4/PX4-user_guide#528

@hamishwillee
Copy link
Contributor

THanks @MaEtUgR - the auto disarm docs for you to review in PX4/PX4-user_guide#530
I

@Antiheavy
Copy link
Contributor

Maybe this is a good excuse for us to push the LaunchDetection disarm blocker upstream sooner rather than later.

FYI #12513

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

Successfully merging this pull request may close these issues.

8 participants