Skip to content
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
20 changes: 20 additions & 0 deletions CAD/2025/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "2025 RA25",
"rotations": [
{
"axis": "x",
"degrees": 90.0
},
{
"axis": "y",
"degrees": 0.0
},
{
"axis": "z",
"degrees": 270.0
}
],
"position": [0.0, 0.0, 0.0],
"cameras": [],
"components": []
}
Binary file added CAD/2025/model.glb
Binary file not shown.
170 changes: 170 additions & 0 deletions advantagescope-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
{
"hubs": [
{
"x": 3007,
"y": 157,
"width": 1607,
"height": 808,
"state": {
"sidebar": {
"width": 300,
"expanded": [
"/SmartDashboard/Field/OdometryPose",
"/SmartDashboard/Field/Robot",
"/SmartDashboard/Field/XModules",
"/SmartDashboard/swerve/advantagescope",
"/SmartDashboard/MapleSim",
"/AdvantageKit/RealOutputs/Sim/RobotPose",
"/SmartDashboard/swerve"
]
},
"tabs": {
"selected": 3,
"tabs": [
{
"type": 0,
"title": "",
"controller": null,
"controllerUUID": "loy0vs5fjh42ly5j6azpwuon54lsm5nf",
"renderer": "",
"controlsHeight": 0
},
{
"type": 1,
"title": "Line Graph",
"controller": {
"leftSources": [],
"rightSources": [],
"discreteSources": [],
"leftLockedRange": null,
"rightLockedRange": null,
"leftUnitConversion": {
"autoTarget": null,
"preset": null
},
"rightUnitConversion": {
"autoTarget": null,
"preset": null
},
"leftFilter": 0,
"rightFilter": 0
},
"controllerUUID": "v8eqw2uqjo9n76steymeyw5g88i3biae",
"renderer": null,
"controlsHeight": 200
},
{
"type": 2,
"title": "2D Field",
"controller": {
"sources": [],
"field": "FRC:2026 Field",
"orientation": 0,
"size": "large"
},
"controllerUUID": "dox8w70if5g8tlnoza04ddj3f0dbyo0y",
"renderer": null,
"controlsHeight": 200
},
{
"type": 3,
"title": "3D Field",
"controller": {
"sources": [
{
"type": "robot",
"logKey": "NT:/AdvantageKit/RealOutputs/Sim/RobotPose",
"logType": "Pose2d",
"visible": true,
"options": {
"model": "2026 KitBot"
}
},
{
"type": "gamePiece",
"logKey": "NT:/AdvantageKit/RealOutputs/FieldSimulation/Fuel",
"logType": "Pose3d[]",
"visible": true,
"options": {
"variant": "Fuel"
}
}
],
"game": "FRC:2026 Field"
},
"controllerUUID": "hqfgw1v7wxguag7mnwu6tr4abtw76zrj",
"renderer": {
"cameraIndex": -1,
"orbitFov": 50,
"cameraPosition": [
3.1633543281769336,
6.109330082975031,
-6.816309206052037
],
"cameraTarget": [
0,
0.5,
0
]
},
"controlsHeight": 200
},
{
"type": 9,
"title": "Swerve",
"controller": {
"sources": [
{
"type": "states",
"logKey": "NT:/SmartDashboard/swerve/advantagescope/currentStates",
"logType": "SwerveModuleState[]",
"visible": true,
"options": {
"color": "#ff0000",
"arrangement": "0,1,2,3"
}
},
{
"type": "states",
"logKey": "NT:/SmartDashboard/swerve/advantagescope/desiredStates",
"logType": "SwerveModuleState[]",
"visible": true,
"options": {
"color": "#0000ff",
"arrangement": "0,1,2,3"
}
},
{
"type": "chassisSpeeds",
"logKey": "NT:/SmartDashboard/swerve/advantagescope/desiredChassisSpeeds",
"logType": "ChassisSpeeds",
"visible": true,
"options": {
"color": "#0000ff"
}
},
{
"type": "rotation",
"logKey": "NT:/SmartDashboard/swerve/advantagescope/robotRotation",
"logType": "Rotation2d",
"visible": true,
"options": {}
}
],
"maxSpeed": 5,
"sizeX": 0.65,
"sizeY": 0.65,
"orientation": 1
},
"controllerUUID": "dlzbn4u6wah7cpafohlmyohrj3a5rozt",
"renderer": null,
"controlsHeight": 200
}
]
}
}
}
],
"satellites": [],
"version": "26.0.0"
}
6 changes: 6 additions & 0 deletions simgui-ds.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,11 @@
"buttonCount": 0,
"povCount": 0
}
],
"robotJoysticks": [
{
"guid": "78696e70757401000000000000000000",
"useGamepad": true
}
]
}
6 changes: 3 additions & 3 deletions src/main/deploy/swerve/modules/backleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"absoluteEncoderOffset": 44.205,
"drive": {
"type": "sparkmax_neo",
"id": 8,
"id": 7,
"canbus": null
},
"angle": {
"type": "sparkmax_neo",
"id": 7,
"id": 11,
"canbus": null
},
"encoder": {
"type": "thrifty",
"id": 2,
"id": 3,
"canbus": null
},
"inverted": {
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/swerve/modules/backright.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"absoluteEncoderOffset": 295.091,
"drive": {
"type": "sparkmax_neo",
"id": 12,
"id": 8,
"canbus": null
},
"angle": {
"type": "sparkmax_neo",
"id": 11,
"id": 12,
"canbus": null
},
"encoder": {
"type": "thrifty",
"id": 3,
"id": 4,
"canbus": null
},
"inverted": {
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/swerve/modules/frontleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"absoluteEncoderOffset": 6.450,
"drive": {
"type": "sparkmax_neo",
"id": 6,
"id": 5,
"canbus": null
},
"angle": {
"type": "sparkmax_neo",
"id": 5,
"id": 9,
"canbus": null
},
"encoder": {
"type": "thrifty",
"id": 0,
"id": 1,
"canbus": null
},
"inverted": {
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/swerve/modules/frontright.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"absoluteEncoderOffset": 119.779,
"drive": {
"type": "sparkmax_neo",
"id": 10,
"id": 6,
"canbus": null
},
"angle": {
"type": "sparkmax_neo",
"id": 9,
"id": 10,
"canbus": null
},
"encoder": {
"type": "thrifty",
"id": 1,
"id": 2,
"canbus": null
},
"inverted": {
Expand Down
34 changes: 33 additions & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
package frc.robot;

import static edu.wpi.first.units.Units.Inches;

import org.ironmaple.simulation.drivesims.COTS;
import org.ironmaple.simulation.drivesims.configs.DriveTrainSimulationConfig;

import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.math.kinematics.SwerveDriveKinematics;
import edu.wpi.first.math.system.plant.DCMotor;
import edu.wpi.first.math.util.Units;

public class Constants {
public static class SwerveDriveConstants {
public static final SwerveDriveKinematics k_kinematics = new SwerveDriveKinematics(); //get this in when we know bot dims
private final static Translation2d m_frontLeftLocation = new Translation2d(0.381, 0.381);
private final static Translation2d m_frontRightLocation = new Translation2d(0.381, -0.381);
private final static Translation2d m_backLeftLocation = new Translation2d(-0.381, 0.381);
private final static Translation2d m_backRightLocation = new Translation2d(-0.381, -0.381);

public static final SwerveDriveKinematics k_kinematics = new SwerveDriveKinematics(
m_frontLeftLocation, m_frontRightLocation, m_backLeftLocation, m_backRightLocation
); //get this in when we know bot dims

public static final double k_maxSpeed = Units.feetToMeters(14.5);

public static final double k_maxDriverSpeed = 1.0; // Meters per second
public static final double k_maxDriverBoostSpeed = 4.5;

public static final double k_boostScaler = k_maxDriverBoostSpeed / k_maxDriverSpeed;
}

public static class ControllerConstants{
Expand Down Expand Up @@ -35,4 +55,16 @@ public static class FieldConstants {
public final static double k_width = Units.feetToMeters(26.0) + Units.inchesToMeters(5);
public final static double k_length = Units.feetToMeters(57.0) + Units.inchesToMeters(6.0 + (7.0 / 8.0));
}

public static class SimulationConstants{
public final static boolean k_isInSimulation = true;
public final static DriveTrainSimulationConfig k_config = DriveTrainSimulationConfig.Default()
.withGyro(COTS.ofPigeon2())
.withSwerveModule(COTS.ofMark4(
DCMotor.getKrakenX60(1), // Drive motor is a Kraken X60
DCMotor.getFalcon500(1), // Steer motor is a Falcon 500
COTS.WHEELS.COLSONS.cof, // Use the COF for Colson Wheels
3))
.withBumperSize(Inches.of(28.5), Inches.of(33.5));
}
}
Loading