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

hugo/feature/Add IMUKit #1066

Merged
merged 5 commits into from
Dec 1, 2022
Merged

hugo/feature/Add IMUKit #1066

merged 5 commits into from
Dec 1, 2022

Conversation

HPezz
Copy link
Contributor

@HPezz HPezz commented Oct 14, 2022

Introduce IMUKit which compute angles from LSM6DSOX data through Mahony algorithm [Link to Git repo inspiration].

Allows to get a correct image of Leka's orientation for approximatively 10 seconds until Earth rotation interferes too much.

@HPezz HPezz changed the base branch from develop to cedricdia-hugo/feature/Add-CoreIMULSM6DSOX October 14, 2022 14:51
@HPezz HPezz force-pushed the cedricdia-hugo/feature/Add-CoreIMULSM6DSOX branch from acf7c1e to 9187eb6 Compare October 14, 2022 14:52
@github-actions
Copy link

github-actions bot commented Oct 14, 2022

File comparision analysis report

🔖 Info

  • base: develop / 50698ea + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • head: hugo/feature/Add-IMUKit / ab0ce00 + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: OFF
Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 169972 (64%) 92172 (35%) 30928 (5%)
os 420792 (26%) 1143880 (73%) 80696 (15%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 420792 (20%) ø 80696 (15%) ø
bootloader ✔️ 169972 (8%) ø 30928 (5%) ø
functional_ut_boost_ut ✔️ 394076 (18%) ø 20456 (3%) ø
functional_ut_core_imu ✔️ 377068 (17%) ø 20432 (3%) ø
functional_ut_deep_sleep_core_buffered_serial ✔️ 360236 (17%) ø 20440 (3%) ø
functional_ut_deep_sleep_core_motor ✔️ 364412 (17%) ø 20480 (3%) ø
functional_ut_deep_sleep_core_pwm ✔️ 366612 (17%) ø 20480 (3%) ø
functional_ut_deep_sleep_log_kit ✔️ 352504 (16%) ø 20408 (3%) ø
functional_ut_deep_sleep_mbed_hal ✔️ 354216 (16%) ø 20408 (3%) ø
functional_ut_file_manager ✔️ 374536 (17%) ø 20696 (3%) ø
functional_ut_imu_kit - - 382560 (18%) - 20424 (3%) -
functional_ut_io_expander ✔️ 359232 (17%) ø 20424 (3%) ø
functional_ut_qdac ✔️ 360400 (17%) ø 20424 (3%) ø
spike_lk_accel_gyro ✔️ 71184 (3%) ø 11808 (2%) ø
spike_lk_audio ✔️ 125076 (5%) ø 14568 (2%) ø
spike_lk_behavior_kit ✔️ 190200 (9%) ø 48144 (9%) ø
spike_lk_ble ✔️ 228960 (10%) ø 28320 (5%) ø
spike_lk_bluetooth ✔️ 82948 (3%) ø 11544 (2%) ø
spike_lk_cg_animations ✔️ 144696 (6%) ø 46528 (8%) ø
spike_lk_color_kit ✔️ 65776 (3%) ø 13744 (2%) ø
spike_lk_command_kit ✔️ 193048 (9%) ø 50968 (9%) ø
spike_lk_config_kit ✔️ 126956 (6%) ø 14312 (2%) ø
spike_lk_coreled ✔️ 76164 (3%) ø 13688 (2%) ø
spike_lk_core_touch_sensor ✔️ 80228 (3%) ø 12256 (2%) ø
spike_lk_event_queue ✔️ 74800 (3%) ø 12072 (2%) ø
spike_lk_file_manager_kit ✔️ 139016 (6%) ø 14416 (2%) ø
spike_lk_file_reception ✔️ 327112 (15%) ø 27576 (5%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_fs ✔️ 174872 (8%) ø 47904 (9%) ø
spike_lk_imu_kit - - 87700 (4%) - 12176 (2%) -
spike_lk_lcd ✔️ 162492 (7%) ø 46632 (8%) ø
spike_lk_led_kit ✔️ 103992 (4%) ø 14608 (2%) ø
spike_lk_log_kit ✔️ 63288 (3%) ø 12256 (2%) ø
spike_lk_motors ✔️ 62864 (2%) ø 11488 (2%) ø
spike_lk_qdac ✔️ 78628 (3%) ø 11816 (2%) ø
spike_lk_reinforcer ✔️ 103480 (4%) ø 14608 (2%) ø
spike_lk_rfid ✔️ 78956 (3%) ø 11504 (2%) ø
spike_lk_sensors_battery ✔️ 78196 (3%) ø 12568 (2%) ø
spike_lk_sensors_light ✔️ 60056 (2%) ø 11440 (2%) ø
spike_lk_sensors_microphone ✔️ 72496 (3%) ø 11504 (2%) ø
spike_lk_sensors_temperature_humidity ✔️ 67048 (3%) ø 11424 (2%) ø
spike_lk_sensors_touch ✔️ 68600 (3%) ø 11432 (2%) ø
spike_lk_serial_number ✔️ 114308 (5%) ø 14056 (2%) ø
spike_lk_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_update_process_app_base ✔️ 143188 (6%) ø 15552 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_watchdog_isr ✔️ 80068 (3%) ø 13272 (2%) ø
spike_lk_wifi ✔️ 116392 (5%) ø 14808 (2%) ø
spike_mbed_blinky ✔️ 58032 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 63208 (3%) ø 12448 (2%) ø
spike_stl_cxxsupport ✔️ 58456 (2%) ø 11400 (2%) ø

🗺️ Map files diff output

Click to show diff list
functional_ut_imu_kit (click to expand)

Flash used: 382560 (18%) / total: 2097152
SRAM used: 20424 (3%) / total: 524288
spike_lk_imu_kit (click to expand)

Flash used: 87700 (4%) / total: 2097152
SRAM used: 12176 (2%) / total: 524288

@github-actions
Copy link

github-actions bot commented Oct 14, 2022

File comparision analysis report

🔖 Info

  • base: develop / 50698ea + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • head: hugo/feature/Add-IMUKit / ab0ce00 + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: ON
Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 182476 (69%) 79668 (30%) 41624 (7%)
os 472084 (30%) 1092588 (69%) 91912 (17%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 472084 (22%) ø 91912 (17%) ø
bootloader ✔️ 182476 (8%) ø 41624 (7%) ø
functional_ut_boost_ut ✔️ 409116 (19%) ø 30608 (5%) ø
functional_ut_core_imu ✔️ 389100 (18%) ø 30584 (5%) ø
functional_ut_deep_sleep_core_buffered_serial ✔️ 368060 (17%) ø 30560 (5%) ø
functional_ut_deep_sleep_core_motor ✔️ 375996 (17%) ø 30632 (5%) ø
functional_ut_deep_sleep_core_pwm ✔️ 378196 (18%) ø 30632 (5%) ø
functional_ut_deep_sleep_log_kit ✔️ 365188 (17%) ø 30976 (5%) ø
functional_ut_deep_sleep_mbed_hal ✔️ 366568 (17%) ø 30560 (5%) ø
functional_ut_file_manager ✔️ 386340 (18%) ø 30856 (5%) ø
functional_ut_imu_kit - - 391308 (18%) - 30576 (5%) -
functional_ut_io_expander ✔️ 370816 (17%) ø 30576 (5%) ø
functional_ut_qdac ✔️ 371984 (17%) ø 30576 (5%) ø
spike_lk_accel_gyro ✔️ 94048 (4%) ø 22568 (4%) ø
spike_lk_audio ✔️ 135196 (6%) ø 25144 (4%) ø
spike_lk_behavior_kit ✔️ 198764 (9%) ø 58720 (11%) ø
spike_lk_ble ✔️ 237196 (11%) ø 39264 (7%) ø
spike_lk_bluetooth ✔️ 92364 (4%) ø 22224 (4%) ø
spike_lk_cg_animations ✔️ 152392 (7%) ø 57224 (10%) ø
spike_lk_color_kit ✔️ 88480 (4%) ø 24376 (4%) ø
spike_lk_command_kit ✔️ 203372 (9%) ø 62056 (11%) ø
spike_lk_config_kit ✔️ 138932 (6%) ø 25136 (4%) ø
spike_lk_coreled ✔️ 88044 (4%) ø 24264 (4%) ø
spike_lk_core_touch_sensor ✔️ 92884 (4%) ø 22832 (4%) ø
spike_lk_event_queue ✔️ 84152 (4%) ø 22904 (4%) ø
spike_lk_file_manager_kit ✔️ 154048 (7%) ø 25496 (4%) ø
spike_lk_file_reception ✔️ 331308 (15%) ø 38232 (7%) ø
spike_lk_flash_memory ✔️ 86776 (4%) ø 22216 (4%) ø
spike_lk_fs ✔️ 174168 (8%) ø 47992 (9%) ø
spike_lk_imu_kit - - 97920 (4%) - 22896 (4%) -
spike_lk_lcd ✔️ 172332 (8%) ø 57464 (10%) ø
spike_lk_led_kit ✔️ 115772 (5%) ø 25184 (4%) ø
spike_lk_log_kit ✔️ 84776 (4%) ø 23408 (4%) ø
spike_lk_motors ✔️ 86336 (4%) ø 22248 (4%) ø
spike_lk_qdac ✔️ 91572 (4%) ø 22776 (4%) ø
spike_lk_reinforcer ✔️ 112316 (5%) ø 25184 (4%) ø
spike_lk_rfid ✔️ 84088 (4%) ø 22184 (4%) ø
spike_lk_sensors_battery ✔️ 87184 (4%) ø 23280 (4%) ø
spike_lk_sensors_light ✔️ 84072 (4%) ø 22216 (4%) ø
spike_lk_sensors_microphone ✔️ 84824 (4%) ø 22216 (4%) ø
spike_lk_sensors_temperature_humidity ✔️ 90400 (4%) ø 22192 (4%) ø
spike_lk_sensors_touch ✔️ 91672 (4%) ø 22456 (4%) ø
spike_lk_serial_number ✔️ 136316 (6%) ø 25056 (4%) ø
spike_lk_ticker_timeout ✔️ 82712 (3%) ø 22232 (4%) ø
spike_lk_update_process_app_base ✔️ 154980 (7%) ø 26256 (5%) ø
spike_lk_update_process_app_update ✔️ 100456 (4%) ø 23240 (4%) ø
spike_lk_watchdog_isr ✔️ 87392 (4%) ø 24120 (4%) ø
spike_lk_wifi ✔️ 130832 (6%) ø 25528 (4%) ø
spike_mbed_blinky ✔️ 57616 (2%) ø 11496 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84176 (4%) ø 23080 (4%) ø
spike_stl_cxxsupport ✔️ 83488 (3%) ø 22304 (4%) ø

🗺️ Map files diff output

Click to show diff list
functional_ut_imu_kit (click to expand)

Flash used: 391308 (18%) / total: 2097152
SRAM used: 30576 (5%) / total: 524288
spike_lk_imu_kit (click to expand)

Flash used: 97920 (4%) / total: 2097152
SRAM used: 22896 (4%) / total: 524288

@HPezz HPezz force-pushed the hugo/feature/Add-IMUKit branch 2 times, most recently from ae5127d to 5f535ee Compare October 14, 2022 15:48
@HPezz HPezz changed the base branch from cedricdia-hugo/feature/Add-CoreIMULSM6DSOX to cedric-hugo/feature/Add-CoreIMU November 2, 2022 15:40
@HPezz HPezz force-pushed the hugo/feature/Add-IMUKit branch 2 times, most recently from 7f2fad4 to 7c60aa5 Compare November 2, 2022 15:48
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 3 times, most recently from 57551af to 902cf1e Compare November 3, 2022 11:15
@HPezz HPezz self-assigned this Nov 3, 2022
@HPezz HPezz added the 01 - type: task Something to do label Nov 3, 2022
@HPezz HPezz added this to the Future Release milestone Nov 3, 2022
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch from 902cf1e to c851851 Compare November 3, 2022 13:43
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 3 times, most recently from 108e916 to 55869f7 Compare November 8, 2022 17:30
@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Merging #1066 (420a47d) into develop (50698ea) will increase coverage by 0.00%.
The diff coverage is 96.77%.

❗ Current head 420a47d differs from pull request most recent head ab0ce00. Consider uploading reports for the commit ab0ce00 to get more accurate results

@@            Coverage Diff            @@
##           develop    #1066    +/-   ##
=========================================
  Coverage    96.00%   96.01%            
=========================================
  Files          138      142     +4     
  Lines         3327     3435   +108     
=========================================
+ Hits          3194     3298   +104     
- Misses         133      137     +4     
Impacted Files Coverage Δ
libs/Utils/include/MathUtils.h 100.00% <ø> (ø)
libs/IMUKit/source/IMUKit.cpp 92.85% <92.85%> (ø)
libs/IMUKit/include/internal/Mahony.cpp 97.53% <97.53%> (ø)
libs/IMUKit/include/IMUKit.h 100.00% <100.00%> (ø)
libs/IMUKit/include/internal/Mahony.h 100.00% <100.00%> (ø)
libs/Utils/source/MathUtils.cpp 100.00% <100.00%> (ø)
libs/RobotKit/include/RobotController.h 93.56% <0.00%> (-0.09%) ⬇️
libs/FirmwareKit/include/FirmwareKit.h 100.00% <0.00%> (ø)
libs/FirmwareKit/source/FirmwareKit.cpp 100.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 6 times, most recently from 9f57f7f to 7abd27d Compare November 10, 2022 14:53
@HPezz HPezz force-pushed the hugo/feature/Add-IMUKit branch 4 times, most recently from 7a51cbd to 3151e85 Compare November 30, 2022 10:48
@HPezz HPezz changed the base branch from develop to hugo/refactor/Increase-run-functional-test-timeout November 30, 2022 10:49
Copy link
Member

@YannLocatelli YannLocatelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thank you for you work 👏

libs/IMUKit/include/internal/Mahony.cpp Outdated Show resolved Hide resolved
libs/Utils/tests/MathUtils_test_invSqrt.cpp Outdated Show resolved Hide resolved
libs/IMUKit/include/IMUKit.h Outdated Show resolved Hide resolved
@HPezz HPezz force-pushed the hugo/refactor/Increase-run-functional-test-timeout branch from 82b1f85 to 4bb1896 Compare December 1, 2022 11:06
@ladislas ladislas force-pushed the hugo/refactor/Increase-run-functional-test-timeout branch from 4bb1896 to e680e64 Compare December 1, 2022 12:27
Base automatically changed from hugo/refactor/Increase-run-functional-test-timeout to develop December 1, 2022 12:27
@HPezz HPezz force-pushed the hugo/feature/Add-IMUKit branch 2 times, most recently from e9e3e24 to 7e9dcf2 Compare December 1, 2022 13:05
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a lot of things have changed, I've made a new detailed review. A few tweaks and fixes and we're good to go ;)

great work again on the coverage and the tests 👍

libs/IMUKit/include/internal/Mahony.cpp Outdated Show resolved Hide resolved
libs/IMUKit/include/internal/Mahony.cpp Outdated Show resolved Hide resolved
libs/IMUKit/include/internal/Mahony.h Outdated Show resolved Hide resolved
libs/IMUKit/include/internal/Mahony.h Outdated Show resolved Hide resolved
libs/IMUKit/include/internal/Mahony.h Outdated Show resolved Hide resolved
libs/Utils/source/MathUtils.cpp Outdated Show resolved Hide resolved
libs/Utils/source/MathUtils.cpp Show resolved Hide resolved
libs/Utils/tests/MathUtils_test_invSqrt.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_kit/main.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_kit/main.cpp Outdated Show resolved Hide resolved
@HPezz HPezz force-pushed the hugo/feature/Add-IMUKit branch 3 times, most recently from 6f6bf06 to 36a0489 Compare December 1, 2022 15:13
@sonarcloud
Copy link

sonarcloud bot commented Dec 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.2% 94.2% Coverage
0.0% 0.0% Duplication

@ladislas ladislas merged commit 537aecf into develop Dec 1, 2022
@ladislas ladislas deleted the hugo/feature/Add-IMUKit branch December 1, 2022 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - type: task Something to do
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants