Skip to content

Commit 35c8fce

Browse files
authored
Merge pull request #111 from strykeforce/rabsamu/auton-tuning
Rabsamu/auton tuning
2 parents 81a21d8 + 0727f3e commit 35c8fce

File tree

9 files changed

+30
-26
lines changed

9 files changed

+30
-26
lines changed

src/main/deploy/paths/BackupPath.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
max_velocity = 2.0 # m/s
2+
max_velocity = 1.0 # m/s
33
max_acceleration = 2.0 # m/s/s
44
start_velocity = 0.0 # m/s
55
end_velocity = 0.0 # m/s

src/main/deploy/paths/TrenchPickupPath.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ max_velocity = 1.55 # m/s
33
max_acceleration = 2.0 # m/s/s
44
start_velocity = 0.0 # m/s
55
end_velocity = 0.0 # m/s
6-
is_reversed = true
6+
is_reversed = false
77

88
[start_pose]
99
x = 0.0
1010
y = 0.0
11-
angle = 0.0
11+
angle = 180.0
1212
[end_pose]
13-
x = -5.6
13+
x = -5.7
1414
y = 0.0
15-
angle = 0.0
15+
angle = 180.0
1616

1717
[[internal_points]]
1818
x = -3.0
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

2-
max_velocity = 3.6 # m/s
3-
max_acceleration = 3.0 # m/s/s
2+
max_velocity = 2.0 # m/s
3+
max_acceleration = 2.0 # m/s/s
44
start_velocity = 0.0 # m/s
55
end_velocity = 0.0 # m/s
6-
is_reversed = false
6+
is_reversed = true
77

88
[start_pose]
9-
x = 0.0
9+
x = -5.7
1010
y = 0.0
11-
angle = 0.0
11+
angle = 180.0
1212
[end_pose]
13-
x = 3.75
13+
x = -2.0
1414
y = 0.0
15-
angle = 0.0
15+
angle = 180.0
1616

1717
[[internal_points]]
18-
x = 2.0
18+
x = -4.0
1919
y = 0.0

src/main/java/frc/robot/Constants.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ public static TalonFXConfiguration getDriveTalonConfig() {
155155
public static final class IntakeConstants {
156156

157157
// Subsystem Specific
158-
public static final double kSquidSpeed = -0.4;
159-
public static final double kIntakeSpeed = -0.4;
160-
public static final double kSquidShootSpeed = -0.75;
161-
public static final double kIntakeShootSpeed = -0.75;
158+
public static final double kSquidSpeed = -0.3;
159+
public static final double kIntakeSpeed = -0.3;
160+
public static final double kSquidShootSpeed = -0.65;
161+
public static final double kIntakeShootSpeed = -0.65;
162162
public static final double kSquidEjectSpeed = 0.25;
163163
public static final double kIntakeEjectSpeed = 0.25;
164164
public static final int kStallVelocity = 100;

src/main/java/frc/robot/commands/auto/PathDriveCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ public void initialize() {
8686
public void execute() {
8787
state = trajectory.sample(timer.get());
8888
odometryPose = driveSubsystem.getPoseMeters();
89-
speeds = holonomicDriveController.calculate(odometryPose, state, new Rotation2d());
89+
speeds = holonomicDriveController.calculate(odometryPose, state, Rotation2d.fromDegrees(180));
9090
driveSubsystem.move(
91-
speeds.vxMetersPerSecond, speeds.vyMetersPerSecond, speeds.omegaRadiansPerSecond, true);
91+
speeds.vxMetersPerSecond, speeds.vyMetersPerSecond, speeds.omegaRadiansPerSecond, false);
9292
}
9393

9494
@Override

src/main/java/frc/robot/commands/auto/TrenchAutoCommandGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public TrenchAutoCommandGroup(
1717
String ballFetchPath,
1818
String driveShootPath) {
1919
addCommands(
20-
new OffsetGyroCommand(gyroOffset), // FIXME: Move to end
20+
new OffsetGyroCommand(gyroOffset),
2121
new AutoArmCommandGroup(),
2222
new ParallelDeadlineGroup(new WaitCommand(shootWait), new ArmedShootSequenceCommand()),
2323
new ParallelDeadlineGroup(
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
package frc.robot.commands.sequences;
22

33
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
4+
import frc.robot.Constants;
45
import frc.robot.Constants.MagazineConstants;
56
import frc.robot.commands.LogCommand;
6-
import frc.robot.commands.intake.IntakeAutoStopCommand;
7+
import frc.robot.commands.intake.IntakeRunCommand;
78
import frc.robot.commands.magazine.LimitMagazineCommand;
89

910
public class AutoIntakeCmdGroup extends ParallelCommandGroup {
1011
public AutoIntakeCmdGroup() {
1112
addCommands(
1213
new LogCommand("Begin Driver Controller - Auto Intake"),
1314
new LimitMagazineCommand(MagazineConstants.kOpenLoopLoad),
14-
new IntakeAutoStopCommand());
15+
new IntakeRunCommand(
16+
Constants.IntakeConstants.kIntakeSpeed, Constants.IntakeConstants.kSquidSpeed));
1517
}
1618
}

src/main/java/frc/robot/controls/DriverControls.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import edu.wpi.first.wpilibj.Joystick;
44
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
5+
import frc.robot.commands.auto.PathDriveCommand;
56
import frc.robot.commands.drive.XLockCommand;
67
import frc.robot.commands.drive.ZeroGyroCommand;
78
import frc.robot.commands.hood.HoodOpenLoopCommand;
@@ -34,7 +35,8 @@ public class DriverControls {
3435

3536
// Software Testing
3637

37-
new JoystickButton(joystick, Button.HAMBURGER.id).whenPressed(new XLockCommand());
38+
new JoystickButton(joystick, Button.HAMBURGER.id)
39+
.whenPressed(new PathDriveCommand("BackupPath"));
3840
}
3941
/** Left stick X (up-down) axis. */
4042
public double getForward() {

vendordeps/thirdcoast.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"fileName": "thirdcoast.json",
33
"name": "StrykeForce-ThirdCoast",
4-
"version": "21.3.1-SNAPSHOT",
4+
"version": "21.3.1",
55
"uuid": "13c4f4b5-a1c0-4670-8f8d-b7b03628c0d3",
66
"mavenUrls": [
77
"http://maven.strykeforce.org/repo"
@@ -11,9 +11,9 @@
1111
{
1212
"groupId": "org.strykeforce",
1313
"artifactId": "thirdcoast",
14-
"version": "21.3.1-SNAPSHOT"
14+
"version": "21.3.1"
1515
}
1616
],
1717
"jniDependencies": [],
1818
"cppDependencies": []
19-
}
19+
}

0 commit comments

Comments
 (0)