feat: Slope tilt compensation (Issue #600) #609
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-controls/issue-600-slope-compensation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements Issue #600: slow-adapting terrain slope estimator so the balance controller can maintain upright posture on inclined surfaces.
Changes
New:
include/slope_estimator.h+src/slope_estimator.cslope_estimator_init/reset/update/get_deg/set_enabled/send_tlmAPIslope_x100(int16) +activeflagModified:
include/jlink.h+src/jlink.cJLINK_TLM_SLOPE 0x88utelemetry IDjlink_tlm_slope_t(4 bytes packed)jlink_send_slope_tlm()implementation (10-byte frame)Modified:
include/balance.h+src/balance.cslope_estimator_t slopefield tobalance_tbalance_init(): callsslope_estimator_init()balance_update(): advances IIR each tick; subtracts estimate from pitch before PID error:tilt_corrected = pitch_deg - slope_estimate_degslope_estimator_reset()to avoid stale state on re-armNew:
test/test_slope_estimator.cCloses #600