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

Addition of Payload release flight mode. #14697

Closed
wants to merge 27 commits into from

Conversation

aabs7
Copy link

@aabs7 aabs7 commented Jun 28, 2020

Payload release flight mode will plan the location to release the payload and move the aircraft in such a way that payload is dropped to the target drop location precisely considering the effects of wind, current height, and current velocity of the plane.
In the figure below, the Payload release flight mode is called from waypoint 8, and the target drop point is set near waypoint 9. Therefore the plane loiters near waypoint 9 and calculates the release point from which the payload should be dropped to reach the target drop point and then flies to the release point to drop the payload.
Whatever the height, wind, and velocity of plane, the release point is calculated dynamically such that payload ultimately drops at the targeted drop location.
this

aabs7 and others added 27 commits March 16, 2020 12:00
…AV_CMD_NAV to start payload release flight mode required
'payloadThrow' branch successfully compiles support of MAV_CMD_NAV_PAYLOAD_RELEASE mavlink message.
…pter.

Add initialise_initial_condition.
Add calculate displacement.
Add llh_to_local.
Add local_to_llh.
Use gps heading as the bearing for the calculation.
Set state variable at different stages of payload release.
Maintain state change outside the mode_payload release.
@khancyr
Copy link
Contributor

khancyr commented Jun 28, 2020

Hello,

Could you clean up your PR following https://ardupilot.org/dev/docs/submitting-patches-back-to-master.html ?
I am unsure that we need a whole mode for this. Just putting the code on the cmd handling should be enough no ?

@tridge
Copy link
Contributor

tridge commented Jun 29, 2020

I liked the video you did here!
https://www.youtube.com/watch?v=5lbfTUy_7UA
Randy and I have discussed the PR, and we think this shouldn't be a flight mode. Instead, we think you can achieve what you are trying to do by combining the existing AUTO mode commands with the Lua scripting APIs for mission command updates that @davidbuzz added recently.
What you would do is this:

  • have a normal AUTO mission for your quadplane
  • have a Lua script using the APIs buzz did to adjust waypoint locations based on wind estimate to get the right release point
  • if you want to release when you are hovering then use a pair of DO_VTOL_TRANSITION commands to switch between fixed wing and hover flight

That should give you all the flexibility you need without adding a new flight mode.

@aabs7
Copy link
Author

aabs7 commented Jun 30, 2020

@tridge You are right. Looks like we can obtain the same result using Lua scripting. Didn't knew about Lua scripting in Ardupilot until you commented. Thanks :D .

@aabs7 aabs7 closed this Jun 30, 2020
@shovan777
Copy link

@tridge you are absolutely right about that. Our objective was never to add a flight mode but to add a feature in which Planes are able to precisely release the payload so as to reach the target location on the ground. We made a flight mode in order to mimic the operation of the payload_place mode in copter
As it is not possible to land a fixed wing plane every time to drop a payload, I think a feature that enables precise drop of payload (in our case medical delivery) is necessary for Plane.
Can you please review if we have made some silly mistake while writing the code. We are beginners and any help is greatly appreciated.

@aabs7 aabs7 reopened this Jun 30, 2020
@peterbarker
Copy link
Contributor

@aabs7 did you mean to reopen this PR?

If you do intend to go down the LUA route then a fresh PR would probably be appropriate.

@aabs7
Copy link
Author

aabs7 commented Jul 1, 2020

@peterbarker It came to me that we can add this payload release feature in plane just like payload place was implemented in copter without making flight mode or going down the LUA route. (using mavlink do cmd)
I opened this PR to address @shovan777 question.
Do you think with a mav_do cmd for payload release, we can add this feature in plane?

@aabs7
Copy link
Author

aabs7 commented Jul 1, 2020

I'll close this PR and open a new to discuss on that matter.

@aabs7 aabs7 closed this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants