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

Support LSM6DSV IMU #308

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
71857ef
Add LSM library
wigwagwent Aug 1, 2023
8d16e7b
Build Error and quat needs to be fixed
wigwagwent Aug 1, 2023
48dda5f
lsmdsv16x: standardize file names (low level lib without word sensor,…
l0ud Aug 1, 2023
d21463e
Added fusedRotation math
wigwagwent Aug 2, 2023
10508c9
added sensor to the sensor list and cleanup
wigwagwent Aug 2, 2023
f315875
Forgot curly brackets
wigwagwent Aug 2, 2023
0521675
Fix second sensor id values
wigwagwent Aug 2, 2023
906b935
Update i2c address and very basic interrupt free
wigwagwent Aug 2, 2023
3555bf8
FIFO works, no SF data
gorbit99 Aug 2, 2023
9de426e
Updated the outdated st libs
gorbit99 Aug 2, 2023
177e8c0
Fixed mistake in 'Set SFLP Batch' and cleaned up code
gorbit99 Aug 2, 2023
20b7484
Everything should be the same but nothing
gorbit99 Aug 3, 2023
57f22ae
Add IMU Self Test
wigwagwent Aug 3, 2023
3f4a5b4
Slimevr gets rotation
wigwagwent Aug 3, 2023
8cfc0a3
Code cleanup
gorbit99 Aug 4, 2023
93033f4
Cleanup and add timeout error back
wigwagwent Aug 4, 2023
79a0e54
Code fixes
gorbit99 Aug 4, 2023
93ee749
Added temp monitoring
gorbit99 Aug 4, 2023
e30ae30
Partial acceleration implementation
gorbit99 Aug 4, 2023
04cbbcb
Finish linear acceleration
wigwagwent Aug 4, 2023
e53b549
Merge important stuff from main
wigwagwent Aug 4, 2023
b43bd0d
Converted Gs to m/s^2
gorbit99 Aug 4, 2023
124f00c
Self-test should now work
gorbit99 Aug 4, 2023
1600a70
Only do self test on facedown
gorbit99 Aug 4, 2023
f2ab2d6
Code cleanup
gorbit99 Aug 6, 2023
3c74d2a
Custom calibration works, just maybe not useful
wigwagwent Aug 7, 2023
5179cea
Add acceleration Offset
wigwagwent Aug 8, 2023
44977ea
Add fusedRotation offset calibration
wigwagwent Aug 9, 2023
0bba914
use the same highest ODR for gyro and accel, change accel sensitivity…
l0ud Aug 10, 2023
7affc34
Inital work on esp fusion
wigwagwent Aug 17, 2023
73f7caa
esp fusion works just not well
wigwagwent Aug 17, 2023
52347a4
Fix esp fusion add gyro calibration
wigwagwent Aug 19, 2023
bd4f94a
Add acceleration calibration
wigwagwent Aug 19, 2023
8870218
Added gyro scale calibration GSCALE serial command
wigwagwent Aug 20, 2023
bf800a5
Put esp fusion features behind define flags
wigwagwent Aug 21, 2023
1a19485
Set values with defines, gyro dsp 2000
wigwagwent Aug 21, 2023
8d1eccf
Merge branch 'saner_defualts'
wigwagwent Aug 21, 2023
fd1a8bd
Better Gyroscope sensitivity calibration
wigwagwent Aug 30, 2023
1516ec4
Reduce the library imu read
wigwagwent Aug 31, 2023
69ed8eb
Merge remote-tracking branch 'upstream/main'
wigwagwent Sep 3, 2023
86cda95
Make the merge build
wigwagwent Sep 3, 2023
d99ea15
Add tap detection
wigwagwent Sep 3, 2023
4906d14
Tune tap detection and add error handling
wigwagwent Sep 4, 2023
01bd912
Rename to lsm6dsv except lib
wigwagwent Oct 16, 2023
992cffd
Code cleanup
wigwagwent Oct 16, 2023
33b741c
Finish Renaming everything to lsm6dsv
wigwagwent Oct 29, 2023
d2881c8
Update gyro sens cal
wigwagwent Oct 29, 2023
4c6d8df
Change defualt to lsm fusion, and fix build
wigwagwent Oct 29, 2023
7642ac4
Rename last folder
wigwagwent Nov 4, 2023
c02bcee
ESP fusion is weird again
wigwagwent Nov 4, 2023
f97243d
Merge remote-tracking branch 'upstream/main'
wigwagwent Nov 4, 2023
2c97226
Fix build
wigwagwent Nov 4, 2023
d9d8fd3
Merge branch 'SlimeVR:main' into main
wigwagwent Dec 1, 2023
e1a5bbe
Remove debugging code
wigwagwent Dec 1, 2023
6a0b472
revert because changes made in merge #305
wigwagwent Dec 1, 2023
bbf517a
Code cleanup and make configuration easier
wigwagwent Dec 1, 2023
6f8d40e
Update Readme to add lsm
wigwagwent Dec 2, 2023
af9d7d8
update lsm lib from 16x
wigwagwent Dec 2, 2023
10a7a27
Fix onboard fusion after update
wigwagwent Dec 2, 2023
8029bce
fix formatting
wigwagwent Dec 2, 2023
15f544b
Fix calibration
wigwagwent Dec 3, 2023
fada70f
Default to builtin fusion
wigwagwent Dec 3, 2023
21be624
Add low pass filter for less jitter
wigwagwent Dec 12, 2023
f574956
Update README.md
wigwagwent Dec 29, 2023
81a652b
Merge branch 'SlimeVR:main' into main
kounocom Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ The following IMUs and their corresponding `IMU` values are supported by the fir
* ICM-20948 (IMU_ICM20948)
Copy link
Member

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...

* 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!\
Copy link
Member

Choose a reason for hiding this comment

The 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
Expand All @@ -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.

Expand All @@ -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,
Expand Down
Loading
Loading