|
| constexpr | LinearPath (wpi::math::TrapezoidProfile< wpi::units::meters >::Constraints linear, wpi::math::TrapezoidProfile< wpi::units::radians >::Constraints angular) |
| | Constructs a linear path.
|
| constexpr State | Calculate (wpi::units::second_t t, State const ¤t, Pose2d const &goal) |
| | Calculates the pose and velocity of the path at a time t where the current state is at t = 0.
|
| constexpr wpi::units::second_t | TotalTime () const |
| | Returns the total time the profile takes to reach the goal.
|
| constexpr bool | IsFinished (wpi::units::second_t t) const |
| | Returns true if the profile has reached the goal.
|
A linear path for a holonomic drivetrain (i.e.
swerve or mechanum). This generates profiled setpoints for the robot along a straight line based on trapezoidal velocity constraints (using wpi#math#TrapezoidProfile).
Initialization:
TrapezoidProfile::Constraints{kMaxV, kMaxA},
TrapezoidProfile::Constraints{kMaxOmega, kMaxAlpha}
};
LinearPath::State current{initialPose, initialFieldSpeeds};
constexpr LinearPath(wpi::math::TrapezoidProfile< wpi::units::meters >::Constraints linear, wpi::math::TrapezoidProfile< wpi::units::radians >::Constraints angular)
Constructs a linear path.
Definition LinearPath.hpp:151
Run on update:
current = path.Calculate(timeSincePreviousUpdate, current, targetPose);