Skip to content
Open

bad #24

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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.3.1"
id "edu.wpi.first.GradleRIO" version "2026.2.1"
}

java {
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
String frcYear = '2025'
String frcYear = '2026'
File frcHome
if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC')
Expand Down
54 changes: 54 additions & 0 deletions src/main/deploy/pathplanner/paths/B Coarl Station R.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 1.7684311224489797,
"y": 2.13345025510204
},
"prevControl": null,
"nextControl": {
"x": 1.6863520408163264,
"y": 1.8424426020408156
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 1.4326530612244897,
"y": 1.3201211734693867
},
"prevControl": {
"x": 1.5445790816326532,
"y": 1.6932079081632638
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 55.451632943988734
},
"reversed": false,
"folder": null,
"idealStartingState": {
"velocity": 0,
"rotation": 65.397205841715
},
"useDefaultConstraints": true
}
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public static final class AutoConstants { //TODO: The below constants are used i
public static final int ELEVATOR_MOTOR_LEFT_ID = 10;
public static final int ELEVATOR_MOTOR_RIGHT_ID = 11;
public static final double ELEVATOR_LOWER_LIMIT = 0.335449; //.403809; //TODO: Placeholder
//public static final double ELEVATOR_UPPER_LIMIT = 43; //TODO: Placeholder
public static final double ELEVATOR_UPPER_LIMIT = 43; //TODO: Placeholder
public static final double ELEVATOR_MAX_ROTATIONS_PER_SEC = 80;
public static final double ELEVATOR_CAN_TO_MOTOR_RATIO = 5.24954/0.916748;
public static final int ELEVATOR_CAN_CODER_ID = 4;
Expand Down
19 changes: 17 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import com.pathplanner.lib.auto.AutoBuilder;
import com.pathplanner.lib.auto.NamedCommands;
import com.pathplanner.lib.commands.PathPlannerAuto;
import com.pathplanner.lib.path.PathConstraints;
import com.pathplanner.lib.path.PathPlannerPath;

import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.math.util.Units;
import edu.wpi.first.wpilibj.GenericHID;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.XboxController;
Expand Down Expand Up @@ -180,7 +183,19 @@ private void configureButtonBindings() {
*/
public Command getAutonomousCommand() {
// An ExampleCommand will run in autonomous
return autoChooser.getSelected();
return autoChooser.getSelected();
// Load the path we want to pathfind to and follow
PathPlannerPath path = PathPlannerPath.fromPathFile("B Coarl Station R");

// Create the constraints to use while pathfinding. The constraints defined in the path will only be used for the path.
PathConstraints constraints = new PathConstraints(
3.0, 4.0,
Units.degreesToRadians(540), Units.degreesToRadians(720));

// Since AutoBuilder is configured, we can use it to build pathfinding commands
Command pathfindingCommand = AutoBuilder.pathfindThenFollowPath(
path,
constraints);
//return new PathPlannerAuto("New Auto");

// Command[] autoCommands = new Command[numOfAutoActions.getSelected()*2];
Expand Down Expand Up @@ -224,4 +239,4 @@ public void setupAutoChoosers() {
hasSetupAutoChoosers = true;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,33 @@

package frc.robot.commands;

import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.subsystems.SwerveSubsystem;

/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */
public class CmdElevatorSetPosition extends Command {
/** Creates a new CmdElevatorSetPosition. */
public CmdElevatorSetPosition() {
// Use addRequirements() here to declare subsystem dependencies.
}
public class RobotTurn extends Command {


private SwerveSubsystem swerveSubsystem;

/** Creates a new RobotTurn. */
public RobotTurn(SwerveSubsystem swerveSubsystem) {
// Use addRequirements() here to declare subsystem dependencies.
addRequirements(swerveSubsystem );
this.swerveSubsystem = swerveSubsystem;
}


// Called when the command is initially scheduled.
@Override
public void initialize() {}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {}
double speed = 0.0;

public void execute() {
swerveSubsystem.drive(new Translation2d(),1d,false,false );
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {}
Expand Down
215 changes: 0 additions & 215 deletions src/main/java/frc/robot/subsystems/ElevatorSubsystem.java

This file was deleted.

Loading