Balance bot: ESP32 PID balance controller with BLE dashboard#3
Open
JaredBaileyDuke wants to merge 5 commits into
Open
Balance bot: ESP32 PID balance controller with BLE dashboard#3JaredBaileyDuke wants to merge 5 commits into
JaredBaileyDuke wants to merge 5 commits into
Conversation
- packages/pid: standalone ESP-IDF component (generic PID with anti-windup) - packages/sensors: standalone ESP-IDF component (MPU6050 complementary filter) - firmware: balance.c/h, Kconfig.projbuild, 4 new BLE GATT characteristics (BALANCE_CMD, BALANCE_PID, BALANCE_STATE, BALANCE_TARGET); compile-time gated by CONFIG_BALANCE_BOT_ENABLED; goto is a Phase-1 stub pending cv merge - dashboard: balance-bot capability (joypad, PID inputs, I-dump select, goto) - protocol: 4 new UUIDs (da6–da9), regenerated uuids.js/uuids.h/uuids.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AngleFilter class (kalman.hpp): predict/update with online bias estimation, drop-in upgrade over complementary filter with same inputs (gyro rate + accel angle) - C wrapper API (kalman.h): kalman_angle_create/update/get/reset/destroy for use from .c files - Registered in firmware EXTRA_COMPONENT_DIRS; add REQUIRES kalman to any component that needs it Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- packages/complementary: standalone comp_filter_t with init/update/angle API - packages/sensors/Kconfig: BALANCE_BOT_IMU_FILTER choice (complementary default); alpha x100 for complementary; Q_angle/Q_bias/R_measure x1000 for Kalman - imu.c: delegates filtering to whichever package Kconfig selects; both packages always linked, dead code eliminated at link time - firmware CMakeLists: adds packages/complementary to EXTRA_COMPONENT_DIRS Select filter via: idf.py menuconfig -> IMU filter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Picks up motor calibration orientation, ESP32 camera lifecycle (camera_ready → camera_present), overhead ArUco helper relocation, and other main-line changes since the branch's base. Resolved: - README.md: kept main's compact code-block layout and added the new packages/ entry that documents pid + sensors + filters. - fw_info.c: kept the new #endif from balance-bot's #if CONFIG_BALANCE_BOT guard and adopted main's camera_ready → camera_present rename. - uuids generated files: regenerated to fix Windows-1252 encoded em-dash in the file banners (gen-uuids drift). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9b7decb to
23b8179
Compare
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
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.
Summary
comp_filter_t); stack-allocated, zero tuning requiredbalance.c100 Hz FreeRTOS balance controller (Core 1); compile-time gated byCONFIG_BALANCE_BOT_ENABLED; 4 new BLE GATT characteristics (BALANCE_CMD,BALANCE_PID,BALANCE_STATE,BALANCE_TARGET); goto is a Phase-1 stub pending cv branch mergeuuids.js,uuids.h,uuids.pybalance-botcapability: joypad (lean + turn), live PID inputs, I-dump dropdown, goto sectionFilter selection
idf.py menuconfig→ IMU filterBALANCE_BOT_IMU_FILTER_COMPLEMENTARYBALANCE_BOT_IMU_FILTER_KALMANBoth packages are always linked;
imu.cselects between them with#if. Dead code is eliminated at link time.balance.cis unaffected — it callsimu_update()/imu_pitch_deg()regardless of which filter is active.Test plan
CONFIG_BALANCE_BOT_ENABLED=y, complementary filter — confirm no errorsCONFIG_BALANCE_BOT_ENABLED— confirm existing motor builds unaffectedcomplementaryorkalman)TODO (Phase 2)
cvbranch merged forcvPosition)🤖 Generated with Claude Code