This commit is contained in:
samuel desharnais 2024-02-15 18:25:45 -05:00
parent 08d101b8ca
commit a862197b73
7 changed files with 158 additions and 34 deletions

View File

@ -25,39 +25,9 @@
"header": {
"open": true
}
},
"SPARK MAX [3]": {
"header": {
"open": true
}
},
"Talon SRX[16]": {
"header": {
"open": true
}
},
"Talon SRX[19]": {
"header": {
"open": true
}
},
"Talon SRX[20]": {
"header": {
"open": true
}
},
"Talon SRX[21]": {
"header": {
"open": true
}
}
},
"Solenoids": {
"0": {
"header": {
"open": true
}
},
"window": {
"visible": true
}
@ -104,6 +74,9 @@
}
}
},
"NetworkTables Info": {
"visible": true
},
"NetworkTables View": {
"visible": false
},

View File

@ -0,0 +1,94 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.3,
"y": 5.55
},
"rotation": 180.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "lancer"
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "1.1"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "1.2"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "lancer"
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "9"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}

View File

@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 1.3,
"y": 5.55
},
"prevControl": null,
"nextControl": {
"x": 1.270750725349431,
"y": 5.55
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.782768629670277,
"y": 7.468314794111773
},
"prevControl": {
"x": 7.812017904320845,
"y": 7.468314794111773
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 5.0,
"maxAcceleration": 5.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 180.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": -179.76648041708185,
"velocity": 0
},
"useDefaultConstraints": false
}

View File

@ -83,7 +83,7 @@ public class RobotContainer {
joystick.button(1).whileTrue(new LancerNote(lanceur, accumulateur));
joystick.button(4).whileTrue(new ParallelCommandGroup(new Lancer(lanceur,limelight),new Limelight_tracker(limelight,drive)));
joystick.button(2).whileTrue(new ParallelCommandGroup(new Lancerampli(lanceur,limelight),new Limelight_tracker(limelight,drive),new GuiderHaut(guideur)));
// deplacement
configureBindings();
drive.setDefaultCommand(new RunCommand(()->{

View File

@ -36,7 +36,6 @@ public class GrimpeurGauche extends Command {
}
else if(grimpeur.getpitch()<-15){
grimpeur.gauche(doubleSupplier.getAsDouble());
}
else if(grimpeur.getpitch()>15){
grimpeur.gauche(-doubleSupplier.getAsDouble());

View File

@ -31,11 +31,17 @@ public class LancerNote extends Command {
if(lancer.vitesse(vitesse)>vitesse){
accumulateur.Accumuler(0.6);
}
else{
accumulateur.Accumuler(0);
}
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {}
public void end(boolean interrupted) {
lancer.vitesse(0);
accumulateur.Accumuler(0);
}
// Returns true when the command should end.
@Override

View File

@ -38,7 +38,7 @@ public class Drive extends SubsystemBase {
e.printStackTrace();
}
AutoBuilder.configureHolonomic(swerveDrive::getPose, swerveDrive::resetOdometry, swerveDrive::getRobotVelocity, swerveDrive::setChassisSpeeds, new HolonomicPathFollowerConfig(
new PIDConstants(5,0,0), new PIDConstants(5,0,0), 4.5,
new PIDConstants(5,0,0), new PIDConstants(5,0,0), 15,
0.275,
new ReplanningConfig()
), ()->{