[wpimath] Add angle measurement convention to ArmFeedforward docs (NFC) (#4285)

This commit is contained in:
Prateek Machiraju
2022-06-02 21:22:47 -07:00
committed by GitHub
parent a4ec13eb0e
commit fc37265da5
2 changed files with 47 additions and 15 deletions

View File

@@ -47,7 +47,11 @@ class WPILIB_DLLEXPORT ArmFeedforward {
/**
* Calculates the feedforward from the gains and setpoints.
*
* @param angle The angle setpoint, in radians.
* @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, in radians per second.
* @param acceleration The acceleration setpoint, in radians per second².
* @return The computed feedforward, in volts.
@@ -70,8 +74,12 @@ class WPILIB_DLLEXPORT ArmFeedforward {
* achievable - enter the acceleration constraint, and this will give you
* a simultaneously-achievable velocity constraint.
*
* @param maxVoltage The maximum voltage that can be supplied to the arm.
* @param angle The angle of the arm
* @param maxVoltage The maximum voltage that can be supplied to the arm.
* @param angle The angle of the arm. 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 acceleration The acceleration of the arm.
* @return The maximum possible velocity at the given acceleration and angle.
*/
@@ -91,8 +99,12 @@ class WPILIB_DLLEXPORT ArmFeedforward {
* achievable - enter the acceleration constraint, and this will give you
* a simultaneously-achievable velocity constraint.
*
* @param maxVoltage The maximum voltage that can be supplied to the arm.
* @param angle The angle of the arm
* @param maxVoltage The maximum voltage that can be supplied to the arm.
* @param angle The angle of the arm. 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 acceleration The acceleration of the arm.
* @return The minimum possible velocity at the given acceleration and angle.
*/
@@ -113,8 +125,12 @@ class WPILIB_DLLEXPORT ArmFeedforward {
* a simultaneously-achievable acceleration constraint.
*
* @param maxVoltage The maximum voltage that can be supplied to the arm.
* @param angle The angle of the arm
* @param velocity The velocity of the arm.
* @param angle The angle of the arm. 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 of the arm.
* @return The maximum possible acceleration at the given velocity and angle.
*/
units::unit_t<Acceleration> MaxAchievableAcceleration(
@@ -133,8 +149,12 @@ class WPILIB_DLLEXPORT ArmFeedforward {
* a simultaneously-achievable acceleration constraint.
*
* @param maxVoltage The maximum voltage that can be supplied to the arm.
* @param angle The angle of the arm
* @param velocity The velocity of the arm.
* @param angle The angle of the arm. 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 of the arm.
* @return The minimum possible acceleration at the given velocity and angle.
*/
units::unit_t<Acceleration> MinAchievableAcceleration(