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

move ekf2 and mc_pos_control to WQ #13060

Merged
merged 5 commits into from
Oct 2, 2019
Merged

move ekf2 and mc_pos_control to WQ #13060

merged 5 commits into from
Oct 2, 2019

Conversation

dagar
Copy link
Member

@dagar dagar commented Sep 30, 2019

Opening this as an experiment to see if it's worthwhile moving both ekf2 and mc_pos_control to the same WQ. This is potentially worthwhile as it will save quite a lot of stack (6-7 KB), and a little bit of cpu (maybe 2-3% TBD).

@dagar
Copy link
Member Author

dagar commented Oct 1, 2019

@PX4/testflights could you please give this a quick flight on a multicopter with logs to compare with master?

@dannyfpv
Copy link

dannyfpv commented Oct 1, 2019

Tested on Pixhawk4 v5 f-450

  • Modes Tested
    Position Mode: Good.
    Altitude Mode: Good.
    Stabilized Mode: Good.
    Mission Plan Mode (Automated): Good.
  • Procedure
    Arm and Takeoff in position mode, after flying for approximately one minute, switched to altitude then stabilized mode proceeds to switch to mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoin activate RTL and see landing behavior.
  • Notes
    No issues noted good flight in general.

Pr log:
https://review.px4.io/plot_app?log=d0dd8ee0-856d-4403-bbb1-5ddc5a5c908c

Master log:
https://review.px4.io/plot_app?log=12ce1554-5313-48fb-be4f-e04a6c49106b

Tested on Pixracer v4 f-450

  • Modes Tested
    Position Mode: Good.
    Altitude Mode: Good.
    Stabilized Mode: Good.
    Mission Plan Mode (Automated): Good.
  • Procedure
    Arm and Take off in position mode, after flying for approximately one minute, switched to altitude then stabilized mode proceed to switch to mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoin activate RTL and see landing behaviour.
  • Notes
    No issues noted, good flight in general.

Pr log:
https://review.px4.io/plot_app?log=6e167d47-a556-4ae9-895e-c77aa48a8713

Maste log:
https://review.px4.io/plot_app?log=b50324e3-2342-4a2b-98a7-44f2961fb3a0

@dagar
Copy link
Member Author

dagar commented Oct 2, 2019

This saves nearly 7K of memory on a pixracer configured as a generic multicopter and from the logs I don't see any other issues.

Let's try again with mc_pos_control limited to 50 Hz updates (as it is in master) and compare the cpu usage.

@dagar dagar force-pushed the pr-ekf2_mc_pos_WQ branch from 484f4fc to 7a1aaf8 Compare October 2, 2019 14:06
@dagar
Copy link
Member Author

dagar commented Oct 2, 2019

Thanks @dannyfpv. Could you repeat that same test again with the current state of the PR? Just the pixracer is fine.

@dagar dagar changed the title [DO NOT MERGE] consider moving ekf2 and mc_pos_control to WQ move ekf2 and mc_pos_control to WQ Oct 2, 2019
@dagar dagar marked this pull request as ready for review October 2, 2019 16:08
@dagar dagar force-pushed the pr-ekf2_mc_pos_WQ branch from 467bad3 to a88afe4 Compare October 2, 2019 16:32
@dagar
Copy link
Member Author

dagar commented Oct 2, 2019

Once this is merged it should be safe to lower CONFIG_MAX_TASKS again.

@julianoes julianoes self-requested a review October 2, 2019 16:48
dagar added 3 commits October 2, 2019 12:55
 - the primary data sources of the land detector run from the same WQ so
don't lose anything by serializing these modules
Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

I don't see anything wrong 👍.

@dagar
Copy link
Member Author

dagar commented Oct 2, 2019

Relative to current master this frees up about 8 KB of ram on px4_fmu-v4 (configured as generic multicopter).

nsh> free
             total       used       free    largest
Umem:       230624     181744      48880      46160   <-- master
Umem:       231712     174848      56864      53440   <-- PR

@dagar dagar merged commit e3bbac0 into master Oct 2, 2019
@dagar dagar deleted the pr-ekf2_mc_pos_WQ branch October 2, 2019 23:44
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.

3 participants