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

Copter: Remove Payload release on thrust loss detection (attempt2) #27396

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rmackay9
Copy link
Contributor

This is a replacement for PR #27339 and attempts to resolve the concerns raised with simply removing the option:

  1. Arming check added if the user has set the FLIGHT_OPTIONS bit for "Release gripper on thrust loss"
  2. Scripting gripper bindings added
  3. Example script that releases the gripper on thrust loss (or something close it)

I've done some simple testing in SITL to confirm the arming check works
image

.. and to confirm that the new script does release the gripper on thrust loss or more accurately when these cases are true for a full second:

  • the vehicle is armed
  • "thrust boost" is active
  • the vehicle is descending
  • the gripper is "grabbed" (e.g. not already released)

I tested by setting SIM_ENGINE_MUL = 0.6 which causes the quadcopter to lose altitude and hit the ground.
image

ArduCopter/Parameters.cpp Outdated Show resolved Hide resolved
libraries/AP_Scripting/generator/description/bindings.desc Outdated Show resolved Hide resolved
@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Jun 29, 2024
ArduCopter/crash_check.cpp Outdated Show resolved Hide resolved
libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
libraries/AP_Scripting/docs/docs.lua Outdated Show resolved Hide resolved
@rmackay9
Copy link
Contributor Author

rmackay9 commented Jul 2, 2024

OK, I'll switch this to use the aux function in order to save flash space.

@rmackay9 rmackay9 force-pushed the lthall-payload-release branch 2 times, most recently from 0c53aac to 1455cc4 Compare July 2, 2024 03:23
@rmackay9
Copy link
Contributor Author

rmackay9 commented Jul 2, 2024

I've updated this to use the RC auxiliary function as discussed on the dev call and re-tested and I think it's working OK
image

def GripperReleaseOnThrustLoss(self):
'''tests that gripper is released on thrust loss if option set'''

self.context_push()
Copy link
Contributor

Choose a reason for hiding this comment

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

We can retain this test - all we need to do is install_example_script_context here for your new script

@rmackay9
Copy link
Contributor Author

rmackay9 commented Jul 3, 2024

@MattKear is going to review logs from the original customer.

@tridge tridge removed the DevCallEU label Jul 3, 2024
@MattKear
Copy link
Contributor

MattKear commented Jul 9, 2024

I have not been able to find logs from the original customer, so I am not going to stand in the way of this going in. Thanks for pausing this to give me chance to look.

@rmackay9
Copy link
Contributor Author

rmackay9 commented Jul 9, 2024

rebased on master

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.

9 participants