mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Lidar and Auto testing
This commit is contained in:
@@ -4,18 +4,6 @@
|
||||
"type": "sequential",
|
||||
"data": {
|
||||
"commands": [
|
||||
{
|
||||
"type": "path",
|
||||
"data": {
|
||||
"pathName": "Quick Shoot"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"data": {
|
||||
"name": "Robot Shoot"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "named",
|
||||
"data": {
|
||||
|
||||
@@ -40,6 +40,7 @@ import frc4388.robot.subsystems.intake.Intake;
|
||||
import frc4388.robot.subsystems.intake.Intake.IntakeMode;
|
||||
import frc4388.robot.subsystems.shooter.Shooter;
|
||||
import frc4388.robot.subsystems.shooter.ShooterConstants;
|
||||
import frc4388.robot.subsystems.shooter.Shooter.ShooterMode;
|
||||
import frc4388.robot.subsystems.swerve.SwerveDrive;
|
||||
import frc4388.robot.subsystems.vision.Vision;
|
||||
import frc4388.utility.DeferredBlock;
|
||||
@@ -103,24 +104,28 @@ public class RobotContainer {
|
||||
private Command LidarIntake = new SequentialCommandGroup(
|
||||
// Right now this will just go to the closest ball constantly updating - need to make it so it locks on one ball
|
||||
RobotIntakeDown,
|
||||
new WaitCommand(1),
|
||||
new RunCommand(
|
||||
() -> m_robotSwerveDrive.driveWithInputRotation(
|
||||
() -> m_robotSwerveDrive.driveWithInput(
|
||||
m_lidar.getClosestBall(),
|
||||
m_lidar.getLatestBallAngle()
|
||||
new Translation2d(m_lidar.getLatestBallAngle().getCos() * 0.1, 0),
|
||||
false
|
||||
),
|
||||
m_robotSwerveDrive
|
||||
)
|
||||
.withTimeout(10.0)
|
||||
.withTimeout(5.0)
|
||||
.andThen(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive))
|
||||
);
|
||||
|
||||
private Command RobotShoot = new SequentialCommandGroup(
|
||||
new InstantCommand(() -> m_robotIntake.setMode(IntakeMode.Retracted)),
|
||||
new InstantCommand(() -> m_robotShooter.setShooterReady()),
|
||||
new InstantCommand(()->m_robotIntake.setMode(IntakeMode.Idle)),
|
||||
new WaitCommand(5),
|
||||
new WaitCommand(3),
|
||||
new InstantCommand(()->m_robotShooter.setShooterShoot()),
|
||||
new WaitCommand(10),
|
||||
new InstantCommand(()->m_robotShooter.setShooterNOTShoot())
|
||||
new WaitCommand(5),
|
||||
new InstantCommand(()->m_robotShooter.setShooterNOTShoot()),
|
||||
new InstantCommand(() -> m_robotShooter.setShooterNotReady())
|
||||
);
|
||||
|
||||
// private Command RobotShoot = new SequentialCommandGroup(
|
||||
@@ -365,7 +370,7 @@ public class RobotContainer {
|
||||
|
||||
autoChooser.onChange((filename) -> {
|
||||
autoChooserUpdated = true;
|
||||
// if (filename.equals("Taxi")) {
|
||||
// if (filename.equals("Taxi%")) {
|
||||
// autoCommand = new SequentialCommandGroup(
|
||||
// new MoveForTimeCommand(m_robotSwerveDrive,
|
||||
// new Translation2d(0, -1),
|
||||
|
||||
@@ -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 = 79;
|
||||
public static final String GIT_SHA = "ff0cff819cc7280a353d7ce86999efe16661f33b";
|
||||
public static final String GIT_DATE = "2026-02-23 16:58:14 MST";
|
||||
public static final int GIT_REVISION = 86;
|
||||
public static final String GIT_SHA = "b3f3ae444324c4d339e4aa5dc59fe75bd3d56558";
|
||||
public static final String GIT_DATE = "2026-02-23 23:28:25 MST";
|
||||
public static final String GIT_BRANCH = "AutoTesting";
|
||||
public static final String BUILD_DATE = "2026-02-23 17:39:29 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771893569353L;
|
||||
public static final String BUILD_DATE = "2026-02-24 17:44:43 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771980283653L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -40,6 +40,10 @@ public class Intake extends SubsystemBase {
|
||||
return mode;
|
||||
}
|
||||
|
||||
public void rollerStop(){
|
||||
io.setRollerOutput(state, 0);
|
||||
}
|
||||
|
||||
|
||||
// public enum FieldZone {
|
||||
// // The robot should aim at the hub
|
||||
|
||||
Reference in New Issue
Block a user