Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

Commit e4f0447

Browse files
committed
changing documentation to match FollowerConstants motor name/direction update
1 parent f8ae3cc commit e4f0447

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/LOCALIZATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ by Tyler Veness. However, the OTOS localizer uses its own onboard system for cal
77
which we do not know about.
88

99
## Setting Your Localizer
10-
Go to line `70` in the `PoseUpdater` class, and replace the `new ThreeWheelLocalizer(hardwareMap)`
10+
Go to line `73` in the `PoseUpdater` class, and replace the `new ThreeWheelLocalizer(hardwareMap)`
1111
with the localizer that applies to you:
1212
* If you're using drive encoders, put `new DriveEncoderLocalizer(hardwareMap)`
1313
* If you're using two wheel odometry, put `new TwoWheelLocalizer(hardwareMap)`

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/TUNING.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ that the tuners require you to push the robot or the tuners output will say "inc
1414
measurements will be in centimeters.
1515

1616
## Tuning
17-
* To start with, we need the mass of the robot in kg. This is used for the centripetal force correction,
18-
and the mass, with the variable name `mass`, should be put on line `86` in the `FollowerConstants`
17+
* First, make sure that your motor names and directions, located at the top of `FollowerConstants`,
18+
are correct.
19+
20+
* After that, we need the mass of the robot in kg. This is used for the centripetal force correction,
21+
and the mass, with the variable name `mass`, should be put on line `92` in the `FollowerConstants`
1922
class under the `tuning` package.
2023

2124
* Next, we need to find the preferred mecanum drive vectors. The rollers on mecanum wheels point at a
@@ -27,8 +30,8 @@ measurements will be in centimeters.
2730
Dashboard under the dropdown for each respective class, but higher distances work better. After the
2831
distance has finished running, the end velocity will be output to telemetry. The robot may continue
2932
to drift a little bit after the robot has finished running the distance, so make sure you have
30-
plenty of room. Once you're done, put the velocity for the `Forward Velocity Tuner` on line `33` in
31-
the `FollowerConstants` class, and the velocity for the `Strafe Velocity Tuner` on line `34` in the
33+
plenty of room. Once you're done, put the velocity for the `Forward Velocity Tuner` on line `39` in
34+
the `FollowerConstants` class, and the velocity for the `Strafe Velocity Tuner` on line `40` in the
3235
`FollowerConstants` class. The variable names should be `xMovement` and `yMovement`, respectively.
3336

3437
* The last set of automatic tuners you'll need to run are the zero power acceleration tuners. These
@@ -42,8 +45,8 @@ measurements will be in centimeters.
4245
which point it will display the deceleration in telemetry. This robot will need to drift to a stop
4346
to properly work, and the higher the velocity the greater the drift distance, so make sure you have
4447
enough room. Once you're done, put the zero power acceleration for the
45-
`Forward Zero Power Acceleration Tuner` on line `94` in the `FollowerConstants` class and the zero
46-
power acceleration for the `Lateral Zero Power Acceleration Tuner` on line `98` in the
48+
`Forward Zero Power Acceleration Tuner` on line `100` in the `FollowerConstants` class and the zero
49+
power acceleration for the `Lateral Zero Power Acceleration Tuner` on line `104` in the
4750
`FollowerConstants` class. The variable names should be `forwardZeroPowerAcceleration` and
4851
`lateralZeroPowerAcceleration`, respectively.
4952

@@ -78,7 +81,7 @@ measurements will be in centimeters.
7881
`zeroPowerAccelerationMultiplier`. This determines how fast your robot will decelerate as a factor
7982
of how fast your robot will coast to a stop. Honestly, this is up to you. I personally used 4, but
8083
what works best for you is most important. Higher numbers will cause a faster brake, but increase
81-
oscillations at the end. Lower numbers will do the opposite. This can be found on line `107` in
84+
oscillations at the end. Lower numbers will do the opposite. This can be found on line `113` in
8285
`FollowerConstants`, named `zeroPowerAccelerationMultiplier`. The drive PID is much, much more sensitive than the others. For reference,
8386
my P values were in the hundredths and thousandths place values, and my D values were in the hundred
8487
thousandths and millionths place values. To tune this, enable `useDrive`, `useHeading`, and
@@ -104,7 +107,7 @@ measurements will be in centimeters.
104107
* Finally, we will want to tune the centripetal force correction. This is a pretty simple tune. Open
105108
up FTC Dashboard and enable everything under the `Follower` tab. Then, run `CurvedBackAndForth`
106109
and turn off its timer. If you notice the robot is correcting towards the inside of the curve
107-
as/after running a path, then increase `centripetalScaling`, which can be found on line `89` of
110+
as/after running a path, then increase `centripetalScaling`, which can be found on line `95` of
108111
`FollowerConstants`. If the robot is correcting towards the outside of the curve, then decrease
109112
`centripetalScaling`.
110113

@@ -117,7 +120,7 @@ measurements will be in centimeters.
117120
## Note About the PIDs
118121
In versions of Pedro Pathing before early August 2024, there were 2 PIDs used in the translational,
119122
heading, and drive control. However, now there is only one main PID. The old system can still be used.
120-
Scroll down to the bottom of `FollowerConstants` and set all the booleans from lines `157` to `159`
123+
Scroll down to the bottom of `FollowerConstants` and set all the booleans from lines `163` to `165`
121124
to true. They should be named `useSecondaryTranslationalPID`, `useSecondaryHeadingPID`, and `useSecondaryDrivePID`.
122125
This will enable the two PID system that Pedro Pathing originally used. From there, scroll
123126
down and all the values pertaining to the secondary PIDs will be there. The two PID system works with

0 commit comments

Comments
 (0)