public class DriveConstraints implements TrajectoryConstraints
This class describes general robot trajectory constraints. More specifically, for paths, the robot velocity, robot acceleration, and robot angular velocity are limited. For point turns, the angular velocity and angular acceleration are limited. If maxJerk or maxAngJerk are 0, acceleration-limited fallbacks will be used.
Modifier and Type | Field and Description |
---|---|
double |
maxAccel
maximum robot acceleration
|
double |
maxAngAccel
maximum angular acceleration
|
double |
maxAngJerk
maximum angular jerk
|
double |
maxAngVel
maximum angular velocity
|
double |
maxJerk
maximum robot jerk
|
double |
maxVel
maximum robot velocity
|
Constructor and Description |
---|
DriveConstraints(double maxVel,
double maxAccel,
double maxJerk,
double maxAngVel,
double maxAngAccel,
double maxAngJerk)
This class describes general robot trajectory constraints. More specifically, for paths, the robot velocity,
robot acceleration, and robot angular velocity are limited. For point turns, the angular velocity and angular
acceleration are limited. If maxJerk or maxAngJerk are 0, acceleration-limited fallbacks will be used.
|
Modifier and Type | Method and Description |
---|---|
SimpleMotionConstraints |
get(Pose2d pose,
Pose2d deriv,
Pose2d secondDeriv)
Returns the maximum velocity and acceleration for the given pose derivatives.
|
get
@JvmField public double maxVel
maximum robot velocity
@JvmField public double maxAccel
maximum robot acceleration
@JvmField public double maxJerk
maximum robot jerk
(ignored by dynamic profiles)
@JvmField public double maxAngVel
maximum angular velocity
@JvmField public double maxAngAccel
maximum angular acceleration
(ignored by trajectories)
@JvmField public double maxAngJerk
maximum angular jerk
(ignored by trajectories)
public DriveConstraints(double maxVel, double maxAccel, double maxJerk, double maxAngVel, double maxAngAccel, double maxAngJerk)
This class describes general robot trajectory constraints. More specifically, for paths, the robot velocity, robot acceleration, and robot angular velocity are limited. For point turns, the angular velocity and angular acceleration are limited. If maxJerk or maxAngJerk are 0, acceleration-limited fallbacks will be used.
maxVel
- maximum robot velocitymaxAccel
- maximum robot accelerationmaxJerk
- maximum robot jerk (ignored by dynamic profiles)maxAngVel
- maximum angular velocitymaxAngAccel
- maximum angular acceleration (ignored by trajectories)maxAngJerk
- maximum angular jerk (ignored by trajectories)@NotNull public SimpleMotionConstraints get(@NotNull Pose2d pose, @NotNull Pose2d deriv, @NotNull Pose2d secondDeriv)
Returns the maximum velocity and acceleration for the given pose derivatives.
pose
- posederiv
- pose derivativesecondDeriv
- pose second derivative