Compare commits
2 Commits
ca694c12d8
...
cf2580ca85
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf2580ca85 | ||
|
|
92c1c59599 |
@@ -3,13 +3,13 @@
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 16.243499999999997,
|
||||
"x": 16.243,
|
||||
"y": 6.55025
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 15.18625440479427,
|
||||
"y": 6.55025
|
||||
"x": 15.354412756981612,
|
||||
"y": 6.548572497113415
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
@@ -20,8 +20,8 @@
|
||||
"y": 6.55025
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 2.34525,
|
||||
"y": 6.55025
|
||||
"x": 2.306674365666888,
|
||||
"y": 6.526815183428469
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
|
||||
@@ -49,12 +49,13 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
|
||||
private final SwerveRequest.SysIdSwerveTranslation m_translationCharacterization = new SwerveRequest.SysIdSwerveTranslation();
|
||||
private final SwerveRequest.SysIdSwerveSteerGains m_steerCharacterization = new SwerveRequest.SysIdSwerveSteerGains();
|
||||
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() {
|
||||
try {
|
||||
var config = RobotConfig.fromGUISettings();
|
||||
AutoBuilder.configure(
|
||||
|
||||
() -> getState().Pose, // Supplier of current robot pose
|
||||
this::resetOdometry, // Consumer for seeding pose against auto
|
||||
() -> getState().Speeds, // Supplier of current robot speeds
|
||||
@@ -82,11 +83,12 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
|
||||
} catch (Exception ex) {
|
||||
DriverStation.reportError("Failed to load PathPlanner config and configure AutoBuilder", ex.getStackTrace());
|
||||
}
|
||||
PPHolonomicDriveController.overrideRotationFeedback(()->{
|
||||
return 0;
|
||||
});
|
||||
PPHolonomicDriveController.overrideRotationFeedback(()->{
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a CTRE SwerveDrivetrain using the specified constants.
|
||||
* <p>
|
||||
@@ -149,7 +151,7 @@ public class CommandSwerveDrivetrain extends TunerSwerveDrivetrain implements Su
|
||||
if (Utils.isSimulation()) {
|
||||
startSimThread();
|
||||
}
|
||||
configureAutoBuilder();
|
||||
// configureAutoBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user