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

[navigation for multirotor] Sqrt Controller for Alt-Hold and improvements #7845

Merged
merged 22 commits into from
Mar 1, 2022

Conversation

DzikuVx
Copy link
Member

@DzikuVx DzikuVx commented Feb 22, 2022

This replaces #7679

@DzikuVx
Copy link
Member Author

DzikuVx commented Feb 26, 2022

@Jetrell tested this today on a 7" build and everything was just fine. I think we can merge it soon to master

@DzikuVx DzikuVx added this to the 5.0 milestone Feb 26, 2022
@DzikuVx DzikuVx merged commit 6d87a42 into master Mar 1, 2022
@DzikuVx DzikuVx deleted the dzikuvx-altitude-sqrt-controller branch March 1, 2022 12:02
@breadoven
Copy link
Collaborator

breadoven commented Mar 21, 2022

@DzikuVx I noticed slightly odd behaviour for posControl.desiredState.pos.z shown in the attached BB log screenshot which I tracked down to being caused by this change. Should be noted this was from ground testing RTH so things would likely be different if the MR was free to actually climb. Haven't got around to flight testing yet.

Target position Z in the BB screenshot jumps between the set ~30m RTH altitude and an altitude that corresponds to 10 + actual position Z. The 10 seems to come from a max climb rate setting of 500 cm/s and nav_mc_pos_z_p set to 50.

Screenshot (38)

posControl.desiredState.pos.z initially gets set by:

setDesiredPosition(tmpHomePos, 0, NAV_POS_UPDATE_XY | NAV_POS_UPDATE_Z | NAV_POS_UPDATE_BEARING);

But is then changed by:

posControl.desiredState.pos.z = pos_desired_z;

I'm guessing this is a logging issue (causing messy BB logs) more than a problem with altitude control given motor control should be based on the required velocity output from the sqrt controller corrected values (target Z velocity shown in the BB log screenshot behaves as expected) ? No dount related to the fact applyWaypointNavigationAndAltitudeHold is updated faster than updateWaypointsAndNavigationMode perhaps ?

@DzikuVx DzikuVx added the Release Notes Add this when a PR needs to be mentioned in the release notes label May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Notes Add this when a PR needs to be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants