2 Commits

Author SHA1 Message Date
Antoine PerreaultE
cf2580ca85 Merge branch 'main' of https://git.demerso.net/PLS5618/Reefscape-2025 2025-12-03 17:58:01 -05:00
Antoine PerreaultE
92c1c59599 2025-12-03 17:57:22 -05:00
2 changed files with 14 additions and 12 deletions

View File

@@ -3,13 +3,13 @@
"waypoints": [ "waypoints": [
{ {
"anchor": { "anchor": {
"x": 16.243499999999997, "x": 16.243,
"y": 6.55025 "y": 6.55025
}, },
"prevControl": null, "prevControl": null,
"nextControl": { "nextControl": {
"x": 15.18625440479427, "x": 15.354412756981612,
"y": 6.55025 "y": 6.548572497113415
}, },
"isLocked": false, "isLocked": false,
"linkedName": null "linkedName": null
@@ -20,8 +20,8 @@
"y": 6.55025 "y": 6.55025
}, },
"prevControl": { "prevControl": {
"x": 2.34525, "x": 2.306674365666888,
"y": 6.55025 "y": 6.526815183428469
}, },
"nextControl": null, "nextControl": null,
"isLocked": false, "isLocked": false,

View File

@@ -49,12 +49,13 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
private final SwerveRequest.SysIdSwerveTranslation m_translationCharacterization = new SwerveRequest.SysIdSwerveTranslation(); private final SwerveRequest.SysIdSwerveTranslation m_translationCharacterization = new SwerveRequest.SysIdSwerveTranslation();
private final SwerveRequest.SysIdSwerveSteerGains m_steerCharacterization = new SwerveRequest.SysIdSwerveSteerGains(); private final SwerveRequest.SysIdSwerveSteerGains m_steerCharacterization = new SwerveRequest.SysIdSwerveSteerGains();
private final SwerveRequest.SysIdSwerveRotation m_rotationCharacterization = new SwerveRequest.SysIdSwerveRotation(); private final SwerveRequest.SysIdSwerveRotation m_rotationCharacterization = new SwerveRequest.SysIdSwerveRotation();
public void resetPose(Pose2d newPose) {
getState().Pose = newPose; // ou appelle setPose(newPose) selon ton code
}//ca marche pas
private void configureAutoBuilder() { private void configureAutoBuilder() {
try { try {
var config = RobotConfig.fromGUISettings(); var config = RobotConfig.fromGUISettings();
AutoBuilder.configure( AutoBuilder.configure(
() -> getState().Pose, // Supplier of current robot pose () -> getState().Pose, // Supplier of current robot pose
this::resetOdometry, // Consumer for seeding pose against auto this::resetOdometry, // Consumer for seeding pose against auto
() -> getState().Speeds, // Supplier of current robot speeds () -> getState().Speeds, // Supplier of current robot speeds
@@ -87,6 +88,7 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
}); });
} }
/** /**
* Constructs a CTRE SwerveDrivetrain using the specified constants. * Constructs a CTRE SwerveDrivetrain using the specified constants.
* <p> * <p>
@@ -149,7 +151,7 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
if (Utils.isSimulation()) { if (Utils.isSimulation()) {
startSimThread(); startSimThread();
} }
configureAutoBuilder(); // configureAutoBuilder();
} }
/** /**