diff --git a/wpimath/src/main/java/edu/wpi/first/math/controller/ProfiledPIDController.java b/wpimath/src/main/java/edu/wpi/first/math/controller/ProfiledPIDController.java index 02cc17d720..a832472d3f 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/controller/ProfiledPIDController.java +++ b/wpimath/src/main/java/edu/wpi/first/math/controller/ProfiledPIDController.java @@ -199,6 +199,15 @@ public class ProfiledPIDController implements Sendable { m_constraints = constraints; } + /** + * Get the velocity and acceleration constraints for this controller. + * + * @return Velocity and acceleration constraints. + */ + public TrapezoidProfile.Constraints getConstraints() { + return m_constraints; + } + /** * Returns the current setpoint of the ProfiledPIDController. * diff --git a/wpimath/src/main/native/include/frc/controller/ProfiledPIDController.h b/wpimath/src/main/native/include/frc/controller/ProfiledPIDController.h index 8491118083..4e32c13c6d 100644 --- a/wpimath/src/main/native/include/frc/controller/ProfiledPIDController.h +++ b/wpimath/src/main/native/include/frc/controller/ProfiledPIDController.h @@ -185,6 +185,12 @@ class ProfiledPIDController */ void SetConstraints(Constraints constraints) { m_constraints = constraints; } + /** + * Get the velocity and acceleration constraints for this controller. + * @return Velocity and acceleration constraints. + */ + Constraints GetConstraints() { return m_constraints; } + /** * Returns the current setpoint of the ProfiledPIDController. *