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

[WIP] Flight task auto #9253

Closed
wants to merge 81 commits into from
Closed

[WIP] Flight task auto #9253

wants to merge 81 commits into from

Conversation

Stifael
Copy link
Contributor

@Stifael Stifael commented Apr 6, 2018

This moves the legacy MC-auto logic into a Flighttask.
Except of some user specific features (i.e. slowing down close to ground speed) and ekf related reference update handling, the MC auto-logic can be tested and compared to the legacy code.

In sitl it is also possible to switch between legacy and Flighttask. However, there is no guarantee of a smooth transition because of the various legacy flags that are not taken care of within Flighttask. Consequently, I suggest to NOT switch in flight between Flighttask and legacy during testing.

TODO:

@Stifael Stifael requested a review from MaEtUgR April 6, 2018 08:42
* PID-controller for velocity.
* Inputs:
* vehicle position/velocity/yaw
* desired set-point position/velocity/thrust/yaw/yaw-speed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change the name desired to just setpoint

Stifael and others added 24 commits April 16, 2018 10:54
FlightTaskAuto: add type that corresponds to triplet type

FligthTaskAuto: set all setpoints if invalid in xy

FlightTaskAuto: cast triplet type to WaypointType

FlightTaskAutoLine: class for px4 legacy auto

FlightTaskAutoLine: methods prototype

FlightTaskAuto: change sp to wp (=Waypoint)
add params

FlightTaskAutoLine: follow waypoints along line based on flight state
PositionControl: remove takeoff logic

mc_pos_control: takeoff logic for flighttask

mc_pos_control: smooth takeoff throttle start at 0
…lways prioritize

velocity setpoint generated from position error over velocity feedforward
@Stifael
Copy link
Contributor Author

Stifael commented Apr 17, 2018

@dagar I am not convinced anymore if we are able to have both legacy and flighttask present in the firmware at the same time due to flash issue.
I suggest the following: I will now add all the little auto/manual related things (such as lower speed close to ground) to the new architecture and remove the legacy code. Then a lot of testing is required, and it would be great keeping the mc_pos_controller changes to a bare minimum. I think there were anyway only a few changes made to the mc_pos_controller in the past few months.
Do you have any doubts?

@Stifael
Copy link
Contributor Author

Stifael commented Apr 25, 2018

I will close this in favor of #9368

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.

1 participant