mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Remove deprecated code (#8656)
This commit is contained in:
@@ -67,48 +67,6 @@ class WPILIB_DLLEXPORT ArmFeedforward {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the feedforward from the gains and setpoints assuming continuous
|
||||
* control.
|
||||
*
|
||||
* @param angle The angle setpoint, in radians. This angle should be
|
||||
* measured from the horizontal (i.e. if the provided
|
||||
* angle is 0, the arm should be parallel to the floor).
|
||||
* If your encoder does not follow this convention, an
|
||||
* offset should be added.
|
||||
* @param velocity The velocity setpoint.
|
||||
* @param acceleration The acceleration setpoint.
|
||||
* @return The computed feedforward, in volts.
|
||||
*/
|
||||
[[deprecated("Use the current/next velocity overload instead.")]]
|
||||
constexpr wpi::units::volt_t Calculate(
|
||||
wpi::units::unit_t<Angle> angle, wpi::units::unit_t<Velocity> velocity,
|
||||
wpi::units::unit_t<Acceleration> acceleration) const {
|
||||
return kS * wpi::util::sgn(velocity) + kG * wpi::units::math::cos(angle) +
|
||||
kV * velocity + kA * acceleration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the feedforward from the gains and setpoints assuming continuous
|
||||
* control.
|
||||
*
|
||||
* @param currentAngle The current angle in radians. This angle should be
|
||||
* measured from the horizontal (i.e. if the provided angle is 0, the arm
|
||||
* should be parallel to the floor). If your encoder does not follow this
|
||||
* convention, an offset should be added.
|
||||
* @param currentVelocity The current velocity setpoint.
|
||||
* @param nextVelocity The next velocity setpoint.
|
||||
* @param dt Time between velocity setpoints in seconds.
|
||||
* @return The computed feedforward in volts.
|
||||
*/
|
||||
[[deprecated("Use the current/next velocity overload instead.")]]
|
||||
wpi::units::volt_t Calculate(wpi::units::unit_t<Angle> currentAngle,
|
||||
wpi::units::unit_t<Velocity> currentVelocity,
|
||||
wpi::units::unit_t<Velocity> nextVelocity,
|
||||
wpi::units::second_t dt) const {
|
||||
return Calculate(currentAngle, currentVelocity, nextVelocity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the feedforward from the gains and setpoint assuming discrete
|
||||
* control. Use this method when the velocity does not change.
|
||||
|
||||
@@ -192,28 +192,6 @@ class WPILIB_DLLEXPORT PIDController
|
||||
return m_errorDerivativeTolerance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the position tolerance of this controller.
|
||||
*
|
||||
* @return The position tolerance of the controller.
|
||||
* @deprecated Use GetErrorTolerance() instead.
|
||||
*/
|
||||
[[deprecated("Use the GetErrorTolerance method instead.")]]
|
||||
constexpr double GetPositionTolerance() const {
|
||||
return m_errorTolerance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the velocity tolerance of this controller.
|
||||
*
|
||||
* @return The velocity tolerance of the controller.
|
||||
* @deprecated Use GetErrorDerivativeTolerance() instead.
|
||||
*/
|
||||
[[deprecated("Use the GetErrorDerivativeTolerance method instead.")]]
|
||||
constexpr double GetVelocityTolerance() const {
|
||||
return m_errorDerivativeTolerance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the accumulated error used in the integral calculation of this
|
||||
* controller.
|
||||
@@ -328,24 +306,6 @@ class WPILIB_DLLEXPORT PIDController
|
||||
*/
|
||||
constexpr double GetErrorDerivative() const { return m_errorDerivative; }
|
||||
|
||||
/**
|
||||
* Returns the difference between the setpoint and the measurement.
|
||||
* @deprecated Use GetError() instead.
|
||||
*/
|
||||
[[deprecated("Use GetError method instead.")]]
|
||||
constexpr double GetPositionError() const {
|
||||
return m_error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the velocity error.
|
||||
* @deprecated Use GetErrorDerivative() instead.
|
||||
*/
|
||||
[[deprecated("Use GetErrorDerivative method instead.")]]
|
||||
constexpr double GetVelocityError() const {
|
||||
return m_errorDerivative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next output of the PID controller.
|
||||
*
|
||||
|
||||
@@ -21,26 +21,6 @@ namespace wpi::math {
|
||||
template <std::derived_from<TrajectoryConstraint> Constraint>
|
||||
class EllipticalRegionConstraint : public TrajectoryConstraint {
|
||||
public:
|
||||
/**
|
||||
* Constructs a new EllipticalRegionConstraint.
|
||||
*
|
||||
* @param center The center of the ellipse in which to enforce the constraint.
|
||||
* @param xWidth The width of the ellipse in which to enforce the constraint.
|
||||
* @param yWidth The height of the ellipse in which to enforce the constraint.
|
||||
* @param rotation The rotation to apply to all radii around the origin.
|
||||
* @param constraint The constraint to enforce when the robot is within the
|
||||
* region.
|
||||
* @deprecated Use constructor taking Ellipse2d instead.
|
||||
*/
|
||||
[[deprecated("Use constructor taking Ellipse2d instead.")]]
|
||||
constexpr EllipticalRegionConstraint(const Translation2d& center,
|
||||
wpi::units::meter_t xWidth,
|
||||
wpi::units::meter_t yWidth,
|
||||
const Rotation2d& rotation,
|
||||
const Constraint& constraint)
|
||||
: m_ellipse{Pose2d{center, rotation}, xWidth / 2.0, yWidth / 2.0},
|
||||
m_constraint(constraint) {}
|
||||
|
||||
/**
|
||||
* Constructs a new EllipticalRegionConstraint.
|
||||
*
|
||||
|
||||
@@ -19,23 +19,6 @@ namespace wpi::math {
|
||||
template <std::derived_from<TrajectoryConstraint> Constraint>
|
||||
class RectangularRegionConstraint : public TrajectoryConstraint {
|
||||
public:
|
||||
/**
|
||||
* Constructs a new RectangularRegionConstraint.
|
||||
*
|
||||
* @param bottomLeftPoint The bottom left point of the rectangular region in
|
||||
* which to enforce the constraint.
|
||||
* @param topRightPoint The top right point of the rectangular region in which
|
||||
* to enforce the constraint.
|
||||
* @param constraint The constraint to enforce when the robot is within the
|
||||
* region.
|
||||
* @deprecated Use constructor taking Rectangle2d instead.
|
||||
*/
|
||||
[[deprecated("Use constructor taking Rectangle2d instead.")]]
|
||||
constexpr RectangularRegionConstraint(const Translation2d& bottomLeftPoint,
|
||||
const Translation2d& topRightPoint,
|
||||
const Constraint& constraint)
|
||||
: m_rectangle{bottomLeftPoint, topRightPoint}, m_constraint(constraint) {}
|
||||
|
||||
/**
|
||||
* Constructs a new RectangularRegionConstraint.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user