Calibration constants commonly needed for motor encoder conversions.
More...
#include <motor.hpp>
Calibration constants commonly needed for motor encoder conversions.
Definition at line 31 of file motor.hpp.
◆ MotorCalibration() [1/2]
| libstp::foundation::MotorCalibration::MotorCalibration |
( |
| ) |
|
|
default |
◆ MotorCalibration() [2/2]
| libstp::foundation::MotorCalibration::MotorCalibration |
( |
double | ticks_to_rad, |
|
|
double | vel_lpf_alpha, |
|
|
std::optional< PidGains > | pid = std::nullopt, |
|
|
double | bemf_offset = 0.0, |
|
|
double | static_friction_pct = 0.0 ) |
|
inline |
◆ validate()
| void libstp::foundation::MotorCalibration::validate |
( |
| ) |
const |
|
inline |
Throws std::invalid_argument if the calibration would silently corrupt odometry. ticks_to_rad must be strictly positive (zero would divide by zero downstream); vel_lpf_alpha is an IIR weight and must lie in [0, 1].
Definition at line 65 of file motor.hpp.
◆ bemf_offset
| double libstp::foundation::MotorCalibration::bemf_offset {0.0} |
Per-motor BEMF zero-offset (ADC counts) subtracted on the STM32 before integrating ticks, so the tick integral stays proportional to wheel angle. Calibrated by auto_tune_bemf_velocity against the calibration board (0 = no correction).
Definition at line 39 of file motor.hpp.
◆ pid
| std::optional<PidGains> libstp::foundation::MotorCalibration::pid {} |
◆ static_friction_pct
| double libstp::foundation::MotorCalibration::static_friction_pct {0.0} |
Static-friction threshold (PWM %): the minimum open-loop duty that overcomes stiction, measured by auto_tune static_friction. Stored as a per-motor calibration record (0 = unmeasured).
Definition at line 44 of file motor.hpp.
◆ ticks_to_rad
◆ vel_lpf_alpha
| double libstp::foundation::MotorCalibration::vel_lpf_alpha {0.5} |
The documentation for this struct was generated from the following file:
- /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-foundation/include/foundation/motor.hpp