BemfVelocityResult tune(const BemfVelocityConfig &cfg) const
BemfVelocityTuner(drive::Drive &drive, odometry::IOdometry &odometry)
Per-motor fit + linearity diagnostics across the speed sweep.
double bemf_omega_intercept
bool linear
cv low AND r² high AND |intercept| small
double ticks_to_rad_median
value chosen for persistence
Configuration for BemfVelocityTuner.
double segment_timeout_s
Safety cap on a single forward segment (pre-roll + window). Seconds.
double min_window_ticks
Reject a per-motor result whose accumulated |ticks| is below this.
double pre_roll_distance_m
int return_pwm_percent
PWM used to drive back toward the origin between segments (percent).
std::vector< int > pwm_levels
double settle_s
Settle/brake dwell between segments. Seconds.
double min_window_distance_m
double return_tolerance_m
How close to the origin the return move tries to get. Meters.
double measure_distance_m
Ground-truth distance of the measurement window itself. Meters.
One measurement window at a single PWM level.
std::array< double, 4 > delta_ticks
accumulated BEMF ticks per motor
std::array< double, 4 > ticks_to_rad
(D/r)/|Δticks| per motor
std::array< double, 4 > median_bemf
median |instantaneous BEMF| per motor
double ground_truth_distance_m
calibration-board displacement
double body_speed_mps
distance / time (≈ steady state)
double wheel_omega_rad_s
body_speed / wheel_radius
Full result of a BEMF→velocity calibration run.
std::array< BemfMotorFit, 4 > motors
std::array< double, 4 > bemf_offset
per-motor BEMF offset (counts)
std::string failure_reason
std::vector< BemfVelocityPoint > points
std::array< double, 4 > ticks_to_rad
chosen per-motor value