Skip to content

Commit d9eba4b

Browse files
DeltaDizzysciencewhizcalcmogul
authored
[wpilib] Document zero angle in SingleJointedArmSim (NFC) (#7756)
Fixes #7752 --------- Co-authored-by: sciencewhiz <sciencewhiz@users.noreply.github.com> Co-authored-by: Tyler Veness <calcmogul@gmail.com>
1 parent 9cd933f commit d9eba4b

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

wpilibc/src/main/native/include/frc/simulation/SingleJointedArmSim.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ class SingleJointedArmSim : public LinearSystemSim<2, 1, 2> {
3030
* @param gearing The gear ratio of the arm (numbers greater than 1
3131
* represent reductions).
3232
* @param armLength The length of the arm.
33-
* @param minAngle The minimum angle that the arm is capable of.
34-
* @param maxAngle The maximum angle that the arm is capable of.
33+
* @param minAngle The minimum angle that the arm is capable of,
34+
* with 0 being horizontal.
35+
* @param maxAngle The maximum angle that the arm is capable of,
36+
* with 0 being horizontal.
3537
* @param simulateGravity Whether gravity should be simulated or not.
36-
* @param startingAngle The initial position of the arm.
38+
* @param startingAngle The initial position of the arm, with 0 being
39+
* horizontal.
3740
* @param measurementStdDevs The standard deviations of the measurements.
3841
*/
3942
SingleJointedArmSim(const LinearSystem<2, 1, 2>& system,
@@ -52,10 +55,13 @@ class SingleJointedArmSim : public LinearSystemSim<2, 1, 2> {
5255
* @param moi The moment of inertia of the arm. This can be
5356
* calculated from CAD software.
5457
* @param armLength The length of the arm.
55-
* @param minAngle The minimum angle that the arm is capable of.
56-
* @param maxAngle The maximum angle that the arm is capable of.
58+
* @param minAngle The minimum angle that the arm is capable of,
59+
* with 0 being horizontal.
60+
* @param maxAngle The maximum angle that the arm is capable of,
61+
* with 0 being horizontal.
5762
* @param simulateGravity Whether gravity should be simulated or not.
58-
* @param startingAngle The initial position of the arm.
63+
* @param startingAngle The initial position of the arm, with 0 being
64+
* horizontal.
5965
* @param measurementStdDevs The standard deviation of the measurement noise.
6066
*/
6167
SingleJointedArmSim(const DCMotor& gearbox, double gearing,

wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/SingleJointedArmSim.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
4444
* @param gearbox The type of and number of motors in the arm gearbox.
4545
* @param gearing The gearing of the arm (numbers greater than 1 represent reductions).
4646
* @param armLengthMeters The length of the arm.
47-
* @param minAngleRads The minimum angle that the arm is capable of.
48-
* @param maxAngleRads The maximum angle that the arm is capable of.
47+
* @param minAngleRads The minimum angle that the arm is capable of, with 0 radians being
48+
* horizontal.
49+
* @param maxAngleRads The maximum angle that the arm is capable of, with 0 radians being
50+
* horizontal.
4951
* @param simulateGravity Whether gravity should be simulated or not.
50-
* @param startingAngleRads The initial position of the Arm simulation in radians.
52+
* @param startingAngleRads The initial position of the Arm simulation in radians, with 0 radians
53+
* being horizontal.
5154
* @param measurementStdDevs The standard deviations of the measurements. Can be omitted if no
5255
* noise is desired. If present must have 1 element for position.
5356
*/
@@ -80,10 +83,13 @@ public SingleJointedArmSim(
8083
* @param gearing The gearing of the arm (numbers greater than 1 represent reductions).
8184
* @param jKgMetersSquared The moment of inertia of the arm; can be calculated from CAD software.
8285
* @param armLengthMeters The length of the arm.
83-
* @param minAngleRads The minimum angle that the arm is capable of.
84-
* @param maxAngleRads The maximum angle that the arm is capable of.
86+
* @param minAngleRads The minimum angle that the arm is capable of, with 0 radians being
87+
* horizontal.
88+
* @param maxAngleRads The maximum angle that the arm is capable of, with 0 radians being
89+
* horizontal.
8590
* @param simulateGravity Whether gravity should be simulated or not.
86-
* @param startingAngleRads The initial position of the Arm simulation in radians.
91+
* @param startingAngleRads The initial position of the Arm simulation in radians, with 0 radians
92+
* being horizontal.
8793
* @param measurementStdDevs The standard deviations of the measurements. Can be omitted if no
8894
* noise is desired. If present must have 1 element for position.
8995
*/

0 commit comments

Comments
 (0)