Compare commits
No commits in common. "0735fdb41ad97db3c6d95c59783a8eccdb746e76" and "899f8f3bf6c08b8d56aada199a45ceb9de39082b" have entirely different histories.
0735fdb41a
...
899f8f3bf6
@ -1,25 +0,0 @@
|
||||
{
|
||||
"version": 1.0,
|
||||
"startingPose": {
|
||||
"position": {
|
||||
"x": 5.76,
|
||||
"y": 3.93
|
||||
},
|
||||
"rotation": 0
|
||||
},
|
||||
"command": {
|
||||
"type": "sequential",
|
||||
"data": {
|
||||
"commands": [
|
||||
{
|
||||
"type": "path",
|
||||
"data": {
|
||||
"pathName": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"folder": null,
|
||||
"choreoAuto": false
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
{
|
||||
"version": 1.0,
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 5.76,
|
||||
"y": 3.93
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 5.801431310952625,
|
||||
"y": 3.93
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 7.3,
|
||||
"y": 3.2979107312440648
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 6.660542519857817,
|
||||
"y": 3.2979107312440648
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 7.948552157357058,
|
||||
"y": 3.2979107312440648
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 8.005090218423552,
|
||||
"y": 4.1022792022792025
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 7.89972103271822,
|
||||
"y": 3.7203159040973657
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 8.09701804368471,
|
||||
"y": 4.435517568850902
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 8.774985754985755,
|
||||
"y": 4.9411206077872745
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 8.087653449552494,
|
||||
"y": 5.261875683656129
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 9.292079772079772,
|
||||
"y": 4.699810066476734
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 10.41,
|
||||
"y": 3.07
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 9.74022792022792,
|
||||
"y": 2.8152896486229815
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 10.747612735931797,
|
||||
"y": 3.19839212203024
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 10.4,
|
||||
"y": 5.2
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 10.388509021842355,
|
||||
"y": 5.2
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
}
|
||||
],
|
||||
"rotationTargets": [
|
||||
{
|
||||
"waypointRelativePos": 1,
|
||||
"rotationDegrees": 0.0,
|
||||
"rotateFast": false
|
||||
},
|
||||
{
|
||||
"waypointRelativePos": 2,
|
||||
"rotationDegrees": 76.0,
|
||||
"rotateFast": false
|
||||
},
|
||||
{
|
||||
"waypointRelativePos": 3,
|
||||
"rotationDegrees": 90.0,
|
||||
"rotateFast": false
|
||||
},
|
||||
{
|
||||
"waypointRelativePos": 4,
|
||||
"rotationDegrees": 90.0,
|
||||
"rotateFast": false
|
||||
}
|
||||
],
|
||||
"constraintZones": [],
|
||||
"eventMarkers": [],
|
||||
"globalConstraints": {
|
||||
"maxVelocity": 3.0,
|
||||
"maxAcceleration": 3.0,
|
||||
"maxAngularVelocity": 540.0,
|
||||
"maxAngularAcceleration": 720.0
|
||||
},
|
||||
"goalEndState": {
|
||||
"velocity": 0,
|
||||
"rotation": 90.55,
|
||||
"rotateFast": false
|
||||
},
|
||||
"reversed": false,
|
||||
"folder": null,
|
||||
"previewStartingState": {
|
||||
"rotation": 0,
|
||||
"velocity": 0
|
||||
},
|
||||
"useDefaultConstraints": true
|
||||
}
|
68
src/main/deploy/pathplanner/paths/New Path.path
Normal file
68
src/main/deploy/pathplanner/paths/New Path.path
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"version": 1.0,
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 5.764349477682812,
|
||||
"y": 3.9299145299145297
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 6.764349477682812,
|
||||
"y": 3.9299145299145297
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 8.039563152896486,
|
||||
"y": 4.872174738841406
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 7.039563152896486,
|
||||
"y": 4.872174738841406
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 9.039563152896486,
|
||||
"y": 4.872174738841406
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 8.36131054131054,
|
||||
"y": 6.009781576448243
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 9.056657169990501,
|
||||
"y": 6.61880341880342
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
}
|
||||
],
|
||||
"rotationTargets": [],
|
||||
"constraintZones": [],
|
||||
"eventMarkers": [],
|
||||
"globalConstraints": {
|
||||
"maxVelocity": 3.0,
|
||||
"maxAcceleration": 3.0,
|
||||
"maxAngularVelocity": 540.0,
|
||||
"maxAngularAcceleration": 720.0
|
||||
},
|
||||
"goalEndState": {
|
||||
"velocity": 0,
|
||||
"rotation": 0,
|
||||
"rotateFast": false
|
||||
},
|
||||
"reversed": false,
|
||||
"folder": null,
|
||||
"previewStartingState": {
|
||||
"rotation": 0,
|
||||
"velocity": 0
|
||||
},
|
||||
"useDefaultConstraints": true
|
||||
}
|
@ -27,13 +27,13 @@ public class FollowAprilTag extends Command {
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
|
||||
if (enlignement.getv()==1)
|
||||
{
|
||||
lanceur.tourelRotation(0,0, enlignement.getx()/30);
|
||||
}
|
||||
if (lanceur.limitswitch1() || lanceur.limitswitch2()){
|
||||
lanceur.lance(0);}
|
||||
else if (enlignement.getv()==1)
|
||||
{
|
||||
lanceur.tourelRotation(0,0, enlignement.getx()/30);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
lanceur.tourelRotation(0, 0, 0);
|
||||
|
@ -4,13 +4,9 @@
|
||||
|
||||
package frc.robot;
|
||||
|
||||
import com.pathplanner.lib.auto.AutoBuilder;
|
||||
import com.pathplanner.lib.auto.NamedCommands;
|
||||
|
||||
import edu.wpi.first.math.MathUtil;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.Commands;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
@ -24,7 +20,6 @@ import frc.robot.Subsystems.Lanceur;
|
||||
import frc.robot.Subsystems.Limelight3G;
|
||||
|
||||
public class RobotContainer {
|
||||
private final SendableChooser<Command> autoChooser;
|
||||
Lanceur lanceur= new Lanceur();
|
||||
Accumulateur accumulateur = new Accumulateur();
|
||||
Limelight3G limelight3G = new Limelight3G();
|
||||
@ -32,8 +27,6 @@ public class RobotContainer {
|
||||
ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard");
|
||||
CommandXboxController manette = new CommandXboxController(0);
|
||||
public RobotContainer() {
|
||||
NamedCommands.registerCommand("lancer", new Lancer(lanceur, accumulateur));
|
||||
autoChooser = AutoBuilder.buildAutoChooser();
|
||||
dashboard.addCamera("limelight3G", "limelight3G","limelight.local:5800")
|
||||
.withSize(4,3)
|
||||
.withPosition(0,0);
|
||||
@ -54,6 +47,6 @@ public class RobotContainer {
|
||||
}
|
||||
|
||||
public Command getAutonomousCommand() {
|
||||
return autoChooser.getSelected();
|
||||
return Commands.print("No autonomous command configured");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user