-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Support LSM6DSV IMU #308
Closed
Closed
Support LSM6DSV IMU #308
Changes from 64 commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
71857ef
Add LSM library
wigwagwent 8d16e7b
Build Error and quat needs to be fixed
wigwagwent 48dda5f
lsmdsv16x: standardize file names (low level lib without word sensor,…
l0ud d21463e
Added fusedRotation math
wigwagwent 10508c9
added sensor to the sensor list and cleanup
wigwagwent f315875
Forgot curly brackets
wigwagwent 0521675
Fix second sensor id values
wigwagwent 906b935
Update i2c address and very basic interrupt free
wigwagwent 3555bf8
FIFO works, no SF data
gorbit99 9de426e
Updated the outdated st libs
gorbit99 177e8c0
Fixed mistake in 'Set SFLP Batch' and cleaned up code
gorbit99 20b7484
Everything should be the same but nothing
gorbit99 57f22ae
Add IMU Self Test
wigwagwent 3f4a5b4
Slimevr gets rotation
wigwagwent 8cfc0a3
Code cleanup
gorbit99 93033f4
Cleanup and add timeout error back
wigwagwent 79a0e54
Code fixes
gorbit99 93ee749
Added temp monitoring
gorbit99 e30ae30
Partial acceleration implementation
gorbit99 04cbbcb
Finish linear acceleration
wigwagwent e53b549
Merge important stuff from main
wigwagwent b43bd0d
Converted Gs to m/s^2
gorbit99 124f00c
Self-test should now work
gorbit99 1600a70
Only do self test on facedown
gorbit99 f2ab2d6
Code cleanup
gorbit99 3c74d2a
Custom calibration works, just maybe not useful
wigwagwent 5179cea
Add acceleration Offset
wigwagwent 44977ea
Add fusedRotation offset calibration
wigwagwent 0bba914
use the same highest ODR for gyro and accel, change accel sensitivity…
l0ud 7affc34
Inital work on esp fusion
wigwagwent 73f7caa
esp fusion works just not well
wigwagwent 52347a4
Fix esp fusion add gyro calibration
wigwagwent bd4f94a
Add acceleration calibration
wigwagwent 8870218
Added gyro scale calibration GSCALE serial command
wigwagwent bf800a5
Put esp fusion features behind define flags
wigwagwent 1a19485
Set values with defines, gyro dsp 2000
wigwagwent 8d1eccf
Merge branch 'saner_defualts'
wigwagwent fd1a8bd
Better Gyroscope sensitivity calibration
wigwagwent 1516ec4
Reduce the library imu read
wigwagwent 69ed8eb
Merge remote-tracking branch 'upstream/main'
wigwagwent 86cda95
Make the merge build
wigwagwent d99ea15
Add tap detection
wigwagwent 4906d14
Tune tap detection and add error handling
wigwagwent 01bd912
Rename to lsm6dsv except lib
wigwagwent 992cffd
Code cleanup
wigwagwent 33b741c
Finish Renaming everything to lsm6dsv
wigwagwent d2881c8
Update gyro sens cal
wigwagwent 4c6d8df
Change defualt to lsm fusion, and fix build
wigwagwent 7642ac4
Rename last folder
wigwagwent c02bcee
ESP fusion is weird again
wigwagwent f97243d
Merge remote-tracking branch 'upstream/main'
wigwagwent 2c97226
Fix build
wigwagwent d9d8fd3
Merge branch 'SlimeVR:main' into main
wigwagwent e1a5bbe
Remove debugging code
wigwagwent 6a0b472
revert because changes made in merge #305
wigwagwent bbf517a
Code cleanup and make configuration easier
wigwagwent 6f8d40e
Update Readme to add lsm
wigwagwent af9d7d8
update lsm lib from 16x
wigwagwent 10a7a27
Fix onboard fusion after update
wigwagwent 8029bce
fix formatting
wigwagwent 15f544b
Fix calibration
wigwagwent fada70f
Default to builtin fusion
wigwagwent 21be624
Add low pass filter for less jitter
wigwagwent f574956
Update README.md
wigwagwent 81a652b
Merge branch 'SlimeVR:main' into main
kounocom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,15 @@ The following IMUs and their corresponding `IMU` values are supported by the fir | |
* ICM-20948 (IMU_ICM20948) | ||
* Using fusion in internal DMP for 6Dof or 9DoF, 9DoF mode requires good magnetic environment. | ||
* Comment out `USE_6DOF` in `debug.h` for 9DoF mode. | ||
* Experimental support!\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something broke here, what's that |
||
* LSM6DSV (IMU_LSM6DSV) | ||
* Supports the LSM6DSV, LSM6DSV16X, LSM6DSV16B, LSM6DSV16XB | ||
* Using fusion in internal DMP for 6Dof or support for VQF fusion on the esp using accelerometer and gyroscope data. | ||
* **See Sensor calibration** below for info on calibrating this sensor in VQF fusion mode. | ||
* Calibration for DMP is to let the tracker sit for a few seconds on hard surface. | ||
* Experimental support! | ||
|
||
|
||
Firmware can work with both ESP8266 and ESP32. Please edit `defines.h` and set your pinout properly according to how you connected the IMU. | ||
|
||
## Sensor calibration | ||
|
@@ -50,9 +57,9 @@ Firmware can work with both ESP8266 and ESP32. Please edit `defines.h` and set y | |
* LED will turn off when calibration is complete | ||
* You don't have to calibrate next time you power it on, calibration values will be saved for the next use | ||
|
||
### BMI160 | ||
### BMI160 / LSMS6DSV | ||
|
||
If you have any problems with this procedure, connect the device via USB and open the serial console to check for any warnings or errors that may indicate hardware problems. | ||
If you have any problems with this procedure, connect the device via USB and open the serial console to check for any warnings or errors that may indicate hardware problems. The serial console will also display the calibration steps as they are needed. | ||
|
||
- **Step 0: Power up with the chip facing down.** Or press the reset/reboot button. | ||
|
||
|
@@ -77,7 +84,26 @@ Firmware can work with both ESP8266 and ESP32. Please edit `defines.h` and set y | |
|
||
Rotate the device 90 or 180 degrees in any direction. It should be on a different side each time. Continue to rotate until all 6 sides have been recorded. | ||
|
||
The last position has a long flash when recorded, indicating exit from calibration mode. | ||
The last position has a long flash when recorded, indicating exit from calibration mode. (BMI160 Only) | ||
|
||
- **Step 3: Gyroscope Sensitivity Calibration** (LSM6DSV Only, See Merge Request SlimeVR#281) | ||
|
||
> Step 0: Let the tracker sit, the light will flash when you should reorient the tracker. | ||
|
||
> Step 1: Move the tracker to a corner or edge that aligns the tracker to the same position every time. | ||
> NOTE: You might also want to unplug the USB so it doesn't affect spins. | ||
|
||
> Step 2: Let the tracker rest until the solid light turns on, you might need to hold it against a wall depending on the case and orientation. | ||
|
||
> Step 3: Rotate the tracker in the yaw axis for **2** full rotations and align it with the previous edge. | ||
> NOTE: The yaw axis is the direction of looking left or right with your head, perpendicular to gravity. | ||
> NOTE: The light will turn off after you start moving it. | ||
|
||
> Step 4: Wait for the flashing light then rotate the tracker 90 degrees to a new axis and align with an edge. Repeat steps 2 and 3. | ||
|
||
> Step 5: Wait for the flashing light then rotate the tracker 90 degrees so the last axis is up and aligned with an edge. Repeat steps 2 and 3. | ||
|
||
After letting sit the last time the calibration is complete and the tracker will flash 2 times. | ||
|
||
#### Additional info for BMI160 | ||
- For best results, **calibrate when the trackers are warmed up** - put them on for a few minutes, | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub doesn't allow me to request changes without a comment...