libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::autotune::StaticFrictionMeasurer Class Reference

Per-motor static-friction (kS) measurement. More...

#include <static_friction.hpp>

Public Member Functions

 StaticFrictionMeasurer (const std::vector< hal::motor::IMotor * > &motors)
StaticFrictionResult measureMotor (hal::motor::IMotor *motor, const StaticFrictionConfig &cfg) const
 Measure a single motor.
std::map< int, StaticFrictionResult > measure (const StaticFrictionConfig &cfg) const
 Measure every motor passed at construction.

Detailed Description

Per-motor static-friction (kS) measurement.

Sweeps the PWM duty from start_pct upward until the measured BEMF median crosses a "moving" threshold; repeats in reverse. The minimum percentage at which the motor starts spinning is the static-friction compensation value used by feedforward controllers.

Definition at line 19 of file static_friction.hpp.

Constructor & Destructor Documentation

◆ StaticFrictionMeasurer()

libstp::autotune::StaticFrictionMeasurer::StaticFrictionMeasurer ( const std::vector< hal::motor::IMotor * > & motors)
explicit

Member Function Documentation

◆ measure()

std::map< int, StaticFrictionResult > libstp::autotune::StaticFrictionMeasurer::measure ( const StaticFrictionConfig & cfg) const
nodiscard

Measure every motor passed at construction.

Returns
Map from motor port to measurement result.

◆ measureMotor()

StaticFrictionResult libstp::autotune::StaticFrictionMeasurer::measureMotor ( hal::motor::IMotor * motor,
const StaticFrictionConfig & cfg ) const
nodiscard

Measure a single motor.


The documentation for this class was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-autotune/include/autotune/static_friction.hpp