libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::motion::LinearMotionConfig Struct Reference

#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}

Detailed Description

Configuration for a straight-line motion along one chassis axis.

distance_m follows the robot body frame:

  • forward axis: positive = forward, negative = backward
  • lateral axis: positive = right, negative = left

Definition at line 27 of file linear_motion.hpp.

Member Data Documentation

◆ axis

LinearAxis libstp::motion::LinearMotionConfig::axis {LinearAxis::Forward}

Definition at line 29 of file linear_motion.hpp.

◆ distance_m

double libstp::motion::LinearMotionConfig::distance_m {0.0}

Definition at line 30 of file linear_motion.hpp.

◆ has_distance_target

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.

◆ speed_scale

double libstp::motion::LinearMotionConfig::speed_scale {1.0}

Definition at line 31 of file linear_motion.hpp.

◆ target_heading_rad

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.


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