Skip to content
Merged
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
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"edu.wpi.first.math.**.proto.*",
"edu.wpi.first.math.**.struct.*",
],
"java.dependency.enableDependencyCheckup": false,
"java.format.settings.url": "formatter.xml",
"java.format.settings.profile": "GoogleStyle",
"[java]": {
Expand Down
2 changes: 1 addition & 1 deletion .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2025",
"projectYear": "2026",
"teamNumber": 5572
}
2 changes: 1 addition & 1 deletion WPILib-License.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2024 FIRST and other WPILib contributors
Copyright (c) 2009-2026 FIRST and other WPILib contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
9 changes: 6 additions & 3 deletions 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.2"
id "edu.wpi.first.GradleRIO" version "2026.1.1"
id "com.peterabeles.gversion" version "1.10"
}

Expand Down Expand Up @@ -44,7 +44,8 @@ deploy {

def deployArtifact = deploy.targets.roborio.artifacts.frcJava

// Set to true to use debug for JNI.
// Set to true to use debug for all targets including JNI, which will drastically impact
// performance.
wpi.java.debugJni = false

// Set this to true to enable desktop support.
Expand Down Expand Up @@ -109,7 +110,9 @@ wpi.sim.addDriverstation()
// knows where to look for our Robot Class.
jar {
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
from sourceSets.main.allSource
from('src') { into 'backup/src' }
from('vendordeps') { into 'backup/vendordeps' }
from('build.gradle') { into 'backup' }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
Expand Down
6 changes: 3 additions & 3 deletions 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 All @@ -20,8 +20,8 @@ pluginManagement {
}
def frcHomeMaven = new File(frcHome, 'maven')
maven {
name 'frcHome'
url frcHomeMaven
name = 'frcHome'
url = frcHomeMaven
}
}
}
Expand Down
24 changes: 1 addition & 23 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package frc.robot;

import org.ironmaple.simulation.SimulatedArena;
import org.jspecify.annotations.NullMarked;
import org.littletonrobotics.junction.Logger;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.robot.Robot.RobotRunType;
import frc.robot.subsystems.swerve.Swerve;
import frc.robot.subsystems.swerve.SwerveIOEmpty;
import frc.robot.subsystems.swerve.SwerveReal;
import frc.robot.subsystems.swerve.SwerveSim;
import frc.robot.subsystems.swerve.gyro.GyroIOEmpty;
import frc.robot.subsystems.swerve.gyro.GyroNavX2;
import frc.robot.subsystems.swerve.mod.SwerveModuleIOEmpty;
Expand All @@ -19,7 +14,6 @@
import frc.robot.subsystems.vision.Vision;
import frc.robot.subsystems.vision.VisionIOEmpty;
import frc.robot.subsystems.vision.VisionReal;
import frc.robot.subsystems.vision.VisionSim;
import frc.robot.util.DeviceDebug;
import frc.robot.viz.RobotViz;

Expand All @@ -40,30 +34,21 @@ public final class RobotContainer {
/* Subsystems */
private final Swerve swerve;
private final Vision vision;

private final SwerveSim sim;
private final RobotViz viz;

/**
*/
public RobotContainer(RobotRunType runtimeType) {
switch (runtimeType) {
case kReal:
sim = null;
swerve = new Swerve(SwerveReal::new, GyroNavX2::new, SwerveModuleReal::new);
vision = new Vision(swerve.state, new VisionReal());
break;
case kSimulation:
sim = new SwerveSim(new Pose2d(2.0, 2.0, Rotation2d.kZero));
swerve = new Swerve(sim::simProvider, sim::gyroProvider, sim::moduleProvider);
vision = new Vision(swerve.state, new VisionSim(sim));
break;
default:
sim = null;
swerve = new Swerve(SwerveIOEmpty::new, GyroIOEmpty::new, SwerveModuleIOEmpty::new);
vision = new Vision(swerve.state, new VisionIOEmpty());
}
viz = new RobotViz(sim, swerve);
viz = new RobotViz(swerve);

DeviceDebug.initialize();

Expand All @@ -78,13 +63,6 @@ public RobotContainer(RobotRunType runtimeType) {

/** Runs once per 0.02 seconds after subsystems and commands. */
public void periodic() {
if (sim != null) {
SimulatedArena.getInstance().simulationPeriodic();
Logger.recordOutput("FieldSimulation/Algae",
SimulatedArena.getInstance().getGamePiecesArrayByType("Algae"));
Logger.recordOutput("FieldSimulation/Coral",
SimulatedArena.getInstance().getGamePiecesArrayByType("Coral"));
}
viz.periodic();
}
}
71 changes: 0 additions & 71 deletions src/main/java/frc/robot/subsystems/swerve/SwerveSim.java

This file was deleted.

26 changes: 0 additions & 26 deletions src/main/java/frc/robot/subsystems/swerve/gyro/GyroSim.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.concurrent.Executors;
import org.jspecify.annotations.NullMarked;
import com.ctre.phoenix6.BaseStatusSignal;
import com.ctre.phoenix6.CANBus;
import com.ctre.phoenix6.StatusSignal;
import com.ctre.phoenix6.configs.CANcoderConfiguration;
import com.ctre.phoenix6.configs.TalonFXConfiguration;
Expand Down Expand Up @@ -65,7 +66,7 @@ public class SwerveModuleReal implements SwerveModuleIO {
public SwerveModuleReal(int index, PhoenixOdometryThread odometryThread) {
boolean isCanivore = Constants.Swerve.isCanviore;

String loop = isCanivore ? "*" : "";
CANBus loop = isCanivore ? new CANBus("*") : CANBus.roboRIO();
driveMotor = new TalonFX(Constants.Swerve.modulesConstants[index].driveMotorId, loop);
angleMotor = new TalonFX(Constants.Swerve.modulesConstants[index].angleMotorId, loop);
absoluteEncoder = new CANcoder(Constants.Swerve.modulesConstants[index].canCoderId, loop);
Expand Down
Loading