|
libstp
Robotics library for Botball
|
#include <linear_motion.hpp>
Public Attributes | |
| LinearAxis | axis {LinearAxis::Forward} |
| double | distance_m {0.0} |
| double | speed_scale {1.0} |
| double | target_heading_rad {0.0} |
| bool | has_distance_target {true} |
Configuration for a straight-line motion along one chassis axis.
distance_m follows the robot body frame:
Definition at line 27 of file linear_motion.hpp.
| LinearAxis libstp::motion::LinearMotionConfig::axis {LinearAxis::Forward} |
Definition at line 29 of file linear_motion.hpp.
| double libstp::motion::LinearMotionConfig::distance_m {0.0} |
Definition at line 30 of file linear_motion.hpp.
| bool libstp::motion::LinearMotionConfig::has_distance_target {true} |
True (default) when distance_m is a real positional target that drives motion completion. Set to false when callers use the controller in "until" mode — distance_m is then a sentinel upper bound and the motion terminates via an external condition.
SpeedMode (BEMF disabled) makes distance-based termination unreliable; start() raises std::logic_error if this flag is true while SpeedMode is active.
Definition at line 46 of file linear_motion.hpp.
| double libstp::motion::LinearMotionConfig::speed_scale {1.0} |
Definition at line 31 of file linear_motion.hpp.
| double libstp::motion::LinearMotionConfig::target_heading_rad {0.0} |
Absolute world-frame heading (radians) the controller holds during the motion. Required — the path executor sets this per segment. Heading PID error is computed against getAbsoluteHeading().
Definition at line 36 of file linear_motion.hpp.