mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Autos
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"version": "2025.0",
|
||||
"command": {
|
||||
"type": "sequential",
|
||||
"data": {
|
||||
"commands": [
|
||||
{
|
||||
"type": "named",
|
||||
"data": {
|
||||
"name": "Robot Intake Down"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"data": {
|
||||
"pathName": "Quick Shoot"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"data": {
|
||||
"name": "Robot Shoot"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resetOdom": true,
|
||||
"folder": null,
|
||||
"choreoAuto": false
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"version": "2025.0",
|
||||
"waypoints": [
|
||||
{
|
||||
"anchor": {
|
||||
"x": 3.48951566951567,
|
||||
"y": 5.107378917378918
|
||||
},
|
||||
"prevControl": null,
|
||||
"nextControl": {
|
||||
"x": 2.908105413105413,
|
||||
"y": 6.205598290598291
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 1.616082621082621,
|
||||
"y": 5.107378917378918
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 0.44392059766331804,
|
||||
"y": 6.342550994319343
|
||||
},
|
||||
"nextControl": {
|
||||
"x": 2.234130952380953,
|
||||
"y": 4.456107142857142
|
||||
},
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
},
|
||||
{
|
||||
"anchor": {
|
||||
"x": 2.8064047619047625,
|
||||
"y": 3.8622380952380952
|
||||
},
|
||||
"prevControl": {
|
||||
"x": 2.8172023809523816,
|
||||
"y": 4.132178571428572
|
||||
},
|
||||
"nextControl": null,
|
||||
"isLocked": false,
|
||||
"linkedName": null
|
||||
}
|
||||
],
|
||||
"rotationTargets": [],
|
||||
"constraintZones": [],
|
||||
"pointTowardsZones": [
|
||||
{
|
||||
"fieldPosition": {
|
||||
"x": 4.612,
|
||||
"y": 4.0213534
|
||||
},
|
||||
"rotationOffset": 0.0,
|
||||
"minWaypointRelativePos": 0.9140287769784197,
|
||||
"maxWaypointRelativePos": 2,
|
||||
"name": "Point Towards Zone"
|
||||
}
|
||||
],
|
||||
"eventMarkers": [],
|
||||
"globalConstraints": {
|
||||
"maxVelocity": 0.5,
|
||||
"maxAcceleration": 3.0,
|
||||
"maxAngularVelocity": 540.0,
|
||||
"maxAngularAcceleration": 720.0,
|
||||
"nominalVoltage": 12.0,
|
||||
"unlimited": false
|
||||
},
|
||||
"goalEndState": {
|
||||
"velocity": 0,
|
||||
"rotation": -1.591140271194531
|
||||
},
|
||||
"reversed": false,
|
||||
"folder": null,
|
||||
"idealStartingState": {
|
||||
"velocity": 0,
|
||||
"rotation": 178.40885972880554
|
||||
},
|
||||
"useDefaultConstraints": false
|
||||
}
|
||||
@@ -9,6 +9,7 @@ package frc4388.robot;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.pathplanner.lib.auto.NamedCommands;
|
||||
import com.pathplanner.lib.commands.PathPlannerAuto;
|
||||
import com.pathplanner.lib.trajectory.PathPlannerTrajectory;
|
||||
|
||||
@@ -25,6 +26,7 @@ import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import edu.wpi.first.wpilibj2.command.WaitCommand;
|
||||
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||
import edu.wpi.first.wpilibj2.command.button.Trigger;
|
||||
import frc4388.robot.commands.MoveForTimeCommand;
|
||||
@@ -91,6 +93,20 @@ public class RobotContainer {
|
||||
private SendableChooser<String> autoChooser;
|
||||
private Command autoCommand;
|
||||
|
||||
|
||||
private Command RobotIntakeDown = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Extended))
|
||||
);
|
||||
|
||||
private Command RobotShoot = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotShooter.setShooterReady()),
|
||||
new InstantCommand(()->m_robotIntake.setMode(IntakeMode.Idle)),
|
||||
new WaitCommand(5),
|
||||
new InstantCommand(()->m_robotShooter.setShooterShoot()),
|
||||
new WaitCommand(10),
|
||||
new InstantCommand(()->m_robotShooter.setShooterNOTShoot())
|
||||
);
|
||||
|
||||
// private Command RobotShoot = new SequentialCommandGroup(
|
||||
// new InstantCommand(() -> System.out.println(m_robotLED.getMode())),
|
||||
// new InstantCommand(() -> m_robotLED.setMode(LEDPatterns.PARTY_TWINKLES), m_robotLED),
|
||||
@@ -126,6 +142,9 @@ public class RobotContainer {
|
||||
m_robotShooter.io.updateGains();
|
||||
}, true);
|
||||
|
||||
NamedCommands.registerCommand("Robot Shoot", RobotShoot);
|
||||
NamedCommands.registerCommand("Robot Intake Down", RobotIntakeDown);
|
||||
|
||||
|
||||
DriverStation.silenceJoystickConnectionWarning(true);
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 72;
|
||||
public static final String GIT_SHA = "9c7159ba3b2fd669f9781f1315cb481b7a1b8d57";
|
||||
public static final String GIT_DATE = "2026-02-20 21:59:06 MST";
|
||||
public static final int GIT_REVISION = 75;
|
||||
public static final String GIT_SHA = "4907e0c8a0fc7dade91b2075d70a2b38213f9cab";
|
||||
public static final String GIT_DATE = "2026-02-21 15:08:32 MST";
|
||||
public static final String GIT_BRANCH = "operator-controls";
|
||||
public static final String BUILD_DATE = "2026-02-21 13:54:02 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771707242280L;
|
||||
public static final String BUILD_DATE = "2026-02-21 15:52:02 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771714322479L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -99,13 +99,14 @@ public final class Constants {
|
||||
public static final class LEDConstants {
|
||||
public static final int LED_SPARK_ID = 9;
|
||||
|
||||
public static final LEDPatterns DEFAULT_PATTERN = LEDPatterns.FOREST_TWINKLES;
|
||||
public static final LEDPatterns DEFAULT_PATTERN = LEDPatterns.FOREST_RAINBOW;
|
||||
|
||||
// LED color for when the intake is out
|
||||
public static final LEDPatterns INTAKE_OUT = LEDPatterns.SOLID_RED;
|
||||
// LED color for when the intake is out, but the driver conditions are bad
|
||||
public static final LEDPatterns INTAKE_OUT_BADPHYS = LEDPatterns.RED_STROBE;
|
||||
|
||||
|
||||
// LED color for when the flywheel speed isn't in tolarance
|
||||
public static final LEDPatterns BAD_FLYWEEL = LEDPatterns.SOLID_GOLD;
|
||||
// LED color for when the flywheel speed isn't in tolarance, but the driver conditions are bad
|
||||
|
||||
@@ -36,7 +36,7 @@ public class LED extends SubsystemBase implements Queryable {
|
||||
m_pwm.setPeriodMultiplier(PWM.PeriodMultiplier.k1X);
|
||||
m_pwm.setSpeed(0.0);
|
||||
m_pwm.setZeroLatch();
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
private LEDPatterns mode = LEDConstants.DEFAULT_PATTERN;
|
||||
|
||||
@@ -158,7 +158,10 @@ public class Shooter extends SubsystemBase {
|
||||
ShooterMode.Ready
|
||||
);
|
||||
|
||||
}
|
||||
} else {
|
||||
m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user