Merge pull request #11 from Marlstar/master

Clarifications in the localization and tuning processes
This commit is contained in:
Anyi Lin
2024-11-21 01:56:06 -05:00
committed by GitHub
6 changed files with 76 additions and 69 deletions

View File

@ -47,12 +47,19 @@ measurements will be in centimeters.
`lateralZeroPowerAcceleration`, respectively. `lateralZeroPowerAcceleration`, respectively.
* After this, we will want to tune the translational PID. Go to FTC Dashboard and disable all but * After this, we will want to tune the translational PID. Go to FTC Dashboard and disable all but
the `useTranslational` checkboxes under the `Follower` tab. Then, run `StraightBackAndForth`. Make the `useTranslational` checkboxes under the `Follower` tab. Then, run `StraightBackAndForth`.
sure you disable the timer on autonomous OpModes. The PID for the translational error is called Make sure you disable the timer on autonomous OpModes. You will notice in telemetry a message saying
`translationalPIDF`. If you need to add a feedforward value, use the `translationalPIDFFeedForward` that the robot will travel a distance forward and backward, this will not happen until later, so for
since that will add the feedforward in the direction the robot is trying to move, rather than the now you can ignore this message. The robot should not move when you run the opmode initally. Instead,
feedforward in the PIDF itself, since those will only add the feedforward one way. You can change it should correct when you push it away from its starting position. Note that this correction should
the PIDF constants and feedforward values, under the `FollowerConstants` tab in FTC Dashboard. happen regardless of the robot's rotation, and that the robot should not rotate itself (if it does,
disable `useHeading` as mentioned prior). Also note that the robot will only correct to an imaginary line
that runs straight forward from the robot's starting position, meaning that it will not correct in the
(original) forward direction. The PID for the translational error is called `translationalPIDF`.
If you need to add a feedforward value, use the `translationalPIDFFeedForward` since that will add
the feedforward in the direction the robot is trying to move, rather than the feedforward in the
PIDF itself, since those will only add the feedforward one way. You can change the PIDF constants
and feedforward values, under the `FollowerConstants` tab in FTC Dashboard.
To tune the PID, push the robot off the path and see how corrects. You will want to alternate sides To tune the PID, push the robot off the path and see how corrects. You will want to alternate sides
you push to reduce field wear and tear as well as push with varying power and distance. I would you push to reduce field wear and tear as well as push with varying power and distance. I would
recommend tuning the PID so that it is capable of correcting while minimizing oscillations and still recommend tuning the PID so that it is capable of correcting while minimizing oscillations and still

View File

@ -21,18 +21,18 @@ import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Vector;
* *
* forward on robot is the x positive direction * forward on robot is the x positive direction
* *
* forward (x positive)
* △
* |
* |
* /--------------\ * /--------------\
* | |
* | |
* | || || |
* left (y positive) <--- | || || |
* | ____ | * | ____ |
* | ---- | * | ---- |
* | || || |
* | || || | ----> left (y positive)
* | |
* | |
* \--------------/ * \--------------/
* |
* |
* V
* forward (x positive)
* *
* @author Anyi Lin - 10158 Scott's Bots * @author Anyi Lin - 10158 Scott's Bots
* @version 1.0, 7/20/2024 * @version 1.0, 7/20/2024

View File

@ -23,18 +23,18 @@ import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Vector;
* *
* forward on robot is the x positive direction * forward on robot is the x positive direction
* *
* forward (x positive)
* △
* |
* |
* /--------------\ * /--------------\
* | |
* | |
* | || |
* left (y positive) <--- | || |
* | ____ | * | ____ |
* | ---- | * | ---- |
* | || |
* | || | ----> left (y positive)
* | |
* | |
* \--------------/ * \--------------/
* |
* |
* V
* forward (x positive)
* With the pinpoint your readings will be used in mm * With the pinpoint your readings will be used in mm
* to use inches ensure to divide your mm value by 25.4 * to use inches ensure to divide your mm value by 25.4
* @author Logan Nash * @author Logan Nash

View File

@ -26,18 +26,18 @@ import org.firstinspires.ftc.teamcode.pedroPathing.util.NanoTimer;
* *
* forward on robot is the x positive direction * forward on robot is the x positive direction
* *
* forward (x positive)
* △
* |
* |
* /--------------\ * /--------------\
* | |
* | |
* | || || |
* left (y positive) <--- | || || |
* | ____ | * | ____ |
* | ---- | * | ---- |
* | || || |
* | || || | ----> left (y positive)
* | |
* | |
* \--------------/ * \--------------/
* |
* |
* V
* forward (x positive)
* *
* @author Logan Nash * @author Logan Nash
* @author Anyi Lin - 10158 Scott's Bots * @author Anyi Lin - 10158 Scott's Bots

View File

@ -23,18 +23,18 @@ import org.firstinspires.ftc.teamcode.pedroPathing.util.NanoTimer;
* *
* forward on robot is the x positive direction * forward on robot is the x positive direction
* *
* forward (x positive)
* △
* |
* |
* /--------------\ * /--------------\
* | |
* | |
* | || || |
* left (y positive) <--- | || || |
* | ____ | * | ____ |
* | ---- | * | ---- |
* | || || |
* | || || | ----> left (y positive)
* | |
* | |
* \--------------/ * \--------------/
* |
* |
* V
* forward (x positive)
* *
* @author Anyi Lin - 10158 Scott's Bots * @author Anyi Lin - 10158 Scott's Bots
* @version 1.0, 4/2/2024 * @version 1.0, 4/2/2024

View File

@ -26,18 +26,18 @@ import org.firstinspires.ftc.teamcode.pedroPathing.util.NanoTimer;
* *
* forward on robot is the x positive direction * forward on robot is the x positive direction
* *
* forward (x positive)
* △
* |
* |
* /--------------\ * /--------------\
* | |
* | |
* | || |
* left (y positive) <--- | || |
* | ____ | * | ____ |
* | ---- | * | ---- |
* | || || |
* | || || | ----> left (y positive)
* | |
* | |
* \--------------/ * \--------------/
* |
* |
* V
* forward (x positive)
* *
* @author Anyi Lin - 10158 Scott's Bots * @author Anyi Lin - 10158 Scott's Bots
* @version 1.0, 4/2/2024 * @version 1.0, 4/2/2024