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

Send roll, pitch and throttle commands to Arduplane #132

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

Conversation

krisgry
Copy link
Contributor

@krisgry krisgry commented Jul 4, 2018

As of Arduplane 3.7, it is possible to command roll, pitch and throttle directly through GUIDED mode. The main benefit are

  • avoids the use of FBW modes, which translates the setpoints to/from PWM values for communication with Ardupilot. This relies on using the same mapping function, with the same limits, on both ends. We had some issues with oscillations, since the setpoints where not identical in DUNE and in AP. (This could possibly be fixed by setting the Ardupilot limits from DUNE and updating the DUNE mapping to also consider the deadband).
  • avoids the internal TECS, giving more control to DUNE, since AP does some filtering etc to the climb rate references in the TECS. This could have been solved by using FBWA, but it has the same problems as mentioned above.

This adds some more complexity to the consume controlLoops functions: When CL_ROLL is activated, it is no longer necessarily the case that we are going to use FBWB, since we could also be going into this new GUIDED mode. The second commit here includes a state machine that causes the task to wait for a predescribed time, CLtimeout, to see if more CL will arrive. If CL_PITCH arrives, we go into the new GUIDED mode, if not we go into FBWB. A similar issue occurs when in the new GUIDED mode and we receive a deactivation of CL_PITCH; should we go to FBWB, or are we waiting for a deactivation of CL_ROLL to stop using any of these controllers (and go into INIT)?

We have flown this on many occasions, and have found CLtimeout = 200 ms to work well for the X8. I have not been able to test this with your newly updated master code yet, since we have not merged that into our code yet, but this PR builds at least. Thought I'd post it now, so you can have a look, since we discussed this earlier today.

krisgry and others added 2 commits July 4, 2018 18:13
…sired roll/pitch/throttle through GUIDED mode on AP 3.7 and up
…n switching between different AP modes (GUIDED, FBWB)
@zepinto zepinto requested a review from mariacosta July 12, 2018 10:20
@zepinto
Copy link
Member

zepinto commented Jul 12, 2018

@mariacosta will look at this as soon as she finds the time.

@krisgry krisgry changed the title WIP: Send roll, pitch and throttle commands to Arduplane Send roll, pitch and throttle commands to Arduplane Jul 29, 2019
@krisgry krisgry force-pushed the feature/command_roll_pitch_thr branch from 4e1fc2f to eb93d63 Compare August 5, 2019 07:09
@krisgry
Copy link
Contributor Author

krisgry commented Oct 15, 2021

She must be very busy

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.

2 participants