-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
Copter: run rate loop at full filter rate in its own thread #27029
Open
andyp1per
wants to merge
30
commits into
ArduPilot:master
Choose a base branch
from
andyp1per:pr-fast-rate-thread
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+820
−72
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IamPete1
reviewed
May 9, 2024
andyp1per
force-pushed
the
pr-fast-rate-thread
branch
2 times, most recently
from
May 20, 2024 20:24
a8968b0
to
9efe392
Compare
control notch update with using_rate_thread
allows the rate thread to trigger pulses push up RCOutput thread priority to be above main thread ensure SPI thread does not get de-prioritized by rate thread Co-authored-by: Andy Piper <github@andypiper.com>
andyp1per
force-pushed
the
pr-fast-rate-thread
branch
2 times, most recently
from
May 22, 2024 16:43
00797c6
to
fdd143b
Compare
…hread decimate the gyro window locally
run motors output at rate thread loop rate added flight_option_is_set() allow rate thread to be enabled/disabled at runtime for in-flight impact testing use dt_avg for rate loop dt this better reflects the actual dt between IMU samples setup the right PID notch sample rate when using the rate thread the PID notches run at a very different sample rate call update_dynamic_notch_at_specified_rate() in rate thread log RTDT messages to track rate loop performance set dt each cycle of the rate loop thread run rate controller on samples as soon as they are ready detect overload conditions in both the rate loop and main loop decimate the rate thread if the CPU appears overloaded decimate the gyro window inside the IMU add in gyro drift to attitude rate thread Co-authored-by: Andy Piper <github@andypiper.com>
…terfere with the target at the same time
andyp1per
force-pushed
the
pr-fast-rate-thread
branch
from
May 22, 2024 19:07
fdd143b
to
e67b845
Compare
configure rate loop buffer based on AP_INERTIALSENSOR_RATE_LOOP_WINDOW_ENABLED
add condition/wait mutex primitive configure thread priorities based on HAL_INS_RATE_LOOP
configure rate loop based on AP_INERTIALSENSOR_RATE_LOOP_WINDOW_ENABLED
configure rate loop via HAL_INS_RATE_LOOP add set_periodic_minimum() to WSPIDevice
…ons.py and extract_features.py
andyp1per
force-pushed
the
pr-fast-rate-thread
branch
from
May 22, 2024 20:40
e67b845
to
679611b
Compare
rename get_primary_* to get_first_healthy_* use primary gyro allocation to enable and disable zero waits in IMU driver
Flow today on top of 4.5 - working well. |
Quickly recover from slowdown
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a redo of #26189
I have squashed the commits, rebased and started fixing the underlying problems. There were some fundamental problems with how the original PR was handling attitude control changes so I thought it was better to just open a new PR.
Support is enabled by setting:
which gives a variable attitude rate depending on load, and:
which gives an attitude rate locked to the gyro rate