|
libstp
Robotics library for Botball
|
Characterizes a robot's physical drive limits at raw motor power. More...
#include <characterize_drive.hpp>
Public Member Functions | |
| DriveCharacterizer (drive::Drive &drive, odometry::IOdometry &odometry) | |
| AxisResult | characterizeAxis (const std::string &axis, const CharacterizeConfig &cfg) const |
| Characterize a single axis. | |
| std::map< std::string, AxisResult > | characterize (const std::vector< std::string > &axes, const CharacterizeConfig &cfg) const |
| Characterize multiple axes in sequence. | |
Characterizes a robot's physical drive limits at raw motor power.
Bypasses all velocity control (library PID and firmware BEMF PID) by commanding raw PWM via Drive::applyPowerCommand(). For each axis the characterizer runs multiple accel + decel trials and takes the median of each metric across trials.
Sampling is performed at up to 500 Hz in a tight C++ sleep loop, which allows significantly higher resolution than the Python asyncio-based implementation (formerly ~100 Hz).
Definition at line 29 of file characterize_drive.hpp.
| libstp::autotune::DriveCharacterizer::DriveCharacterizer | ( | drive::Drive & | drive, |
| odometry::IOdometry & | odometry ) |
| drive | Chassis drive controller (reference, not owned). |
| odometry | Odometry source (reference, not owned). |
|
nodiscard |
Characterize multiple axes in sequence.
| axes | Axis names to measure (e.g. {"forward", "angular"}). |
| cfg | Measurement configuration shared across all axes. |
|
nodiscard |
Characterize a single axis.
| axis | One of "forward", "lateral", or "angular". |
| cfg | Measurement configuration. |