|
libstp
Robotics library for Botball
|
#include <arc_motion.hpp>
Public Member Functions | |
| ArcMotion (MotionContext ctx, ArcMotionConfig config) | |
| void | start () override |
| void | update (double dt) override |
| bool | isFinished () const override |
| void | startWarm (double heading_offset_rad, double initial_angular_velocity) |
| void | setSuppressHardStopOnComplete (bool suppress) |
| bool | hasReachedAngle () const |
| double | getFilteredVelocity () const |
| const std::vector< ArcMotionTelemetry > & | getTelemetry () const |
| Public Member Functions inherited from libstp::motion::Motion | |
| Motion (MotionContext ctx) | |
| virtual | ~Motion ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from libstp::motion::Motion | |
| drive::Drive & | drive () |
| const drive::Drive & | drive () const |
| odometry::IOdometry & | odometry () |
| const odometry::IOdometry & | odometry () const |
| Protected Attributes inherited from libstp::motion::Motion | |
| MotionContext | ctx_ |
| bool | started_ {false} |
Closed-loop controller for driving along a circular arc.
Uses a profiled PID on heading (like TurnMotion) and derives the forward velocity from the angular velocity command: vx = |omega| * radius. This produces coordinated acceleration/deceleration along the arc.
The max angular velocity is limited to ensure the derived forward velocity does not exceed the linear axis limits.
Definition at line 74 of file arc_motion.hpp.
| libstp::motion::ArcMotion::ArcMotion | ( | MotionContext | ctx, |
| ArcMotionConfig | config ) |
|
inlinenodiscard |
Current filtered angular velocity (rad/s).
Definition at line 98 of file arc_motion.hpp.
|
inlinenodiscard |
Definition at line 100 of file arc_motion.hpp.
|
nodiscard |
Check if target arc angle is reached, ignoring velocity settling.
|
nodiscardoverridevirtual |
Return true once the primitive has met its completion criteria.
Implements libstp::motion::Motion.
|
inline |
When true, complete() sets finished_ without calling hardStop().
Definition at line 92 of file arc_motion.hpp.
|
overridevirtual |
Capture initial state and prepare controller internals.
Implements libstp::motion::Motion.
| void libstp::motion::ArcMotion::startWarm | ( | double | heading_offset_rad, |
| double | initial_angular_velocity ) |
Begin arc from current state without resetting odometry.
| heading_offset_rad | Current heading (subtracted from reads) |
| initial_angular_velocity | Current angular velocity to seed the profile with |
|
overridevirtual |
Advance the controller by one iteration using the loop delta in seconds.
Implements libstp::motion::Motion.