|
libstp
Robotics library for Botball
|
Hardware-health entry point. Implemented per platform bundle. More...
#include <Platform.hpp>
Static Public Member Functions | |
| static ProbeResult | probe (const ProbeOptions &options={}) |
| static void | requireHealthy (const ProbeOptions &options={}) |
| static void | setMockProbeFailure (Component component, bool fail) |
| static void | clearMockProbeFailures () |
| Reset all forced failures set by setMockProbeFailure. | |
| static std::shared_ptr< libstp::odometry::IOdometry > | createOdometry (std::shared_ptr< libstp::kinematics::IKinematics > kinematics) |
| static bool | commandChassisVelocity (float vx, float vy, float wz) |
Hardware-health entry point. Implemented per platform bundle.
Definition at line 96 of file Platform.hpp.
|
static |
Reset all forced failures set by setMockProbeFailure.
|
static |
Command a body-frame chassis velocity [vx (m/s), vy (m/s), wz (rad/s)] to the coprocessor's on-board chassis velocity loop (MOT_MODE_CHASSIS): the wombat bundle forwards it to the STM32, which maps it to per-wheel setpoints via forward kinematics and runs the per-motor PID. Requires kinematics to have been pushed already (createOdometry sends it). High-rate, best-effort.
|
static |
Construct the platform-canonical odometry implementation.
Each platform bundle owns one odometry implementation that is the single source of truth for pose. The wombat bundle returns an implementation that reads STM32-computed dead-reckoning over LCM; the mock bundle returns an in-process implementation suitable for tests. Higher layers should not select between odometry types — they take whatever the platform provides.
kinematics is forwarded so the implementation can push the pre-baked kinematics matrix to the coprocessor where applicable.
|
static |
Run the platform health-check synchronously. Safe to call multiple times; callers typically invoke it once at the start of run().
|
static |
Convenience that calls probe() and throws ProbeFailedError when a required component fails. Used by GenericRobot._run_missions to refuse to start on a broken robot.
|
static |
Test hook (mock platform only). Forces the named component to report a failure on the next probe() call. No-op on wombat so production callers are immune to misuse.