Commit Graph

3 Commits

Author SHA1 Message Date
c331d0bac0 fix(legs, balance): invert wheel1/3 velocities and persist offset state
- Negated velocities for wheel1 and wheel3 in `control_wheels_vel` to match hardware direction, ensuring correct movement.
- Introduced `self.offs` in `BalanceController` to store offset values across calls instead of recreating them each update.
- Refactored `_update_offsets` to operate on the instance offsets, increased threshold sensitivity from 0.2 to 1, and adjusted scaling factors for smoother offset accumulation.
- Simplified offset limiting and normalization logic, removing redundant local variables.
- Updated `run_balance_loop` to initialize and use the persistent `self.offs` state.

These changes fix incorrect wheel commands and improve the stability and accuracy of the balance controller's offset handling.
2025-12-21 11:23:46 +08:00
7c3d18ffcb fix(balance): correct IMU import and add quick_test entrypoint
- Updated import in `balance.py` from `dm_imu_pkg` to the correct `dm_imu` package.
- Introduced `quick_test()` function as a convenient debugging entry point, moving the previous script execution logic into this callable.
- Modified `__main__` block to display a UI usage message instead of directly running the balance loop.
- Revised `dm_imu.egg-info/PKG-INFO` to reflect the new Gradio‑based control panel documentation and project description.
2025-12-11 12:12:12 +08:00
35efbfc91a refactor(build): restructure package layout and fix CMake build directory restoration
- Update pybind_src to point to project root instead of dm_imu subdirectory
- Change CMakeExtension module from "imu_py" to "dm_imu.imu_py"
- Switch to find_packages() with package_dir for automatic package discovery
- Add saving/restoring of CWD in CMake build to prevent directory side effects
2025-12-10 21:11:21 +08:00