Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
74fd100
Remove entire robot/lib/swerve folder and replace all references with…
dcao6668 Oct 11, 2025
4e698d8
Remove WheelTracker, Pigeon, SwerveModule, and TalonFxManager from co…
dcao6668 Oct 11, 2025
c208b63
Deprecate RobotState, CancoderManager, AutoPilotCommand and SnapComma…
dcao6668 Oct 11, 2025
d850d45
Deprecate limelight-based vision localization code
dcao6668 Oct 11, 2025
bf54997
Deprecated robot/lib/drivers folder and its classes (CanDeviceId and …
dcao6668 Oct 11, 2025
c37ed3c
reformat to prepare for sysID tuning
dcao6668 Oct 12, 2025
78c351d
feat: automode scaffolding and PIDV, validation on first complex path…
github-0-0 Oct 13, 2025
20803a2
Merge branch 'DCBaseline' of https://github.com/FRC1458/1458Framework…
github-0-0 Oct 13, 2025
fd640cb
fix: pid to pose
github-0-0 Oct 19, 2025
67d0787
tested snap and it work :D
github-0-0 Oct 19, 2025
206d515
minor refactor
github-0-0 Oct 30, 2025
9f4c42c
refactor of the refactor
github-0-0 Oct 30, 2025
db9d7da
feat: sysid tuning for drive-motors, verified on robot.
dcao6668 Nov 25, 2025
5d9227f
Merge branch 'DCBaseline' of https://github.com/FRC1458/1458Framework…
dcao6668 Nov 25, 2025
d3d9245
finetuning steer-drive coupling ratio
dcao6668 Nov 25, 2025
28e5885
Merged from 2025RobotTest
github-0-0 Dec 7, 2025
8b62b6d
Trajectory update soon
github-0-0 Dec 7, 2025
7364323
i think later though
github-0-0 Dec 7, 2025
dd0973a
minor change
github-0-0 Dec 7, 2025
7cb2089
FEAT: SysID Rotation routine and logs
dcao6668 Dec 14, 2025
4ab705e
feat: enable VisualVM to debug RAM issues
dcao6668 Dec 15, 2025
35fff99
feat: add steer motor offsets of the 2nd bot
dcao6668 Dec 15, 2025
76bd01f
feat: add radialDeadband to fix yaw impulse when driver releases stick
dcao6668 Dec 15, 2025
8e71e10
fix kCoupleRatio value for steer/drive coupling
dcao6668 Dec 15, 2025
657d158
Pid to pose borke again
github-0-0 Dec 19, 2025
4985cc7
Fixed pid to pose and a couple more things
github-0-0 Jan 10, 2026
329433f
Merge DCBaseline for sysid stuffs
github-0-0 Jan 10, 2026
19c3d7b
Fixed PIDToPose
github-0-0 Jan 10, 2026
7e53dc4
last few bugs trust
github-0-0 Jan 10, 2026
c8e75f7
aarush's test branch
APandit1-cpu Jan 15, 2026
204c13c
dsljfs
Wow-Jr Jan 15, 2026
dc5934a
w rizz fixes
Wow-Jr Jan 20, 2026
46bb9fd
L rizz fixes
Wow-Jr Jan 21, 2026
b1cee63
mid rizz fixes
Wow-Jr Jan 21, 2026
f38a11d
Merge remote-tracking branch 'origin/main' into indexer
Wow-Jr Jan 27, 2026
6a1ec2c
Merging 2025 to 2026 wpi
Wow-Jr Jan 27, 2026
4eff110
importing changes + updating laser
Wow-Jr Jan 27, 2026
32778f3
arvindChanges™
Wow-Jr Jan 27, 2026
7bc9d59
adding getInstance method, prototype for sensing
Wow-Jr Jan 29, 2026
2452982
added controller
APandit1-cpu Jan 29, 2026
3b65c03
Merge branch 'indexer' into aarushTest(current)
Quantalabs Jan 29, 2026
9a7dcad
added keybind controls
Dibavi Jan 31, 2026
0727804
checkin
APandit1-cpu Feb 3, 2026
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
38 changes: 18 additions & 20 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,38 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "wpilib",
"name": "WPILib Desktop Debug",
"type": "java",
"name": "Main",
"request": "launch",
"desktop": true,
"mainClass": "frc.robot.Main",
"projectName": "Robot2026"
},
{
"type": "wpilib",
"name": "WPILib roboRIO Debug",
"type": "java",
"name": "IndexerConstants",
"request": "launch",
"desktop": false,
}
]
}

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

