Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Krakens and rewire robot #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/main/deploy/swerve/modules/backleft.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"drive": {
"type": "sparkmax",
"id": 22,
"type": "talonfx",
"id": 21,
"canbus": null
},
"angle": {
"type": "sparkmax",
"id": 23,
"type": "talonfx",
"id": 22,
"canbus": null
},
"encoder": {
"type": "ctre_mag",
"id": 1,
"id": 2,
"canbus": null
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 289.2,
"absoluteEncoderOffset": 214.9,
"location": {
"front": -12.125,
"left": 12.125
Expand Down
12 changes: 6 additions & 6 deletions src/main/deploy/swerve/modules/backright.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"drive": {
"type": "sparkmax",
"id": 24,
"type": "talonfx",
"id": 31,
"canbus": null
},
"angle": {
"type": "sparkmax",
"id": 25,
"type": "talonfx",
"id": 32,
"canbus": null
},
"encoder": {
"type": "ctre_mag",
"id": 2,
"id": 3,
"canbus": null
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 55.05,
"absoluteEncoderOffset": 131.7,
"location": {
"front": -12.125,
"left": -12.125
Expand Down
12 changes: 6 additions & 6 deletions src/main/deploy/swerve/modules/frontleft.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"drive": {
"type": "sparkmax",
"id": 20,
"type": "talonfx",
"id": 11,
"canbus": null
},
"angle": {
"type": "sparkmax",
"id": 21,
"type": "talonfx",
"id": 12,
"canbus": null
},
"encoder": {
"type": "ctre_mag",
"id": 4,
"id": 1,
"canbus": null
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 135.5,
"absoluteEncoderOffset": 206.9,
"location": {
"front": 12.125,
"left": 12.125
Expand Down
12 changes: 6 additions & 6 deletions src/main/deploy/swerve/modules/frontright.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"drive": {
"type": "sparkmax",
"id": 26,
"type": "talonfx",
"id": 1,
"canbus": null
},
"angle": {
"type": "sparkmax",
"id": 27,
"type": "talonfx",
"id": 2,
"canbus": null
},
"encoder": {
"type": "ctre_mag",
"id": 3,
"id": 0,
"canbus": null
},
"inverted": {
"drive": false,
"angle": true
},
"absoluteEncoderOffset": 214.91,
"absoluteEncoderOffset": 144.8,
"location": {
"front": 12.125,
"left": -12.125
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/swerve/modules/pidfproperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"iz": 0
},
"angle": {
"p": 6e-3,
"p": 7,
"i": 0.00000,
"d": 0,
"f": 0,
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public static class OperatorConstants {
public static final String PHOTONCAMERA_NAME = "Arducam_A";
public static final String PHOTONCAMERA_NAME2 = "Arducam_B";

public static class IDs {
public static final int INTAKE_MOTOR = 2;
public static final int OUTTAKE_TOP_MOTOR = 3;
public static final int OUTTAKE_BOTTOM_MOTOR = 4;
public static final int ANGLE_MOTOR = 31;
public static final int ROLLER_MOTOR = 30;
public final class IDs {
public static final int INTAKE_MOTOR = 41;
public static final int OUTTAKE_TOP_MOTOR = 42;
public static final int OUTTAKE_BOTTOM_MOTOR = 43;
public static final int ANGLE_MOTOR = 62;
public static final int ROLLER_MOTOR = 61;
}

public static class Speeds {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public RobotContainer() {

DriveCommand driveCmd = new DriveCommand(
swerveSubsystem,
() -> MathUtil.applyDeadband(-driverXbox.getLeftY(), 0.02), // Y axis on joystick is X axis for FRC. Forward is postive-Y, so need to invert sign
() -> MathUtil.applyDeadband(-driverXbox.getLeftX(), 0.02), // X axis on joystick is Y axis for FRC. Left is positive-X, so need to invert sign
() -> MathUtil.applyDeadband(-driverXbox.getRightX(), 0.08),
() -> MathUtil.applyDeadband(driverXbox.getLeftY(), 0.02), // Y axis on joystick is X axis for FRC. Forward is postive-Y, so need to invert sign
() -> MathUtil.applyDeadband(driverXbox.getLeftX(), 0.02), // X axis on joystick is Y axis for FRC. Left is positive-X, so need to invert sign
() -> MathUtil.applyDeadband(driverXbox.getRightX(), 0.08),
() -> driverXbox.getHID().getBButton(),
() -> angleToSpeaker()
); // Rotation for FRC is CCW-positive, so need to invert sign
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/frc/robot/subsystems/ArmSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public class ArmSubsystem extends SubsystemBase {
public double setpoint = 0;

private TalonFXConfiguration configs = new TalonFXConfiguration();

private final TalonFX motor1 = new TalonFX(11);
private final TalonFX motor2 = new TalonFX(12);
private final TalonFX motor3 = new TalonFX(13);

private final TalonFX motor1 = new TalonFX(51);
private final TalonFX motor2 = new TalonFX(52);
private final TalonFX motor3 = new TalonFX(53);
private final TalonSRX sensorTalon = new TalonSRX(14);

Orchestra orch = new Orchestra();
Expand Down
6 changes: 3 additions & 3 deletions vendordeps/PathplannerLib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "PathplannerLib.json",
"name": "PathplannerLib",
"version": "2024.2.7",
"version": "2024.2.8",
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -12,15 +12,15 @@
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-java",
"version": "2024.2.7"
"version": "2024.2.8"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-cpp",
"version": "2024.2.7",
"version": "2024.2.8",
"libName": "PathplannerLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down
Loading