Skip to content

Commit

Permalink
Arm setup done
Browse files Browse the repository at this point in the history
  • Loading branch information
agrinmanriv0537 committed Sep 7, 2023
1 parent a992af3 commit c26f441
Show file tree
Hide file tree
Showing 29 changed files with 183 additions and 85 deletions.
19 changes: 19 additions & 0 deletions src/main/java/frc/robot/BuildConstants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package frc.robot;

/**
* Automatically generated file containing build version information.
*/
public final class BuildConstants {
public static final String MAVEN_GROUP = "";

Check warning on line 7 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L7 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:7:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final String MAVEN_NAME = "FRC2023";

Check warning on line 8 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L8 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:8:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final String VERSION = "unspecified";

Check warning on line 9 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L9 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:9:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final int GIT_REVISION = 79;

Check warning on line 10 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L10 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:10:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final String GIT_SHA = "da48d549ec11ee4bac295346b92a67a91eae1de2";

Check warning on line 11 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L11 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:11:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final String GIT_DATE = "2023-06-08 11:15:18 CDT";

Check warning on line 12 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L12 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:12:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final String GIT_BRANCH = "adding-advantagekit-logging";

Check warning on line 13 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L13 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:13:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final String BUILD_DATE = "2023-09-05 08:08:29 CDT";

Check warning on line 14 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L14 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:14:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final long BUILD_UNIX_TIME = 1693919309083L;

Check warning on line 15 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L15 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:15:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
public static final int DIRTY = 1;

Check warning on line 16 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L16 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'member def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:16:3: warning: 'member def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)

private BuildConstants(){}

Check warning on line 18 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L18 <com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck>

'ctor def modifier' has incorrect indentation level 2, expected level should be 4.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:18:3: warning: 'ctor def modifier' has incorrect indentation level 2, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)

Check warning on line 18 in src/main/java/frc/robot/BuildConstants.java

View workflow job for this annotation

GitHub Actions / testtool

[testtool] src/main/java/frc/robot/BuildConstants.java#L18 <com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck>

WhitespaceAround: '{' is not preceded with whitespace.
Raw output
/github/workspace/./src/main/java/frc/robot/BuildConstants.java:18:27: warning: WhitespaceAround: '{' is not preceded with whitespace. (com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck)
}
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public void robotInit() {
ctreConfigs = new CTREConfigs();
// Instantiate our RobotContainer. This will perform all our button bindings, and put our
// autonomous chooser on the dashboard.
m_robotContainer = new RobotContainer();
m_robotContainer = new RobotContainer(isReal());

}

