Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
09ca417
cam 1 & 2 construction and nt table camera selectr
Tonyxwu Feb 26, 2025
9b36991
cam constants added
Tonyxwu Feb 26, 2025
28c15cb
Update krakens to torque current FOC control
6kn4eakfr4s Feb 21, 2025
9208dd9
Add debug constant
6kn4eakfr4s Feb 21, 2025
5a6dcb6
Publishes & logs close loop error
6kn4eakfr4s Feb 22, 2025
97dd677
Fix naming
6kn4eakfr4s Feb 22, 2025
3b08fd4
publish & log closed loop error
6kn4eakfr4s Feb 22, 2025
b00b241
Untested Kraken Intake
6kn4eakfr4s Feb 22, 2025
386856c
Remove the second log call in periodic
6kn4eakfr4s Feb 23, 2025
11b7284
Make pivot ready to test
6kn4eakfr4s Feb 24, 2025
6e3b733
Add methods to allow voltage requests to account for motor not under …
6kn4eakfr4s Feb 25, 2025
9c5123f
Using voltage requests instead of torque current FOC requests to acco…
6kn4eakfr4s Feb 25, 2025
5789cf4
Added more intake commands to test and bind them in a seperate method
6kn4eakfr4s Feb 25, 2025
795c922
Force the drive controller to be PS5 controller
6kn4eakfr4s Feb 19, 2025
fd6639f
Make pivot ready to test
6kn4eakfr4s Feb 24, 2025
be5c04c
Make pivot ready to test
6kn4eakfr4s Feb 24, 2025
2c3b4fc
Onlyuse mech controller joystick to control pivot when its reading is…
6kn4eakfr4s Feb 25, 2025
99e3c78
Change set reference methods to set reference with velocity requests
6kn4eakfr4s Feb 25, 2025
b612863
setPositionReference
swaswa999 Feb 26, 2025
494e1ff
intake tested and tuned
CrolineCrois Feb 26, 2025
008434b
working conversion factor for pivot
CrolineCrois Feb 26, 2025
d272166
Allow setting current and duty cycle requests
6kn4eakfr4s Feb 26, 2025
e50558a
Added logged boolean sensor
6kn4eakfr4s Feb 26, 2025
bc533db
Make pivot ready to test
6kn4eakfr4s Feb 24, 2025
0a99358
Remove extra lines from rebasing
6kn4eakfr4s Feb 26, 2025
33507c6
tuned pivot
CrolineCrois Feb 27, 2025
3559204
contruct both bottom cameras disabled top
Tonyxwu Feb 27, 2025
c8f4c1b
fixed
Tonyxwu Feb 27, 2025
c0265fe
t:wq
CrolineCrois Feb 27, 2025
03892ba
Merge pull request #22 from grt192/kraken-intake-v2
CrolineCrois Feb 27, 2025
a5c3570
Update krakens to torque current FOC control
6kn4eakfr4s Feb 21, 2025
651e499
Add debug constant
6kn4eakfr4s Feb 21, 2025
7f913fb
Publishes & logs close loop error
6kn4eakfr4s Feb 22, 2025
dd89d96
Fix naming
6kn4eakfr4s Feb 22, 2025
b5c54e9
publish & log closed loop error
6kn4eakfr4s Feb 22, 2025
2fc2ecf
Untested Elevator
6kn4eakfr4s Feb 23, 2025
b125663
make elevator ready to test
6kn4eakfr4s Feb 24, 2025
8c09de4
Force the drive controller to be PS5 controller
6kn4eakfr4s Feb 19, 2025
3996ae5
Force the drive controller to be PS5 controller
6kn4eakfr4s Feb 19, 2025
b84f4e1
Bind elevator in seperate method
6kn4eakfr4s Feb 25, 2025
d083dbd
fix imports after rebase
CrolineCrois Feb 25, 2025
3c801fd
elevator mid-tune
CrolineCrois Feb 26, 2025
5ad39b3
elevator tuned except the mech is ass bc the pullye derials so they a…
CrolineCrois Feb 26, 2025
5b560a3
Change package paths back to Commands
6kn4eakfr4s Feb 26, 2025
63f247c
Add methods to allow voltage requests to account for motor not under …
6kn4eakfr4s Feb 25, 2025
e6d78ff
Allow setting current and duty cycle requests
6kn4eakfr4s Feb 26, 2025
a0c9ec3
Merge branch 'pinnacles' into elevator-v2
CrolineCrois Feb 27, 2025
d3ee1a6
fix build issues
CrolineCrois Feb 27, 2025
530953b
Merge pull request #23 from grt192/elevator-v2
CrolineCrois Feb 27, 2025
248ef35
Publish & Log target duty cycle and torque current foc.
6kn4eakfr4s Feb 28, 2025
35fe899
Use logged boolean sensor & allow set duty cycle power
6kn4eakfr4s Feb 28, 2025
0c64c0e
Tuned Elevator, Intake, Pivot Constants
6kn4eakfr4s Feb 28, 2025
a959bc4
Disable soft limit, add methods allowing setting duty cycle, torque c…
6kn4eakfr4s Feb 28, 2025
be2a948
Use logged limit switch, disable soft limit, allow set duty cycle and…
6kn4eakfr4s Feb 28, 2025
8ea31eb
Added command to make rollers run till distance sensor detects
6kn4eakfr4s Feb 28, 2025
b2da615
Stop intake command when there is a corral in
6kn4eakfr4s Feb 28, 2025
eb96cb9
Rewrite elevator to limit switch command so it stops by limit switch
6kn4eakfr4s Feb 28, 2025
25f54bc
Command to zero pivot to 90 degrees
6kn4eakfr4s Feb 28, 2025
d81aaa4
Bind commands based on Lucca's suggestions
6kn4eakfr4s Feb 28, 2025
bae628b
Remove unused PS5 mech controller
6kn4eakfr4s Feb 28, 2025
f5b4091
Merge branch 'pinnacles' into 2-camera--stuff
6kn4eakfr4s Feb 28, 2025
c001f3b
Remove unused subsystems
6kn4eakfr4s Feb 28, 2025
8dff2b2
Merge pull request #24 from grt192/2-camera--stuff
6kn4eakfr4s Feb 28, 2025
f6457bf
Merge branch 'pinnacles' into vision-constants
6kn4eakfr4s Feb 28, 2025
95a62b7
changed camera names
Tonyxwu Feb 28, 2025
38ff4d8
Merge branch 'vision-constants' of https://github.com/grt192/GRT2025 …
Tonyxwu Feb 28, 2025
20117bf
800-600 calibrations
6kn4eakfr4s Mar 17, 2025
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
29 changes: 29 additions & 0 deletions .OutlineViewer/outlineviewer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,37 @@
"serverTeam": "192"
},
"transitory": {
"MotorStats": {
"open": true
},
"PathPlanner": {
"open": true
},
"Shuffleboard": {
"open": true
},
"SmartDashboard": {
"open": true
},
"Swerve": {
"open": true
},
"SwerveStats": {
"Pose2d##v_/SwerveStats/estimatedPose": {
"Rotation2d##v_rotation": {
"open": true
},
"Translation2d##v_translation": {
"open": true
},
"open": true
},
"open": true
},
"photonvision": {
"Arducam_OV9281_USB_Camera": {
"open": true
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToGroundCommand extends Command {
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToGroundCommand(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setPositionReference(ElevatorConstants.GROUND_POS);
}

@Override
public boolean isFinished() {
return elevatorSubsystem.getClosedLoopError()
< ElevatorConstants.ELEVATOR_TOLERANCE;
}
}
25 changes: 25 additions & 0 deletions src/main/java/frc/robot/Commands/Elevator/ElevatorToL1Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToL1Command extends Command {
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToL1Command(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setPositionReference(ElevatorConstants.L1_POS);
}

@Override
public boolean isFinished() {
return elevatorSubsystem.getClosedLoopError()
< ElevatorConstants.ELEVATOR_TOLERANCE;
}
}
25 changes: 25 additions & 0 deletions src/main/java/frc/robot/Commands/Elevator/ElevatorToL2Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToL2Command extends Command {
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToL2Command(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setPositionReference(ElevatorConstants.L2_POS);
}

@Override
public boolean isFinished() {
return elevatorSubsystem.getClosedLoopError()
< ElevatorConstants.ELEVATOR_TOLERANCE;
}
}
25 changes: 25 additions & 0 deletions src/main/java/frc/robot/Commands/Elevator/ElevatorToL3Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToL3Command extends Command {
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToL3Command(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setPositionReference(ElevatorConstants.L3_POS);
}

@Override
public boolean isFinished() {
return elevatorSubsystem.getClosedLoopError()
< ElevatorConstants.ELEVATOR_TOLERANCE;
}
}
25 changes: 25 additions & 0 deletions src/main/java/frc/robot/Commands/Elevator/ElevatorToL4Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToL4Command extends Command {
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToL4Command(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setPositionReference(ElevatorConstants.L4_POS);
}

@Override
public boolean isFinished() {
return elevatorSubsystem.getClosedLoopError()
< ElevatorConstants.ELEVATOR_TOLERANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToLimitSwitchCommand extends Command{
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToLimitSwitchCommand(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setDutyCycle(
ElevatorConstants.DUTY_CYCLE_TO_GROUND_SPEED
);
}

@Override
public boolean isFinished(){
return elevatorSubsystem.getLimitSwitch();
}

@Override
public void end(boolean interrupted) {
elevatorSubsystem.setDutyCycle(0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Elevator;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.ElevatorConstants;
import frc.robot.subsystems.Elevator.ElevatorSubsystem;

public class ElevatorToSourceCommand extends Command {
private ElevatorSubsystem elevatorSubsystem;

public ElevatorToSourceCommand(ElevatorSubsystem elevatorSubsystem) {
this.elevatorSubsystem = elevatorSubsystem;
addRequirements(elevatorSubsystem);
}

@Override
public void initialize() {
elevatorSubsystem.setPositionReference(ElevatorConstants.SOURCE_POS);
}

@Override
public boolean isFinished() {
return elevatorSubsystem.getClosedLoopError()
< ElevatorConstants.ELEVATOR_TOLERANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Intake.Pivot;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.IntakeConstans.PivotConstants;
import frc.robot.subsystems.Intake.Pivot.PivotSubsystem;

public class PivotToHorizontalCommand extends Command{
private final PivotSubsystem pivotSubsystem;

public PivotToHorizontalCommand(PivotSubsystem pivotSubsystem){
this.pivotSubsystem = pivotSubsystem;
this.addRequirements(pivotSubsystem);
}

@Override
public void initialize(){
pivotSubsystem.setPositionReferenceWithVoltage(PivotConstants.PIVOT_HORIZONTAL);
}

@Override
public boolean isFinished(){
return Math.abs(pivotSubsystem.getClosedLoopError())
< PivotConstants.PIVOT_TOLERANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Intake.Pivot;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.IntakeConstans.PivotConstants;
import frc.robot.subsystems.Intake.Pivot.PivotSubsystem;

public class PivotToOuttakeCommand extends Command{
private final PivotSubsystem pivotSubsystem;

public PivotToOuttakeCommand(PivotSubsystem pivotSubsystem){
this.pivotSubsystem = pivotSubsystem;
this.addRequirements(pivotSubsystem);
}

@Override
public void initialize(){
pivotSubsystem.setPositionReferenceWithVoltage(PivotConstants.OUTTAKE_POS);
}

@Override
public boolean isFinished(){
return Math.abs(pivotSubsystem.getClosedLoopError())
< PivotConstants.PIVOT_TOLERANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Intake.Pivot;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.IntakeConstans.PivotConstants;
import frc.robot.subsystems.Intake.Pivot.PivotSubsystem;

public class PivotToSourceCommand extends Command{
private final PivotSubsystem pivotSubsystem;

public PivotToSourceCommand(PivotSubsystem pivotSubsystem){
this.pivotSubsystem = pivotSubsystem;
this.addRequirements(pivotSubsystem);
}

@Override
public void initialize(){
pivotSubsystem.setPositionReferenceWithVoltage(PivotConstants.SOURCE_POS);
}

@Override
public boolean isFinished(){
return Math.abs(pivotSubsystem.getClosedLoopError())
< PivotConstants.PIVOT_TOLERANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package frc.robot.Commands.Intake.Pivot;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.IntakeConstans.PivotConstants;
import frc.robot.subsystems.Intake.Pivot.PivotSubsystem;

public class PivotUp90Command extends Command{
private final PivotSubsystem pivotSubsystem;

public PivotUp90Command(PivotSubsystem pivotSubsystem){
this.pivotSubsystem = pivotSubsystem;
this.addRequirements(pivotSubsystem);
}

@Override
public void initialize(){
pivotSubsystem.setPositionReferenceWithVoltage(PivotConstants.PIVOT_MAX_POS);
}

@Override
public boolean isFinished(){
return Math.abs(pivotSubsystem.getClosedLoopError())
< PivotConstants.PIVOT_TOLERANCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package frc.robot.Commands.Intake.Pivot;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.IntakeConstans.PivotConstants;
import frc.robot.subsystems.Intake.Pivot.PivotSubsystem;

public class PivotZeroTo90Command extends Command{
private final PivotSubsystem pivotSubsystem;

public PivotZeroTo90Command(PivotSubsystem pivotSubsystem){
this.pivotSubsystem = pivotSubsystem;
this.addRequirements(pivotSubsystem);
}

@Override
public void initialize(){
pivotSubsystem.setPosition(Math.PI / 2.);
}

@Override
public boolean isFinished(){
return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package frc.robot.Commands.Intake.Roller;

import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.IntakeConstans.RollerConstants;
import frc.robot.subsystems.Intake.Roller.RollerSubsystem;

public class RollerInCommand extends Command{

private final RollerSubsystem rollerSubsystem;

public RollerInCommand(RollerSubsystem rollerSubsystem){
this.rollerSubsystem = rollerSubsystem;
this.addRequirements(rollerSubsystem);
}

@Override
public void initialize(){
rollerSubsystem.setRollerSpeed(RollerConstants.ROLLER_IN_SPEED);
}

@Override
public boolean isFinished(){
return Math.abs(rollerSubsystem.getClosedLoopError())
< RollerConstants.ROLLER_TOLERANCE
|| rollerSubsystem.getIntakeSensor();
}
}
Loading