Represents a single discrete state sample along a trajectory.
More...
#include <trajectory.h>
|
|
| State ()=default |
| | Default constructor.
|
| | State (units::Time t, units::Velocity velocity, units::Acceleration acceleration, Pose2d pose, units::Curvature curvature, units::Length s=0_in) |
| | Constructs a Trajectory State with explicit values.
|
|
bool | operator== (const State &other) const |
| | Checks equality between two States.
|
| State | interpolate (State end_value, double i) const |
| | Linearly interpolates between this state and end_value at fraction i in [0, 1].
|
|
|
units::Time | t = 0_s |
| | Elapsed time from trajectory start.
|
|
units::Length | s = 0_in |
| | Distance along trajectory.
|
|
units::Velocity | velocity = 0_inps |
| | Linear chassis velocity.
|
|
units::Acceleration | acceleration = 0_inps2 |
| | Linear chassis acceleration.
|
|
Pose2d | pose {} |
| | 2D robot pose (x, y, theta)
|
|
units::Curvature | curvature = 0_radpm |
| | Path curvature at pose.
|
Represents a single discrete state sample along a trajectory.
◆ State()
| Trajectory::State::State |
( |
units::Time | t, |
|
|
units::Velocity | velocity, |
|
|
units::Acceleration | acceleration, |
|
|
Pose2d | pose, |
|
|
units::Curvature | curvature, |
|
|
units::Length | s = 0_in ) |
|
inline |
Constructs a Trajectory State with explicit values.
- Parameters
-
| t | Sample time. |
| velocity | Linear velocity. |
| acceleration | Linear acceleration. |
| pose | 2D pose. |
| curvature | Path curvature. |
| s | Distance along trajectory. |
◆ interpolate()
| State Trajectory::State::interpolate |
( |
State | end_value, |
|
|
double | i ) const |
|
inline |
Linearly interpolates between this state and end_value at fraction i in [0, 1].
- Parameters
-
| end_value | Target state for interpolation. |
| i | Interpolation fraction ratio [0, 1]. |
- Returns
- Interpolated State.
The documentation for this struct was generated from the following file: