-
Notifications
You must be signed in to change notification settings - Fork 32
IMU 1kHz update #201
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
Open
GarryBGoode
wants to merge
24
commits into
inputlabs:main
Choose a base branch
from
GarryBGoode:imu_gyro_update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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.
Open
IMU 1kHz update #201
Conversation
This file contains hidden or 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
Removed oversampling, perform 1 read per update. Enabled internal LPF1 for gyro and accel. Increased tick frequency to 1kHz. Added compensation math for tick frequency, overall sensitivity should not change with frequency change. Added large number of gyro defines to be used later. Added rotation_fast.c and .h, which is an approximate rotation math setup, this can be used later for absolute angle tracking at 1kHz.
Changed gyro report absolue to use actual elapsed microseconds in hopes of better accuracy.
Added calibration routine for std. deviations of accelearation and gyro. Std deviation (or variance) is used in IMU processing to make optimal balance between 2 gyros.
…ased now. If gyro rate is higher than 100dps as a vector, measurement switches to the 500dps range IMU. Small refinement of fast rotation.
…ware into imu_gyro_update
…ware into imu_gyro_update
…en when everything is - in theory - synced.
…de that's preventing 1kHz. Lowered IMU filter frequency to accomodate 500Hz. Added compensator for thumbstick smoothing so that percieved speed of smoothing is the same while changing tick frequency.
…lly go to sleep after 2 minutes of inactivity.
… can. It will update USB as soon as it receives anything.
…lp with click-noise.
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.
Added idle timeout to wireless mode - controller will automatically go to sleep after 2 minutes.
Added variance and standard deviation as a new measurement value during calibration.
Standard deviation is saved to NVM config - this is why config version is updated.
Variance (standard deviation squared) is used for optimal balance between IMU0 and IMU1.
User needs to re-calibrate after SW update.
Added extra reporting in wired mode - this is for fixing a reported issue that the thumbstick value can get stuck outside of center. The thumbstick would reset to center at the next button press, this shows some reports ended up lost. So the extra reporting steps help with the issue - though not sure about any side effects.
Removed gyro oversampling, perform 1 read per update.
Enabled internal LPF1 (cutoff at 223Hz) for gyro and accel to compensate oversampling.
Increased tick frequency to 1kHz - and then down to 500Hz frequency.
It is able to run in 1kHz in wired mode, but not in wireless mode.
Note: XINPUT on Ubuntu might be limited to 500Hz on PC - this took way too long to debug.
Wireless can reach about 480Hz as measured by poll-tester app, so there is still a bit of packet loss somewhere.
Added compensation math for tick frequency, overall sensitivity should not change with frequency change.
This also applies to thumbstick smoothing, delay from smoothing should not change with tick frequency change.
Added rotation_fast.c and .h, which is an approximate rotation math setup, this is used for gyro absolute reporting.
This was necessary to be able to reach 1kHz update rate.
Removed tick frequency from Dongle software, dongle should just run as fast as it can.
Alpakka and Dongle sw update needed.
Tried updating wireless_submodule (llama), but in the end it is not necessary. SW works with wireless submodule for official SW ver. 1.1.0.
Tested on alpakka v1.0, both wired and wireless mode.