/**
Expand Down
16 changes: 13 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
import frc.robot.commands.leds.MovingColorLEDs;
import frc.robot.commands.leds.PoliceLEDs;
import frc.robot.commands.wrist.VariableIntake;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.LEDs;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;
import frc.robot.subsystems.arm.ArmIO;
import frc.robot.subsystems.arm.ArmIOSparkMax;

/**
* This class is where the bulk of the robot should be declared. Since Command-based is a
Expand Down Expand Up @@ -122,7 +124,7 @@ public class RobotContainer {
private LEDs leds = new LEDs(Constants.LEDConstants.LED_COUNT, Constants.LEDConstants.PWM_PORT);
public final Swerve s_Swerve = new Swerve();
// private final DropIntake s_dIntake = new DropIntake();
private final Arm s_Arm = new Arm(ph);
private final Arm s_Arm;
private final WristIntake s_wristIntake = new WristIntake();


Expand All @@ -131,10 +133,18 @@ public class RobotContainer {
.withProperties(Map.of("Color when true", "green", "Color when false", "red"))
.withPosition(8, 0).withSize(2, 2).getEntry();

private ArmIO armIO;

/**
* The container for the robot. Contains subsystems, OI devices, and commands.
*/
public RobotContainer() {
public RobotContainer(boolean isReal) {
if (isReal) {
armIO = new ArmIOSparkMax(ph);
} else {
armIO = new ArmIO() {};
}
s_Arm = new Arm(armIO);
ph.enableCompressorAnalog(90, 120);
s_Swerve.setDefaultCommand(new TeleopSwerve(s_Swerve, driver,
Constants.Swerve.IS_FIELD_RELATIVE, Constants.Swerve.IS_OPEN_LOOP, s_Arm));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/CrossAndDock.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import frc.robot.commands.drive.MoveToEngage;
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.drive.TurnToAngle;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Leaves community, and docks.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/DoubleScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import frc.robot.commands.arm.DockArm;
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.wrist.AutoWrist;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score a second game piece
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/DoubleScore6.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import frc.robot.commands.arm.DockArm;
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.wrist.AutoWrist;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score a second game piece
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/MiddleScoreEngage.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.drive.MoveToScore;
import frc.robot.commands.wrist.WristIntakeRelease;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score one game piece then engage from community side.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/Score1.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.drive.MoveToScore;
import frc.robot.commands.wrist.WristIntakeRelease;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score1Dock Auto.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/Score1Dock.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.drive.MoveToScore;
import frc.robot.commands.wrist.WristIntakeRelease;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score1Dock Auto.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/SecondGamePiece.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import frc.robot.commands.arm.DockArm;
import frc.robot.commands.arm.MoveArm;
import frc.robot.commands.wrist.AutoWrist;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;


/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/SecondGamePiece6.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import frc.robot.commands.arm.DockArm;
import frc.robot.commands.arm.MoveArm;
import frc.robot.commands.wrist.AutoWrist;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;


/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/SecondGamePieceScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import frc.robot.commands.drive.MoveToPos;
import frc.robot.commands.drive.MoveToScore;
import frc.robot.commands.wrist.WristIntakeRelease;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Acquire a second game piece after scoring
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/TripleScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import frc.robot.commands.arm.CubeIntake;
import frc.robot.commands.arm.DockArm;
import frc.robot.commands.wrist.AutoWrist;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score three game pieces
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/autos/TripleScore6.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import frc.robot.commands.arm.CubeIntake;
import frc.robot.commands.arm.DockArm;
import frc.robot.commands.wrist.AutoWrist;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Score three game pieces
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/ArmMoving.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package frc.robot.commands.arm;

import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* This command will move the arm to a requested angle.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/ConeIntake.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.ArmPosition;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* This command will move the arm to a requested angle.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/ConeUpIntake.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.ArmPosition;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* This command will move the arm to a requested angle.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/CubeIntake.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.ArmPosition;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* This command will move the arm to a requested angle.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/DockArm.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import edu.wpi.first.wpilibj2.command.ConditionalCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.ArmPosition;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Command to dock the arm in the robot
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/MoveArm.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.function.Supplier;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.lib.util.ArmPosition;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* This command will move the arm to a requested angle.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/ScoreArm.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.Scoring;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;

/**
* Command to move arm into scoring position
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/arm/VariableArm.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import edu.wpi.first.wpilibj2.command.CommandBase;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* Command to move the arm slightly
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/drive/MoveToEngage.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.FieldConstants;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;


/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/drive/MoveToScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import frc.lib.util.Scoring;
import frc.robot.commands.arm.ScoreArm;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.WristIntake;
import frc.robot.subsystems.arm.Arm;


/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/drive/TeleopSwerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.lib.math.Conversions;
import frc.robot.Constants;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.Swerve;
import frc.robot.subsystems.arm.Arm;

/**
* Creates an command for driving the swerve drive during tele-op
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/test/TestArm.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import frc.lib.util.Scoring;
import frc.lib.util.Scoring.GamePiece;
import frc.robot.Robot;
import frc.robot.subsystems.Arm;
import frc.robot.subsystems.arm.Arm;

/**
* Test April tag transform
Expand Down
Loading

0 comments on commit c26f441

Please sign in to comment.