"mainClass": "frc.robot.subsystems.indexer.IndexerConstants",
"projectName": "Robot2026"
},
{
"type": "java",
"name": "Indexer",
"request": "launch",
"mainClass": "frc.robot.subsystems.indexer.Indexer",
"projectName": "Robot2026"
},
{
"type": "wpilib",
"name": "WPILib Desktop Debug",
"request": "launch",
"desktop": true,
"desktop": true
},
{
"type": "wpilib",
"name": "WPILib roboRIO Debug",
"request": "launch",
"desktop": false,
"desktop": false
}
]
}
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ deploy {
// getTargetTypeClass is a shortcut to get the class type using a string

frcJava(getArtifactTypeClass('FRCJavaArtifact')) {
// Enable VisualVM connection
jvmArgs.add("-Dcom.sun.management.jmxremote=true")
jvmArgs.add("-Dcom.sun.management.jmxremote.port=1198")
jvmArgs.add("-Dcom.sun.management.jmxremote.local.only=false")
jvmArgs.add("-Dcom.sun.management.jmxremote.ssl=false")
jvmArgs.add("-Dcom.sun.management.jmxremote.authenticate=false")
jvmArgs.add("-Djava.rmi.server.hostname=10.14.58.2") // Replace TE.AM with team number
}

// Static files artifact
Expand All @@ -52,11 +59,21 @@ def includeDesktopSupport = true

// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 5.

task(replayWatch, type: JavaExec) {
mainClass = "org.littletonrobotics.junction.ReplayWatch"
classpath = sourceSets.main.runtimeClasspath
}

dependencies {
annotationProcessor wpi.java.deps.wpilibAnnotations()
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()

// ...
def akitJson = new groovy.json.JsonSlurper().parseText(new File(projectDir.getAbsolutePath() + "/vendordeps/AdvantageKit.json").text)
annotationProcessor "org.littletonrobotics.akit:akit-autolog:$akitJson.version"

roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@

import static frc.robot.Robot.controller;

import java.lang.reflect.Method;
import java.util.function.Supplier;

import com.ctre.phoenix6.swerve.SwerveRequest;

import edu.wpi.first.math.geometry.*;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction;
import frc.robot.auto.AutoRoutines;
import frc.robot.auto.AutoSelector.Auto;
import frc.robot.subsystems.drive.Drive;
import frc.robot.subsystems.drive.ctre.CtreDrive.SysIdRoutineType;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;

public class ControlsMapping {
public static void mapTeleopCommand() {
public class ControlMap {
public static void implement(String key) {
switch (key) {
case "mapTwo": mapTwo(); break;
default: standard();
}
}

public static void standard() {
Drive.getInstance().setDefaultCommand((Drive.getInstance().teleopCommand()));
// run sysID functions
Drive.getInstance().getCtreDrive().setSysIdRoutine(SysIdRoutineType.STEER);
Expand All @@ -21,7 +40,38 @@ public static void mapTeleopCommand() {
controller.rightBumper().whileTrue(Drive.getInstance().autoAlign(false));
controller.x().whileTrue(Drive.getInstance().autopilotAlign(true));
controller.y().whileTrue(Drive.getInstance().autopilotAlign(false));
controller.b().whileTrue(HangCommand()); // TODO: Implement hang from armaaan
controller.leftTrigger().whileTrue(intakeCommand());
controller.rightTrigger().whileTrue(shooterCommand());
}

public static void mapTwo() {
Drive.getInstance().setDefaultCommand((Drive.getInstance().teleopCommand()));
// run sysID functions
Drive.getInstance().getCtreDrive().setSysIdRoutine(SysIdRoutineType.STEER);

controller.a().whileTrue(shooterCommand());
controller.leftBumper().whileTrue(Drive.getInstance().autoAlign(true));
controller.rightBumper().whileTrue(Drive.getInstance().autoAlign(false));
controller.x().whileTrue(Drive.getInstance().autopilotAlign(true));
controller.y().whileTrue(intakeCommand());
controller.b().whileTrue(Drive.getInstance().autopilotAlign(false));
controller.leftTrigger().whileTrue(HangCommand()); // TODO: Implement hang from armaaan
controller.rightTrigger().onTrue(Drive.getInstance().resetPoseCommand(new Pose2d()));
}

public static Command intakeCommand() {
return Commands.print("Intaking");
}
public static Command HangCommand() {
return Commands.print("Hanging");
}
public static Command shooterCommand() {
return Commands.print("Shooting");

}

//make a method that returns command, but it returns command.none, replace everything with new instance command with the command name.

public static void mapSysId() {
// set up sysID routine type
Expand Down
50 changes: 45 additions & 5 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
package frc.robot;

<<<<<<< HEAD
import com.pathplanner.lib.commands.FollowPathCommand;

import edu.wpi.first.wpilibj.DataLogManager;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
=======
import frc.robot.auto.AutoSelector;

import java.util.Optional;

import org.littletonrobotics.junction.LogFileUtil;
import org.littletonrobotics.junction.LoggedRobot;
import org.littletonrobotics.junction.Logger;
import org.littletonrobotics.junction.networktables.NT4Publisher;
import org.littletonrobotics.junction.wpilog.WPILOGReader;
import org.littletonrobotics.junction.wpilog.WPILOGWriter;

import com.pathplanner.lib.commands.FollowPathCommand;

import edu.wpi.first.epilogue.Logged;
import edu.wpi.first.epilogue.logging.EpilogueBackend;
import edu.wpi.first.hal.AllianceStationID;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Pose3d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Rotation3d;
import edu.wpi.first.wpilibj.DataLogManager;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.simulation.DriverStationSim;
import edu.wpi.first.wpilibj.util.Color;
import edu.wpi.first.wpilibj2.command.*;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.robot.Constants.Controllers;
import frc.robot.auto.AutoSelector;
import frc.robot.subsystems.TelemetryManager;
import frc.robot.subsystems.drive.*;
import frc.robot.subsystems.drive.Drive;
import frc.robot.subsystems.vision.VisionDeviceManager;

/**
Expand All @@ -29,10 +51,13 @@
* this project, you must also update the Main.java file in the project.
*/
@SuppressWarnings("unused")
public class Robot extends TimedRobot {
public class Robot extends LoggedRobot {
private static final CommandScheduler commandScheduler = CommandScheduler.getInstance();
private AutoSelector autoChooser;
private Command autoCommand;
private static final String standardMap = "standard";
private static final String mapTwo = "mapTwo";
private final SendableChooser<String> mapChooser = new SendableChooser<>();

public static final CommandXboxController controller =
new CommandXboxController(Controllers.DRIVER_CONTROLLER_PORT);
Expand Down Expand Up @@ -60,6 +85,10 @@ public Robot() {
System.out.println("Log/USB mounts NOT OK");
}
DriverStation.startDataLog(DataLogManager.getLog());

mapChooser.setDefaultOption("Standard Keybinds", standardMap);
mapChooser.addOption("Second Control Map", mapTwo);
SmartDashboard.putData("Keybinds", mapChooser);
}

/**
Expand All @@ -71,6 +100,15 @@ public Robot() {
*/
@Override
public void robotPeriodic() {
Logger.recordOutput("RobotPose", new Pose2d());
Logger.recordOutput("ZeroedComponentPose", new Pose3d[] {new Pose3d()});
Logger.recordOutput(
"FinalComponentPoses",
new Pose3d[] {
new Pose3d(
-0.238, 0.0, 0.298, new Rotation3d(0.0, Math.sin(Timer.getTimestamp
()) -1.0, 0.0)),
});
// Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled
// commands, running already-scheduled commands, removing finished or interrupted commands,
// and running subsystem periodic() methods. This must be called from the robot's periodic
Expand Down Expand Up @@ -118,7 +156,9 @@ public void teleopInit() {
}
Drive.getInstance().setDefaultCommand(Drive.getInstance().teleopCommand());

ControlsMapping.mapTeleopCommand();
String selectedMap = mapChooser.getSelected();
System.out.println("Keybind selected: " + selectedMap);
ControlMap.implement(selectedMap);
}

/** This function is called periodically during operator control. */
Expand All @@ -132,7 +172,7 @@ public void testInit() {
CommandScheduler.getInstance().cancelAll();

//map test commands
ControlsMapping.mapSysId();
ControlMap.mapSysId();
}

/** This function is called periodically during test mode. */
Expand Down
Loading