mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Fix typos with cspell (#6972)
This commit is contained in:
@@ -59,7 +59,7 @@ class WPILIB_DLLEXPORT DifferentialDriveAccelerationLimiter {
|
||||
units::radians_per_second_squared_t maxAngularAccel);
|
||||
|
||||
/**
|
||||
* Returns the next voltage pair subject to acceleraiton constraints.
|
||||
* Returns the next voltage pair subject to acceleration constraints.
|
||||
*
|
||||
* @param leftVelocity The left wheel velocity.
|
||||
* @param rightVelocity The right wheel velocity.
|
||||
|
||||
@@ -59,7 +59,7 @@ class KalmanFilterLatencyCompensator {
|
||||
* @param observer The observer.
|
||||
* @param u The input at the timestamp.
|
||||
* @param localY The local output at the timestamp
|
||||
* @param timestamp The timesnap of the state.
|
||||
* @param timestamp The timestamp of the state.
|
||||
*/
|
||||
void AddObserverState(const KalmanFilterType& observer, Vectord<Inputs> u,
|
||||
Vectord<Outputs> localY, units::second_t timestamp) {
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace frc {
|
||||
* version seen in most publications. Unless you know better, this should be
|
||||
* your default choice.
|
||||
*
|
||||
* [1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilitic
|
||||
* [1] R. Van der Merwe "Sigma-Point Kalman Filters for Probabilistic
|
||||
* Inference in Dynamic State-Space Models" (Doctoral dissertation)
|
||||
*
|
||||
* @tparam States The dimensionality of the state. 2 * States + 1 weights will
|
||||
|
||||
@@ -48,7 +48,7 @@ class SteadyStateKalmanFilter {
|
||||
using OutputArray = wpi::array<double, Outputs>;
|
||||
|
||||
/**
|
||||
* Constructs a staeady-state Kalman filter with the given plant.
|
||||
* Constructs a steady-state Kalman filter with the given plant.
|
||||
*
|
||||
* See
|
||||
* https://docs.wpilib.org/en/stable/docs/software/advanced-controls/state-space/state-space-observers.html#process-and-measurement-noise-covariance-matrices
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace frc {
|
||||
* vectors using a given set of weights.
|
||||
* @param residualFunc A function that computes the residual of two state
|
||||
* vectors (i.e. it subtracts them.)
|
||||
* @param squareRootR Square-root of the noise covaraince of the sigma points.
|
||||
* @param squareRootR Square-root of the noise covariance of the sigma points.
|
||||
*
|
||||
* @return Tuple of x, mean of sigma points; S, square-root covariance of
|
||||
* sigmas.
|
||||
|
||||
@@ -50,7 +50,7 @@ struct WPILIB_DLLEXPORT ChassisSpeeds {
|
||||
}
|
||||
|
||||
/**
|
||||
* Disretizes a continuous-time chassis speed.
|
||||
* Discretizes a continuous-time chassis speed.
|
||||
*
|
||||
* This function converts a continuous-time chassis speed into a discrete-time
|
||||
* one such that when the discrete-time chassis speed is applied for one
|
||||
@@ -85,7 +85,7 @@ struct WPILIB_DLLEXPORT ChassisSpeeds {
|
||||
}
|
||||
|
||||
/**
|
||||
* Disretizes a continuous-time chassis speed.
|
||||
* Discretizes a continuous-time chassis speed.
|
||||
*
|
||||
* This function converts a continuous-time chassis speed into a discrete-time
|
||||
* one such that when the discrete-time chassis speed is applied for one
|
||||
|
||||
@@ -103,7 +103,7 @@ class ExponentialProfile {
|
||||
/**
|
||||
* Computes the max achievable velocity for an Exponential Profile.
|
||||
*
|
||||
* @return The seady-state velocity achieved by this profile.
|
||||
* @return The steady-state velocity achieved by this profile.
|
||||
*/
|
||||
Velocity_t MaxVelocity() const { return -maxInput * B / A; }
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class TrapezoidProfile {
|
||||
*
|
||||
* @return The total time the profile takes to reach the goal.
|
||||
*/
|
||||
units::second_t TotalTime() const { return m_endDeccel; }
|
||||
units::second_t TotalTime() const { return m_endDecel; }
|
||||
|
||||
/**
|
||||
* Returns true if the profile has reached the goal.
|
||||
@@ -174,7 +174,7 @@ class TrapezoidProfile {
|
||||
|
||||
units::second_t m_endAccel;
|
||||
units::second_t m_endFullSpeed;
|
||||
units::second_t m_endDeccel;
|
||||
units::second_t m_endDecel;
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ TrapezoidProfile<Distance>::Calculate(units::second_t t, State current,
|
||||
|
||||
m_endAccel = accelerationTime - cutoffBegin;
|
||||
m_endFullSpeed = m_endAccel + fullSpeedDist / m_constraints.maxVelocity;
|
||||
m_endDeccel = m_endFullSpeed + accelerationTime - cutoffEnd;
|
||||
m_endDecel = m_endFullSpeed + accelerationTime - cutoffEnd;
|
||||
State result = m_current;
|
||||
|
||||
if (t < m_endAccel) {
|
||||
@@ -71,10 +71,10 @@ TrapezoidProfile<Distance>::Calculate(units::second_t t, State current,
|
||||
m_endAccel * m_constraints.maxAcceleration / 2.0) *
|
||||
m_endAccel +
|
||||
m_constraints.maxVelocity * (t - m_endAccel);
|
||||
} else if (t <= m_endDeccel) {
|
||||
} else if (t <= m_endDecel) {
|
||||
result.velocity =
|
||||
goal.velocity + (m_endDeccel - t) * m_constraints.maxAcceleration;
|
||||
units::second_t timeLeft = m_endDeccel - t;
|
||||
goal.velocity + (m_endDecel - t) * m_constraints.maxAcceleration;
|
||||
units::second_t timeLeft = m_endDecel - t;
|
||||
result.position =
|
||||
goal.position -
|
||||
(goal.velocity + timeLeft * m_constraints.maxAcceleration / 2.0) *
|
||||
@@ -105,7 +105,7 @@ units::second_t TrapezoidProfile<Distance>::TimeLeftUntil(
|
||||
endFullSpeed = units::math::max(endFullSpeed, 0_s);
|
||||
|
||||
const Acceleration_t acceleration = m_constraints.maxAcceleration;
|
||||
const Acceleration_t decceleration = -m_constraints.maxAcceleration;
|
||||
const Acceleration_t deceleration = -m_constraints.maxAcceleration;
|
||||
|
||||
Distance_t distToTarget = units::math::abs(target - position);
|
||||
|
||||
@@ -116,26 +116,26 @@ units::second_t TrapezoidProfile<Distance>::TimeLeftUntil(
|
||||
Distance_t accelDist =
|
||||
velocity * endAccel + 0.5 * acceleration * endAccel * endAccel;
|
||||
|
||||
Velocity_t deccelVelocity;
|
||||
Velocity_t decelVelocity;
|
||||
if (endAccel > 0_s) {
|
||||
deccelVelocity = units::math::sqrt(
|
||||
decelVelocity = units::math::sqrt(
|
||||
units::math::abs(velocity * velocity + 2 * acceleration * accelDist));
|
||||
} else {
|
||||
deccelVelocity = velocity;
|
||||
decelVelocity = velocity;
|
||||
}
|
||||
|
||||
Distance_t fullSpeedDist = m_constraints.maxVelocity * endFullSpeed;
|
||||
Distance_t deccelDist;
|
||||
Distance_t decelDist;
|
||||
|
||||
if (accelDist > distToTarget) {
|
||||
accelDist = distToTarget;
|
||||
fullSpeedDist = Distance_t{0};
|
||||
deccelDist = Distance_t{0};
|
||||
decelDist = Distance_t{0};
|
||||
} else if (accelDist + fullSpeedDist > distToTarget) {
|
||||
fullSpeedDist = distToTarget - accelDist;
|
||||
deccelDist = Distance_t{0};
|
||||
decelDist = Distance_t{0};
|
||||
} else {
|
||||
deccelDist = distToTarget - fullSpeedDist - accelDist;
|
||||
decelDist = distToTarget - fullSpeedDist - accelDist;
|
||||
}
|
||||
|
||||
units::second_t accelTime =
|
||||
@@ -143,14 +143,14 @@ units::second_t TrapezoidProfile<Distance>::TimeLeftUntil(
|
||||
velocity * velocity + 2 * acceleration * accelDist))) /
|
||||
acceleration;
|
||||
|
||||
units::second_t deccelTime =
|
||||
(-deccelVelocity +
|
||||
units::math::sqrt(units::math::abs(deccelVelocity * deccelVelocity +
|
||||
2 * decceleration * deccelDist))) /
|
||||
decceleration;
|
||||
units::second_t decelTime =
|
||||
(-decelVelocity +
|
||||
units::math::sqrt(units::math::abs(decelVelocity * decelVelocity +
|
||||
2 * deceleration * decelDist))) /
|
||||
deceleration;
|
||||
|
||||
units::second_t fullSpeedTime = fullSpeedDist / m_constraints.maxVelocity;
|
||||
|
||||
return accelTime + fullSpeedTime + deccelTime;
|
||||
return accelTime + fullSpeedTime + decelTime;
|
||||
}
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user