-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
SoftFusion sensor framework with BMI, ICM, LSM6, MPU sensor implementations #322
Merged
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
… equivalent to the old driver
Bump Arduino Core to v3.0 to Match GCC12
Bring back fast pin swapping
Fix accel timescale for LSM6DSV (calibration no longer takes forever)
Closed
Closed
Resolves an issue where the soft watchdog would trigger.
Reset the soft watchdog while eating or collecting calibration samples
Log FIFO overruns on LSMs
Fix missing word in comment, switch to constexpr
unlogisch04
approved these changes
Jun 19, 2024
Change add BNO085 to exeption; update esp32/esp8266
unlogisch04
approved these changes
Jun 22, 2024
ImUrX
approved these changes
Jun 25, 2024
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.
BNO seems to work fine
Eirenliel
approved these changes
Jun 25, 2024
Spacefish
pushed a commit
to Spacefish/SlimeVR-Tracker-ESP
that referenced
this pull request
Jun 28, 2024
…ations (SlimeVR#322) * Update readme to mention BMI270 support. * Soft fusion sensor initial code, wip * Soft fusion ICM-42688-P lazy WIP implementation. * sfusion: Cleanup, implemented sensor frequency calibration * icm42688: add more comments, basic driver (no hw filtering) should be working * sfustion: compilation fix * sfusion: start calibration when upside down * cleanup: remove confusing had data flag * sensor manager: use unique_ptr instead of raw pointers * sfusion: big refactoring wip * sfusion: make aux work, at least sfusion sensors should now be functional * sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet * sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver * Added lsm6dsv * Trying to work around esp32c3 compilation problem, not liking that solution * sfusion: fix problems found after rebase * Update README.md * Bump Arduino core to 3.0 to match GCC12 * Remove fast pin swapping that is no longer compatible with arduino core v3 * Bring back fast pin swapping * Update platformio-tools.ini * Fix accel timescale (calibration no longer takes forever) * Fix non-sfusion sensors * Added LSM6DSO and DSR support and refactored DSV support * Removed template float param from the implementation * sfusion: port MPU6050 driver wip, not expecting to be functional yet * sfusion: add headers specifying main code owners * connection: fix warning * update README.md * fshelper: fixed ESP8266 regression caused by abstracting FS access * sfusion: fix error on merge * bno080: differentiate bno080, bno085, bno086 again * sfusion: final touches * restore hadData functionality, implementing it in every sensor, made configured flag bno-only * fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors * sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds * sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base * Log FIFO overruns on LSMs * Reset the soft watchdog while eating or collecting calibration samples Resolves an issue where the soft watchdog would trigger. * Fix missing word in comment, switch to constexpr * Update esp32/esp8266 --------- Co-authored-by: Gorbit99 <gorbitgames@gmail.com> Co-authored-by: nekomona <nekomona@nekomona.com> Co-authored-by: nekomona <nekomona@163.com> Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Co-authored-by: kounocom <meia@kouno.xyz> Co-authored-by: Kubuxu <oss@kubuxu.com>
This was referenced Jul 6, 2024
ShineBrightMeow
added a commit
to Shine-Bright-Meow/slimevr-node
that referenced
this pull request
Jul 6, 2024
Issue:: SlimeVR#40 Discussion: SlimeVR/SlimeVR-Tracker-ESP#322 (comment) Discussion: SlimeVR/SlimeVR-Server#1100
ShineBrightMeow
added a commit
to Shine-Bright-Meow/SolarXR-Protocol
that referenced
this pull request
Jul 6, 2024
Discussion: SlimeVR/SlimeVR-Tracker-ESP#322 (comment) Discussion: SlimeVR/SlimeVR-Server#1100
dingyifei
added a commit
to dingyifei/SlimeVR-Tracker-ESP
that referenced
this pull request
Nov 24, 2024
commit 56c3bbb Author: Timo Witte <timo.witte@gmail.com> Date: Sat Jun 29 00:26:42 2024 +0200 more change neutrality commit c8b2b17 Author: Timo Witte <timo.witte@gmail.com> Date: Sat Jun 29 00:24:28 2024 +0200 make it change neutral commit 9fa57ec Author: Timo Witte <timo.witte@gmail.com> Date: Sat Jun 29 00:23:47 2024 +0200 remove 2s wait in main.cpp it´s not required commit 69b07bc Author: Timo Witte <timo.witte@gmail.com> Date: Sat Jun 29 00:21:17 2024 +0200 remove change that does nothing commit f6cd9a8 Author: Timo Witte <timo.witte@gmail.com> Date: Sat Jun 29 00:19:27 2024 +0200 serial over USB commit 6d37c3d Author: Timo Witte <timo.witte@gmail.com> Date: Fri Jun 28 23:45:18 2024 +0200 update to latest tasmota tools for ESP32C6 commit 11c7a60 Merge: 230d98b fef504e Author: Spacefish <timo.witte@gmail.com> Date: Fri Jun 28 23:42:52 2024 +0200 Merge branch 'main' into fix-compiler-error commit 230d98b Author: Timo Witte <timo.witte@gmail.com> Date: Fri Jun 28 23:41:24 2024 +0200 add custom portmap for ESP32C6 commit 6914db2 Author: Timo Witte <timo.witte@gmail.com> Date: Fri Jun 28 19:47:07 2024 +0200 dont double scan i2c address on bus for ESP32C6 commit 233b256 Author: JovannMC <jovannmc@femboyfurry.net> Date: Tue Jun 25 14:36:31 2024 +0300 Add Haritora to consts (SlimeVR#333) Add haritora consts, fix misspelling commit 02bb9d3 Author: Przemyslaw Romaniak <loudpl@gmail.com> Date: Tue Jun 25 12:57:18 2024 +0200 SoftFusion sensor framework with BMI, ICM, LSM6, MPU sensor implementations (SlimeVR#322) * Update readme to mention BMI270 support. * Soft fusion sensor initial code, wip * Soft fusion ICM-42688-P lazy WIP implementation. * sfusion: Cleanup, implemented sensor frequency calibration * icm42688: add more comments, basic driver (no hw filtering) should be working * sfustion: compilation fix * sfusion: start calibration when upside down * cleanup: remove confusing had data flag * sensor manager: use unique_ptr instead of raw pointers * sfusion: big refactoring wip * sfusion: make aux work, at least sfusion sensors should now be functional * sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet * sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver * Added lsm6dsv * Trying to work around esp32c3 compilation problem, not liking that solution * sfusion: fix problems found after rebase * Update README.md * Bump Arduino core to 3.0 to match GCC12 * Remove fast pin swapping that is no longer compatible with arduino core v3 * Bring back fast pin swapping * Update platformio-tools.ini * Fix accel timescale (calibration no longer takes forever) * Fix non-sfusion sensors * Added LSM6DSO and DSR support and refactored DSV support * Removed template float param from the implementation * sfusion: port MPU6050 driver wip, not expecting to be functional yet * sfusion: add headers specifying main code owners * connection: fix warning * update README.md * fshelper: fixed ESP8266 regression caused by abstracting FS access * sfusion: fix error on merge * bno080: differentiate bno080, bno085, bno086 again * sfusion: final touches * restore hadData functionality, implementing it in every sensor, made configured flag bno-only * fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors * sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds * sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base * Log FIFO overruns on LSMs * Reset the soft watchdog while eating or collecting calibration samples Resolves an issue where the soft watchdog would trigger. * Fix missing word in comment, switch to constexpr * Update esp32/esp8266 --------- Co-authored-by: Gorbit99 <gorbitgames@gmail.com> Co-authored-by: nekomona <nekomona@nekomona.com> Co-authored-by: nekomona <nekomona@163.com> Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Co-authored-by: kounocom <meia@kouno.xyz> Co-authored-by: Kubuxu <oss@kubuxu.com> commit e04d269 Author: Fredrik Hatletvedt <32248439+Pespiri@users.noreply.github.com> Date: Thu Jun 20 01:35:00 2024 +0200 add macro for calculating radians (SlimeVR#317) * feat: add macro for calculating radians * style: silence unused variable warning * remove unnecessary float cast in macro commit 2d2b21f Author: Timo Witte <timo.witte@gmail.com> Date: Sun May 26 20:05:48 2024 +0200 fix pre-processor warning commit 8cdd036 Author: Meia Kouno <71262281+kounocom@users.noreply.github.com> Date: Sun May 5 02:35:22 2024 +0300 Fix enabling motion bias estimation (SlimeVR#325) commit 572c9be Author: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Sat May 4 19:04:08 2024 +0200 fshelper: fixed ESP8266 regression caused by abstracting FS access SlimeVR#321 (SlimeVR#328) * fshelper: fixed ESP8266 regression caused by abstracting FS access SlimeVR#321 * Removing not needed ifdef l0ud spotted that this is not need. Co-Authored-By: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> --------- Co-authored-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> commit b70eb62 Author: Timo Witte <timo.witte@gmail.com> Date: Thu May 2 00:51:05 2024 +0200 ESP32C6 support commit 8b43c3d Author: Timo Witte <timo.witte@gmail.com> Date: Wed May 1 20:10:44 2024 +0200 Designate all initializer clauses to fix compiler errors with newer compilers
Eirenliel
added a commit
that referenced
this pull request
Dec 11, 2024
* Designate all initializer clauses to fix compiler errors with newer compilers * ESP32C6 support * fshelper: fixed ESP8266 regression caused by abstracting FS access #321 (#328) * fshelper: fixed ESP8266 regression caused by abstracting FS access #321 * Removing not needed ifdef l0ud spotted that this is not need. Co-Authored-By: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> --------- Co-authored-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> * Fix enabling motion bias estimation (#325) * fix pre-processor warning * add macro for calculating radians (#317) * feat: add macro for calculating radians * style: silence unused variable warning * remove unnecessary float cast in macro * SoftFusion sensor framework with BMI, ICM, LSM6, MPU sensor implementations (#322) * Update readme to mention BMI270 support. * Soft fusion sensor initial code, wip * Soft fusion ICM-42688-P lazy WIP implementation. * sfusion: Cleanup, implemented sensor frequency calibration * icm42688: add more comments, basic driver (no hw filtering) should be working * sfustion: compilation fix * sfusion: start calibration when upside down * cleanup: remove confusing had data flag * sensor manager: use unique_ptr instead of raw pointers * sfusion: big refactoring wip * sfusion: make aux work, at least sfusion sensors should now be functional * sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet * sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver * Added lsm6dsv * Trying to work around esp32c3 compilation problem, not liking that solution * sfusion: fix problems found after rebase * Update README.md * Bump Arduino core to 3.0 to match GCC12 * Remove fast pin swapping that is no longer compatible with arduino core v3 * Bring back fast pin swapping * Update platformio-tools.ini * Fix accel timescale (calibration no longer takes forever) * Fix non-sfusion sensors * Added LSM6DSO and DSR support and refactored DSV support * Removed template float param from the implementation * sfusion: port MPU6050 driver wip, not expecting to be functional yet * sfusion: add headers specifying main code owners * connection: fix warning * update README.md * fshelper: fixed ESP8266 regression caused by abstracting FS access * sfusion: fix error on merge * bno080: differentiate bno080, bno085, bno086 again * sfusion: final touches * restore hadData functionality, implementing it in every sensor, made configured flag bno-only * fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors * sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds * sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base * Log FIFO overruns on LSMs * Reset the soft watchdog while eating or collecting calibration samples Resolves an issue where the soft watchdog would trigger. * Fix missing word in comment, switch to constexpr * Update esp32/esp8266 --------- Co-authored-by: Gorbit99 <gorbitgames@gmail.com> Co-authored-by: nekomona <nekomona@nekomona.com> Co-authored-by: nekomona <nekomona@163.com> Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Co-authored-by: kounocom <meia@kouno.xyz> Co-authored-by: Kubuxu <oss@kubuxu.com> * Add Haritora to consts (#333) Add haritora consts, fix misspelling * dont double scan i2c address on bus for ESP32C6 * add custom portmap for ESP32C6 * update to latest tasmota tools for ESP32C6 * serial over USB * remove change that does nothing * remove 2s wait in main.cpp it´s not required * make it change neutral * more change neutrality --------- Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Co-authored-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> Co-authored-by: Meia Kouno <71262281+kounocom@users.noreply.github.com> Co-authored-by: Fredrik Hatletvedt <32248439+Pespiri@users.noreply.github.com> Co-authored-by: Przemyslaw Romaniak <loudpl@gmail.com> Co-authored-by: Gorbit99 <gorbitgames@gmail.com> Co-authored-by: nekomona <nekomona@nekomona.com> Co-authored-by: nekomona <nekomona@163.com> Co-authored-by: kounocom <meia@kouno.xyz> Co-authored-by: Kubuxu <oss@kubuxu.com> Co-authored-by: JovannMC <jovannmc@femboyfurry.net> Co-authored-by: Eiren Rain <Eirenliel@users.noreply.github.com>
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.
Hi
This change is a is a collaborative effort among developers from Slime Discord to:
Sfusion is based on a simplified version of 0.dev's BMI160 driver, providing a generic sensor framework with several calibration methods for very slim drivers focused on the low-level handling of particular IMUs.
This change adds support for the following IMUs:
All drivers were tested to be functional, some are already being used in many sets (LSM6DSV, partially BMI270).
One exception: MPU6050 sfusion driver may underperform until we find a way to change "restThGyr and restThAcc" in VQF based on the sensor. I would prefer to make this separate change, as this PR is already pretty large.
Driver code is written from scratch for Slime, so I don't expect any licensing problems. Required Bosch BMI firmware is provided in separated file and it's BSD-licensed.
Existing drivers were not affected except for the current ICM42688 implementation, which was removed as it didn't work.
Drivers are as minimal as possible to reduce code size not incorporating any external libraries and to have full control over IMU programming.
Other changes: