-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 29-auto-align-to-tag-using-pathfinding
- Loading branch information
Showing
23 changed files
with
381 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"version": 1.0, | ||
"startingPose": null, | ||
"command": { | ||
"type": "sequential", | ||
"data": { | ||
"commands": [ | ||
{ | ||
"type": "named", | ||
"data": { | ||
"name": "Cand-Sub" | ||
} | ||
}, | ||
{ | ||
"type": "deadline", | ||
"data": { | ||
"commands": [ | ||
{ | ||
"type": "path", | ||
"data": { | ||
"pathName": "Move Forward" | ||
} | ||
}, | ||
{ | ||
"type": "named", | ||
"data": { | ||
"name": "Collect" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "path", | ||
"data": { | ||
"pathName": "Move Back" | ||
} | ||
}, | ||
{ | ||
"type": "named", | ||
"data": { | ||
"name": "Smart-Shoot" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"folder": null, | ||
"choreoAuto": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"version": 1.0, | ||
"waypoints": [ | ||
{ | ||
"anchor": { | ||
"x": 2.65, | ||
"y": 5.539225686154654 | ||
}, | ||
"prevControl": null, | ||
"nextControl": { | ||
"x": 1.6233924503512331, | ||
"y": 5.531608026126181 | ||
}, | ||
"isLocked": false, | ||
"linkedName": "C2" | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 1.334102025955381, | ||
"y": 5.567399971117918 | ||
}, | ||
"prevControl": { | ||
"x": 2.483157024493337, | ||
"y": 5.559782311089444 | ||
}, | ||
"nextControl": null, | ||
"isLocked": false, | ||
"linkedName": "SubwooferMiddle" | ||
} | ||
], | ||
"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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"version": 1.0, | ||
"waypoints": [ | ||
{ | ||
"anchor": { | ||
"x": 1.334102025955381, | ||
"y": 5.567399971117918 | ||
}, | ||
"prevControl": null, | ||
"nextControl": { | ||
"x": 2.334102025955381, | ||
"y": 5.567399971117918 | ||
}, | ||
"isLocked": false, | ||
"linkedName": "SubwooferMiddle" | ||
}, | ||
{ | ||
"anchor": { | ||
"x": 2.65, | ||
"y": 5.539225686154654 | ||
}, | ||
"prevControl": { | ||
"x": 1.65, | ||
"y": 5.539225686154654 | ||
}, | ||
"nextControl": null, | ||
"isLocked": false, | ||
"linkedName": "C2" | ||
} | ||
], | ||
"rotationTargets": [], | ||
"constraintZones": [], | ||
"eventMarkers": [], | ||
"globalConstraints": { | ||
"maxVelocity": 3.0, | ||
"maxAcceleration": 3.0, | ||
"maxAngularVelocity": 540.0, | ||
"maxAngularAcceleration": 720.0 | ||
}, | ||
"goalEndState": { | ||
"velocity": 0.0, | ||
"rotation": 0.0, | ||
"rotateFast": false | ||
}, | ||
"reversed": false, | ||
"folder": null, | ||
"previewStartingState": { | ||
"rotation": 0.0, | ||
"velocity": 0 | ||
}, | ||
"useDefaultConstraints": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) FIRST and other WPILib contributors. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the WPILib BSD license file in the root directory of this project. | ||
|
||
package frc.robot.command; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.Collector; | ||
import frc.robot.Constants.CollectorConstants; | ||
|
||
public class CollectAndGo extends Command { | ||
|
||
private final Collector collector; | ||
|
||
/** Creates a new CollectAndGo. | ||
* @param collector subsystem | ||
*/ | ||
public CollectAndGo(Collector collector) { | ||
this.collector = collector; | ||
addRequirements(collector); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
collector.setPower(CollectorConstants.COLLECTOR_GRABANDGO_POWER); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
collector.setPower(CollectorConstants.COLLECTOR_GRABANDGO_POWER); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
collector.stop(); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return collector.getEntryBeamBreakState(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.