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

Support Figure of eight loitering #21852

Merged
merged 4 commits into from
Oct 31, 2023
Merged

Support Figure of eight loitering #21852

merged 4 commits into from
Oct 31, 2023

Conversation

KonradRudin
Copy link
Contributor

Solved Problem

Add support for a figure of eight loitering pattern for fixed wing vehicles (can e.g. be used to replace orbit when tracking POIs with a limited panning gimbal). This adds the support for the MAV_CMD_DO_FIGURE_EIGHT mavlink command currently defined in the development dialect.

Solution

  • Add a new functionality in the FixedWingPositionControl to process a figure of eight loitering pattern. The class checks the relevant segment of the figure of eight and passes the path segment to the npfg guidance logic for lateral guidance.
  • Addded a configuration to enable the figure of 8 loitering. It is disabled by default since it would need the development mavlink dialect (only enabled for sitl config).

Changelog Entry

For release notes:

Feature Support for Figure 8 loiter pattern

Alternatives

Test coverage

  • Simulation tests performed in sitl.
  • Build tests for fmu_v5x

Screenshot from 2023-07-14 16-50-24

Context

To discuss:

  • Currently QGCS has no support for sending this command only AMC is this a problem?
  • Added a kconfig parameter to disable it since we need the development mavlink dialect to enable it. But i have not found a solution to make a dependency on the development dialect. Any input on how to handle this is appreciated.

@junwoo091400 junwoo091400 added the Flight Controls 🦅 Anything about flight control algorithm (Navigation, Attitude control, etc) label Aug 1, 2023
@github-actions github-actions bot added the stale label Sep 1, 2023
@tstastny
Copy link
Contributor

tstastny commented Sep 8, 2023

@dagar just so that this one doesnt get kicked down the road too far:

Added a kconfig parameter to disable it since we need the development mavlink dialect to enable it. But i have not found a solution to make a dependency on the development dialect. Any input on how to handle this is appreciated.

do you have insights here how to handle? would the current action look something like default kconfiging the fig8 as disabled while there is a development mavlink link? (but then need to still make sure we have mavsdk test and a build that can run in ci.. even though on all the main binary builds it would be disabled)

no GCS implementation

Is this already a nogo? or would mavsdk test be enough while this is in mavlink development.xml?

If the lack of operator command ease marks this as not good for merging now.. let's just decide quickly so that we'll take this back downstream until such point that we can bring it in more properly upstream.

@KonradRudin if we proceed with this PR - you may need to check the implications of this PR on the figure eight logic #21988

@Jaeyoung-Lim
Copy link
Member

Is this already a nogo? or would mavsdk test be enough while this is in mavlink development.xml?

@tstastny Why not just add it to QGC 😏?

@tstastny
Copy link
Contributor

@tstastny Why not just add it to QGC 😏?

@KonradRudin @RomanBapst ^^

@KonradRudin KonradRudin force-pushed the pr-figure-of-eight branch 6 times, most recently from a0ccce0 to 6994eeb Compare October 23, 2023 07:37
tstastny
tstastny previously approved these changes Oct 30, 2023
@tstastny
Copy link
Contributor

@dagar is this ok to go in now? before we e.g. run out of flash / need another rebase with other fixed-wing things on the docket?

@KonradRudin i re-started the tailsitter test, it was failing, but i didnt see an erroneous timeout.. may actually be something wrong, can you check? https://github.com/PX4/PX4-Autopilot/actions/runs/6655895059/job/18096246149#step:17:1383

@tstastny
Copy link
Contributor

@dagar all checks passing - should we smash the button?

The command is sent by a dedicated mavlink command and forwarded to the fixed wing position controller.

The pattern is defined by the radius of the major axis, the radius of the minor axis and the orientation. The pattern is then defined by:
The upper part of the pattern consist of a clockwise circle with radius defined by the minor axis. The center of the circle is defined by the major axis minus the minor axis away from the pattern center.
The lower part of the pattern consist of a counter-clockwise circle with the same definitions as above.
In between, the circles are connected with straight lines in a cross configuration. The lines are always tangetial to the circles.
The orientation rotates the major axis around the NED down axis.

The loitering logic is defined inside its own class used by the fixed wing position control module. It defines which segment (one of the circles or lines) is active and uses the path controller (npfg or l1-control) to determine the desired roll angle.

A feedback mavlink message is send with the executed pattern parameters.
@KonradRudin
Copy link
Contributor Author

@tstastny had to rebase, since it had some merge conflicts (only in the mavsdk tests).

@dagar dagar merged commit 1089079 into main Oct 31, 2023
89 checks passed
@dagar dagar deleted the pr-figure-of-eight branch October 31, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Flight Controls 🦅 Anything about flight control algorithm (Navigation, Attitude control, etc) stale
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants