From 48aa1e6d0503837e5e0022c6ea206cf438fd60aa Mon Sep 17 00:00:00 2001 From: zaneal <102438595+zaneal@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:12:41 -0700 Subject: [PATCH 1/2] Stuff --- .pathplanner/settings.json | 4 +- src/main/deploy/pathplanner/autos/Amp1.auto | 11 +- .../deploy/pathplanner/autos/Center6.auto | 206 ++++++++++++++++++ .../deploy/pathplanner/autos/Source3.auto | 9 +- .../deploy/pathplanner/paths/AmpShoot.path | 4 +- src/main/deploy/pathplanner/paths/Back1.path | 4 +- src/main/deploy/pathplanner/paths/Back2.path | 4 +- src/main/deploy/pathplanner/paths/Back3.path | 4 +- src/main/deploy/pathplanner/paths/Back4.path | 4 +- src/main/deploy/pathplanner/paths/Back5.path | 4 +- .../pathplanner/paths/Front1FromShoot.path | 4 +- .../pathplanner/paths/Front1FromStart.path | 4 +- .../pathplanner/paths/Front2FromShoot.path | 4 +- .../pathplanner/paths/Front2FromStart.path | 4 +- .../pathplanner/paths/Front3FromShoot.path | 4 +- .../pathplanner/paths/Front3FromStart.path | 4 +- .../pathplanner/paths/InitialShootCenter.path | 6 +- .../pathplanner/paths/InitialShootLeft.path | 4 +- .../pathplanner/paths/InitialShootRight.path | 4 +- src/main/java/frc/robot/Robot.java | 24 +- src/main/java/frc/robot/RobotContainer.java | 28 +-- .../frc/robot/commands/AdvancedSpinUp.java | 61 ++++++ .../frc/robot/commands/AutoIntakeOrShoot.java | 59 +++++ .../java/frc/robot/commands/AutoShoot.java | 22 -- .../java/frc/robot/commands/ClimbCommand.java | 14 +- .../frc/robot/commands/SpinUpCommand.java | 63 ++---- .../robot/constants/DrivetrainConstants.java | 5 +- .../robot/subsystems/ClimberSubsystem.java | 10 +- .../frc/robot/subsystems/SwerveSubsystem.java | 22 +- 29 files changed, 428 insertions(+), 172 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/Center6.auto create mode 100644 src/main/java/frc/robot/commands/AdvancedSpinUp.java create mode 100644 src/main/java/frc/robot/commands/AutoIntakeOrShoot.java delete mode 100644 src/main/java/frc/robot/commands/AutoShoot.java diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index 17a8706..a1ee7c4 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -13,8 +13,8 @@ "Amp", "Source" ], - "defaultMaxVel": 6.5, - "defaultMaxAccel": 3.5, + "defaultMaxVel": 6.7, + "defaultMaxAccel": 8.0, "defaultMaxAngVel": 540.0, "defaultMaxAngAccel": 720.0, "maxModuleSpeed": 7.0 diff --git a/src/main/deploy/pathplanner/autos/Amp1.auto b/src/main/deploy/pathplanner/autos/Amp1.auto index ac09ada..df5bb32 100644 --- a/src/main/deploy/pathplanner/autos/Amp1.auto +++ b/src/main/deploy/pathplanner/autos/Amp1.auto @@ -32,16 +32,9 @@ } }, { - "type": "parallel", + "type": "named", "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "AutoShoot" - } - } - ] + "name": "AutoShoot" } } ] diff --git a/src/main/deploy/pathplanner/autos/Center6.auto b/src/main/deploy/pathplanner/autos/Center6.auto new file mode 100644 index 0000000..9f6c1b4 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Center6.auto @@ -0,0 +1,206 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.3741268732537468, + "y": 5.543591073293259 + }, + "rotation": 0.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "AutoSpinUp" + } + }, + { + "type": "sequential", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "InitialShootCenter" + } + }, + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeCommand" + } + }, + { + "type": "path", + "data": { + "pathName": "Front2FromShoot" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "InitialShootCenter" + } + }, + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeCommand" + } + }, + { + "type": "path", + "data": { + "pathName": "Front1FromShoot" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "AmpShoot" + } + }, + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeCommand" + } + }, + { + "type": "path", + "data": { + "pathName": "Front3FromShoot" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "InitialShootRight" + } + }, + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeCommand" + } + }, + { + "type": "path", + "data": { + "pathName": "Back2" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "AmpShoot" + } + }, + { + "type": "named", + "data": { + "name": "AutoShoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "IntakeCommand" + } + }, + { + "type": "path", + "data": { + "pathName": "Back1" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "AmpShoot" + } + }, + { + "type": "named", + "data": { + "name": "AutoShoot" + } + } + ] + } + } + ] + } + } + ] + } + }, + "folder": "Center", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Source3.auto b/src/main/deploy/pathplanner/autos/Source3.auto index b73c70a..113a9fe 100644 --- a/src/main/deploy/pathplanner/autos/Source3.auto +++ b/src/main/deploy/pathplanner/autos/Source3.auto @@ -106,14 +106,7 @@ "data": { "pathName": "InitialShootRight" } - } - ] - } - }, - { - "type": "parallel", - "data": { - "commands": [ + }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/paths/AmpShoot.path b/src/main/deploy/pathplanner/paths/AmpShoot.path index bb7c464..b2d1124 100644 --- a/src/main/deploy/pathplanner/paths/AmpShoot.path +++ b/src/main/deploy/pathplanner/paths/AmpShoot.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Back1.path b/src/main/deploy/pathplanner/paths/Back1.path index caf3612..9f3597a 100644 --- a/src/main/deploy/pathplanner/paths/Back1.path +++ b/src/main/deploy/pathplanner/paths/Back1.path @@ -32,8 +32,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Back2.path b/src/main/deploy/pathplanner/paths/Back2.path index b87b20e..acd5952 100644 --- a/src/main/deploy/pathplanner/paths/Back2.path +++ b/src/main/deploy/pathplanner/paths/Back2.path @@ -32,8 +32,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Back3.path b/src/main/deploy/pathplanner/paths/Back3.path index 44ccbd1..f0d0104 100644 --- a/src/main/deploy/pathplanner/paths/Back3.path +++ b/src/main/deploy/pathplanner/paths/Back3.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Back4.path b/src/main/deploy/pathplanner/paths/Back4.path index 9ddbb74..5b24c4b 100644 --- a/src/main/deploy/pathplanner/paths/Back4.path +++ b/src/main/deploy/pathplanner/paths/Back4.path @@ -32,8 +32,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Back5.path b/src/main/deploy/pathplanner/paths/Back5.path index f8e361b..21315b4 100644 --- a/src/main/deploy/pathplanner/paths/Back5.path +++ b/src/main/deploy/pathplanner/paths/Back5.path @@ -32,8 +32,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Front1FromShoot.path b/src/main/deploy/pathplanner/paths/Front1FromShoot.path index d24a33f..f0344ab 100644 --- a/src/main/deploy/pathplanner/paths/Front1FromShoot.path +++ b/src/main/deploy/pathplanner/paths/Front1FromShoot.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Front1FromStart.path b/src/main/deploy/pathplanner/paths/Front1FromStart.path index 8bdee3e..1661f3c 100644 --- a/src/main/deploy/pathplanner/paths/Front1FromStart.path +++ b/src/main/deploy/pathplanner/paths/Front1FromStart.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Front2FromShoot.path b/src/main/deploy/pathplanner/paths/Front2FromShoot.path index 00303c1..aae0cc6 100644 --- a/src/main/deploy/pathplanner/paths/Front2FromShoot.path +++ b/src/main/deploy/pathplanner/paths/Front2FromShoot.path @@ -32,8 +32,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Front2FromStart.path b/src/main/deploy/pathplanner/paths/Front2FromStart.path index dd9c916..337d4c9 100644 --- a/src/main/deploy/pathplanner/paths/Front2FromStart.path +++ b/src/main/deploy/pathplanner/paths/Front2FromStart.path @@ -32,8 +32,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Front3FromShoot.path b/src/main/deploy/pathplanner/paths/Front3FromShoot.path index 6790398..4f525d5 100644 --- a/src/main/deploy/pathplanner/paths/Front3FromShoot.path +++ b/src/main/deploy/pathplanner/paths/Front3FromShoot.path @@ -48,8 +48,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/Front3FromStart.path b/src/main/deploy/pathplanner/paths/Front3FromStart.path index ec64360..da6a5e8 100644 --- a/src/main/deploy/pathplanner/paths/Front3FromStart.path +++ b/src/main/deploy/pathplanner/paths/Front3FromStart.path @@ -48,8 +48,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/InitialShootCenter.path b/src/main/deploy/pathplanner/paths/InitialShootCenter.path index 94708b5..98e8327 100644 --- a/src/main/deploy/pathplanner/paths/InitialShootCenter.path +++ b/src/main/deploy/pathplanner/paths/InitialShootCenter.path @@ -32,13 +32,13 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, "goalEndState": { - "velocity": 0, + "velocity": 0.01, "rotation": 2.2475670487303203, "rotateFast": false }, diff --git a/src/main/deploy/pathplanner/paths/InitialShootLeft.path b/src/main/deploy/pathplanner/paths/InitialShootLeft.path index b5a0cd7..fb2a976 100644 --- a/src/main/deploy/pathplanner/paths/InitialShootLeft.path +++ b/src/main/deploy/pathplanner/paths/InitialShootLeft.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/InitialShootRight.path b/src/main/deploy/pathplanner/paths/InitialShootRight.path index 861b035..6f72000 100644 --- a/src/main/deploy/pathplanner/paths/InitialShootRight.path +++ b/src/main/deploy/pathplanner/paths/InitialShootRight.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 6.5, - "maxAcceleration": 3.5, + "maxVelocity": 6.7, + "maxAcceleration": 8.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 60f39f6..0cad998 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -4,9 +4,14 @@ package frc.robot; +import com.ctre.phoenix6.mechanisms.swerve.SwerveDrivetrain; +import com.revrobotics.CANSparkBase; +import com.revrobotics.CANSparkFlex; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; +import edu.wpi.first.wpilibj2.command.SwerveControllerCommand; +import frc.robot.controllers.SwerveModuleControlller; /** * The VM is configured to automatically run this class, and to call the functions corresponding to @@ -29,6 +34,9 @@ public void robotInit() { // Instantiate our RobotContainer. This will perform all our button bindings, and put our // autonomous chooser on the dashboard. m_robotContainer = new RobotContainer(); + + //TEST!!!! + } /** @@ -45,12 +53,19 @@ public void robotPeriodic() { // and running subsystem periodic() methods. This must be called from the robot's periodic // block in order for anything in the Command-based framework to work. CommandScheduler.getInstance().run(); + } /** This function is called once each time the robot enters Disabled mode. */ @Override public void disabledInit() { - // m_robotContainer.swerveSubsystem.setX(); + +// try { +// Thread.sleep(200); +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); +// } + } @Override @@ -59,12 +74,14 @@ public void disabledPeriodic() {} /** This autonomous runs the autonomous command selected by your {@link RobotContainer} class. */ @Override public void autonomousInit() { + m_autonomousCommand = m_robotContainer.getAutonomousCommand(); // schedule the autonomous command (example) if (m_autonomousCommand != null) { m_autonomousCommand.schedule(); } + } /** This function is called periodically during autonomous. */ @@ -80,11 +97,14 @@ public void teleopInit() { if (m_autonomousCommand != null) { m_autonomousCommand.cancel(); } + } /** This function is called periodically during operator control. */ @Override - public void teleopPeriodic() {} + public void teleopPeriodic() { + + } @Override public void testInit() { diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 594aefd..6423b46 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -6,15 +6,11 @@ import com.pathplanner.lib.auto.AutoBuilder; import com.pathplanner.lib.auto.NamedCommands; -import edu.wpi.first.math.geometry.Pose2d; -import edu.wpi.first.math.geometry.Rotation2d; -import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; -import edu.wpi.first.wpilibj2.command.InstantCommand; import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.button.JoystickButton; @@ -24,7 +20,6 @@ import frc.robot.commands.*; import frc.robot.commands.IntakeCommand; import frc.robot.subsystems.IntakeSubsystem; -import frc.robot.constants.*; /** @@ -48,32 +43,25 @@ public class RobotContainer { public ShooterSubsystem shooterSubsystem = new ShooterSubsystem(); public IntakeSubsystem intakeSubsystem = new IntakeSubsystem(); -// private boolean isRed = DriverStation.getAlliance().get().equals(DriverStation.Alliance.Red); - /** The container for the robot. Contains subsystems, OI devices, and commands. */ public RobotContainer() { // Configure the button bindings - //configureButtonBindings(); -// indexerSubsystem = new IndexerSubsystem(); -// shooterSubsystem = new ShooterSubsystem(); -// intakeSubsystem = new IntakeSubsystem(); //FOR ALL: tune timeouts - NamedCommands.registerCommand("AutoSpinUp", new SpinUpCommand(shooterSubsystem, indexerSubsystem, false).withTimeout(15.0)); - NamedCommands.registerCommand("AutoSpinForShoot", new SpinUpCommand(shooterSubsystem, indexerSubsystem, false).withTimeout(1.5)); - - NamedCommands.registerCommand("IntakeCommand", new IntakeCommand(intakeSubsystem, indexerSubsystem, IntakeCommand.Targets.SPEAKER, false).withTimeout(1.5)); - - NamedCommands.registerCommand("AutoShoot", new AutoShoot(indexerSubsystem).withTimeout(1.5)); - + NamedCommands.registerCommand("AutoSpinUp", new SpinUpCommand(shooterSubsystem).withTimeout(15.0)); + NamedCommands.registerCommand("IntakeCommand", new AutoIntakeOrShoot(indexerSubsystem, intakeSubsystem, AutoIntakeOrShoot.Goal.INTAKE).withTimeout(1.5)); + NamedCommands.registerCommand("AutoSpinForShoot", new SpinUpCommand(shooterSubsystem).withTimeout(1.5)); + NamedCommands.registerCommand("AutoShoot", new AutoIntakeOrShoot(indexerSubsystem, intakeSubsystem, AutoIntakeOrShoot.Goal.SHOOT).withTimeout(1.5)); +// superSecretMissileTech = AutoBuilder.buildAutoChooser(); SmartDashboard.putData("Auto Chooser", superSecretMissileTech); + // Configure the button bindings configureButtonBindings(); } @@ -82,7 +70,7 @@ public void configureButtonBindings() { //DEFAULT COMMANDS //Test!!: -// shooterSubsystem.setDefaultCommand(new SpinUpCommand(shooterSubsystem, indexerSubsystem, true)); + shooterSubsystem.setDefaultCommand(new AdvancedSpinUp(shooterSubsystem, indexerSubsystem)); // PRIMARY CONTROLLER @@ -178,7 +166,7 @@ public void configureButtonBindings() { new JoystickButton(secondaryController, XboxController.Button.kRightBumper.value).whileTrue( - new SpinUpCommand(shooterSubsystem, indexerSubsystem, false) + new SpinUpCommand(shooterSubsystem) ); new JoystickButton(secondaryController, XboxController.Button.kLeftBumper.value).whileTrue( diff --git a/src/main/java/frc/robot/commands/AdvancedSpinUp.java b/src/main/java/frc/robot/commands/AdvancedSpinUp.java new file mode 100644 index 0000000..e413c6a --- /dev/null +++ b/src/main/java/frc/robot/commands/AdvancedSpinUp.java @@ -0,0 +1,61 @@ +package frc.robot.commands; + +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.wpilibj2.command.Command; +import frc.robot.constants.ShooterConstants; +import frc.robot.subsystems.IndexerSubsystem; +import frc.robot.subsystems.ShooterSubsystem; + +public class AdvancedSpinUp extends Command { + private final ShooterSubsystem shooterSubsystem; + private final IndexerSubsystem indexerSubsystem; + + private Pose2d robotPose; + + + /** + * Spins up the shooter if we are close to the speaker + * + * @param shooterSubsystem Instance of the {@link ShooterSubsystem} + * @param indexerSubsystem + */ + public AdvancedSpinUp(ShooterSubsystem shooterSubsystem, IndexerSubsystem indexerSubsystem) { + this.shooterSubsystem = shooterSubsystem; + this.indexerSubsystem = indexerSubsystem; + this.robotPose = robotPose; + + addRequirements(shooterSubsystem, indexerSubsystem); + } + + @Override + public void execute() { + if (robotPose.getX() < 9) { + if (indexerSubsystem.isCenter()) { + shooterSubsystem.setSpeed(ShooterConstants.shooterRPM); + } else if (!indexerSubsystem.isCenter()) { + try { + Thread.sleep(3005); + } catch (InterruptedException e) { + e.printStackTrace(); + } + if (!indexerSubsystem.isCenter()) { + shooterSubsystem.setVoltage(0,0); + } + + } + } else { + shooterSubsystem.setVoltage(0,0); + } + } + + @Override + public void initialize() { + ShooterConstants.isActive = true; + } + + @Override + public void end(boolean interrupted) { + ShooterConstants.isActive = false; + shooterSubsystem.setVoltage(0); + } +} diff --git a/src/main/java/frc/robot/commands/AutoIntakeOrShoot.java b/src/main/java/frc/robot/commands/AutoIntakeOrShoot.java new file mode 100644 index 0000000..fd36f7d --- /dev/null +++ b/src/main/java/frc/robot/commands/AutoIntakeOrShoot.java @@ -0,0 +1,59 @@ +package frc.robot.commands; + +import edu.wpi.first.wpilibj2.command.Command; +import frc.robot.subsystems.IndexerSubsystem; +import frc.robot.subsystems.IntakeSubsystem; + +public class AutoIntakeOrShoot extends Command { + public IndexerSubsystem indexerSubsystem; + public IntakeSubsystem intakeSubsystem; + + private final Goal goal; + + + public AutoIntakeOrShoot(IndexerSubsystem indexerSubsystem, IntakeSubsystem intakeSubsystem, Goal goal) { + this.intakeSubsystem = intakeSubsystem; + this.indexerSubsystem = indexerSubsystem; + this.goal = goal; + addRequirements(indexerSubsystem, intakeSubsystem); + } + + @Override + public void execute() { + switch (goal) { + case INTAKE -> { + if (!indexerSubsystem.isCenter()) { + intakeSubsystem.setTopSpeed(0.5); + intakeSubsystem.setBottomSpeed(0.5); + indexerSubsystem.rotateAllWheelsPercent(0.3); + } else if (indexerSubsystem.isCenter()) { + // intakeSubsystem.setSpeed(0); + try { + Thread.sleep(105); + } catch (InterruptedException e) { + e.printStackTrace(); + } + if (indexerSubsystem.isCenter()) { + indexerSubsystem.rotateAllWheelsPercent(0); + intakeSubsystem.setSpeed(0.0); + } + + } + } + case SHOOT -> { + indexerSubsystem.rotateAllWheelsPercent(1.0); + + } + } + } + + @Override + public void end(boolean interrupted) { + intakeSubsystem.setSpeed(0); + indexerSubsystem.rotateAllWheelsPercent(0); + } + public enum Goal { + INTAKE, + SHOOT + } +} diff --git a/src/main/java/frc/robot/commands/AutoShoot.java b/src/main/java/frc/robot/commands/AutoShoot.java deleted file mode 100644 index c0bf4ce..0000000 --- a/src/main/java/frc/robot/commands/AutoShoot.java +++ /dev/null @@ -1,22 +0,0 @@ -package frc.robot.commands; - -import edu.wpi.first.wpilibj2.command.Command; -import frc.robot.subsystems.IndexerSubsystem; - -public class AutoShoot extends Command { - public IndexerSubsystem indexerSubsystem; - - public AutoShoot(IndexerSubsystem indexerSubsystem) { - addRequirements(indexerSubsystem); - } - - @Override - public void execute() { - indexerSubsystem.rotateAllWheelsPercent(1.0); - } - - @Override - public void end(boolean interrupted) { - indexerSubsystem.rotateAllWheelsVolts(0.0); - } -} diff --git a/src/main/java/frc/robot/commands/ClimbCommand.java b/src/main/java/frc/robot/commands/ClimbCommand.java index d8358e0..b575641 100644 --- a/src/main/java/frc/robot/commands/ClimbCommand.java +++ b/src/main/java/frc/robot/commands/ClimbCommand.java @@ -15,13 +15,13 @@ public class ClimbCommand extends Command { private RelativeEncoder rightEncoder; - private Mode mode; + private Climb climb; private boolean isIndexer; - public ClimbCommand(ClimberSubsystem climberSubsystem, Mode mode) { + public ClimbCommand(ClimberSubsystem climberSubsystem, Climb climb) { this.climberSubsystem = climberSubsystem; - this.mode = mode; + this.climb = climb; this.leftEncoder = climberSubsystem.getLeftEncoder(); this.rightEncoder = climberSubsystem.getRightEncoder(); @@ -30,10 +30,10 @@ public ClimbCommand(ClimberSubsystem climberSubsystem, Mode mode) { addRequirements(climberSubsystem); } - public ClimbCommand(IndexerSubsystem indexerSubsystem, Mode mode) { + public ClimbCommand(IndexerSubsystem indexerSubsystem, Climb climb) { this.indexerSubsystem = indexerSubsystem; - this.mode = mode; + this.climb = climb; this.isIndexer = false; addRequirements(indexerSubsystem); @@ -41,7 +41,7 @@ public ClimbCommand(IndexerSubsystem indexerSubsystem, Mode mode) { @Override public void execute() { - switch (mode) { + switch (climb) { case EXTEND -> { if (isIndexer) { indexerSubsystem.moveIndexerToPos(90); @@ -74,7 +74,7 @@ public void execute() { } } - public enum Mode { + public enum Climb { EXTEND, RETRACT } diff --git a/src/main/java/frc/robot/commands/SpinUpCommand.java b/src/main/java/frc/robot/commands/SpinUpCommand.java index 7f95ab2..f4c5f97 100644 --- a/src/main/java/frc/robot/commands/SpinUpCommand.java +++ b/src/main/java/frc/robot/commands/SpinUpCommand.java @@ -3,70 +3,45 @@ import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.constants.ShooterConstants; -import frc.robot.subsystems.IndexerSubsystem; import frc.robot.subsystems.ShooterSubsystem; public class SpinUpCommand extends Command { private final ShooterSubsystem shooterSubsystem; - private final IndexerSubsystem indexerSubsystem; - private final boolean advanced; private Pose2d robotPose; /** * Command to spin up the shooter, simply just spins the motors to shooterRPM (defined in {@link ShooterConstants}) * @param shooterSubsystem Instance of {@link ShooterSubsystem} - * @param indexerSubsystem Instance of {@link IndexerSubsystem} */ - public SpinUpCommand(ShooterSubsystem shooterSubsystem, IndexerSubsystem indexerSubsystem, boolean advanced) { + public SpinUpCommand(ShooterSubsystem shooterSubsystem) { this.shooterSubsystem = shooterSubsystem; - this.indexerSubsystem = indexerSubsystem; - this.advanced = advanced; - - addRequirements(shooterSubsystem, indexerSubsystem); - } - /** - * Spins up the shooter if we are close to the speaker - * - * @param shooterSubsystem Instance of the {@link ShooterSubsystem} - * @param indexerSubsystem - * @param robotPose Pose2d of the robots current position - */ - public SpinUpCommand(ShooterSubsystem shooterSubsystem, IndexerSubsystem indexerSubsystem, Pose2d robotPose) { - this.shooterSubsystem = shooterSubsystem; - this.indexerSubsystem = indexerSubsystem; - this.robotPose = robotPose; - this.advanced = true; - addRequirements(shooterSubsystem); } + +// /** +// * Spins up the shooter if we are close to the speaker +// * +// * @param shooterSubsystem Instance of the {@link ShooterSubsystem} +// * @param indexerSubsystem +// * @param robotPose Pose2d of the robots current position +// */ +// public SpinUpCommand(ShooterSubsystem shooterSubsystem, IndexerSubsystem indexerSubsystem, Pose2d robotPose) { +// this.shooterSubsystem = shooterSubsystem; +// this.indexerSubsystem = indexerSubsystem; +// this.robotPose = robotPose; +// this.advanced = true; +// +// addRequirements(shooterSubsystem); +// } + @Override public void execute() { - if (advanced) { - if (robotPose.getX() < 9) { - if (indexerSubsystem.isCenter()) { - shooterSubsystem.setSpeed(ShooterConstants.shooterRPM); - } else if (!indexerSubsystem.isCenter()) { - try { - Thread.sleep(3005); - } catch (InterruptedException e) { - e.printStackTrace(); - } - if (!indexerSubsystem.isCenter()) { - shooterSubsystem.setVoltage(0,0); - } - - } - } else { - shooterSubsystem.setVoltage(0,0); - } - } else { - shooterSubsystem.setSpeed(ShooterConstants.shooterRPM); - } + shooterSubsystem.setSpeed(ShooterConstants.shooterRPM); } @Override diff --git a/src/main/java/frc/robot/constants/DrivetrainConstants.java b/src/main/java/frc/robot/constants/DrivetrainConstants.java index 6e3c2a4..f5b425c 100644 --- a/src/main/java/frc/robot/constants/DrivetrainConstants.java +++ b/src/main/java/frc/robot/constants/DrivetrainConstants.java @@ -1,13 +1,14 @@ package frc.robot.constants; import com.revrobotics.CANSparkMax; +import com.revrobotics.CANSparkFlex; import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.math.kinematics.SwerveDriveKinematics; import edu.wpi.first.math.util.Units; public class DrivetrainConstants { - public static final double maxSpeedMetersPerSecond = 1.5; //note, maybe it needs to come down, if its too high it will stop working or something, troubleshoot from coronado + public static final double maxSpeedMetersPerSecond = 7.0; //note, maybe it needs to come down, if its too high it will stop working or something, troubleshoot from coronado public static final double maxAngularSpeed = Math.PI; public static final double directionSlewRate = 3.0; // rads/sec - turning was 4.0 @@ -80,7 +81,7 @@ public class DrivetrainConstants { public static final double turningMinOutput = -1.0; public static final double turningMaxOutput = 1.0; - public static final CANSparkMax.IdleMode drivingMotorIdleMode = CANSparkMax.IdleMode.kCoast; + public static final CANSparkFlex.IdleMode drivingMotorIdleMode = CANSparkFlex.IdleMode.kCoast; public static final CANSparkMax.IdleMode turningMotorIdleMode = CANSparkMax.IdleMode.kBrake; public static final int drivingMotorCurrentLimit = 40; diff --git a/src/main/java/frc/robot/subsystems/ClimberSubsystem.java b/src/main/java/frc/robot/subsystems/ClimberSubsystem.java index 70c2e4e..b3e1ea3 100644 --- a/src/main/java/frc/robot/subsystems/ClimberSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ClimberSubsystem.java @@ -13,7 +13,7 @@ public class ClimberSubsystem extends SubsystemBase { private final CANSparkMax leftSide = new CANSparkMax(ClimberConstants.leftSideID, CANSparkLowLevel.MotorType.kBrushless); - private CANSparkMax rightSide = new CANSparkMax(ClimberConstants.leftSideID, CANSparkLowLevel.MotorType.kBrushless); + private CANSparkMax rightSide = new CANSparkMax(ClimberConstants.rightSideID, CANSparkLowLevel.MotorType.kBrushless); private final RelativeEncoder leftSideEncoder = leftSide.getEncoder(); private final RelativeEncoder rightSideEncoder = rightSide.getEncoder(); @@ -29,7 +29,7 @@ public RelativeEncoder getRightEncoder() { * Extends the climber */ public void extend() { - //rightSide.set(0.1); + rightSide.set(0.1); leftSide.set(0.1); } @@ -37,7 +37,7 @@ public void extend() { * Retracts the climber back down */ public void retract() { - //rightSide.set(-0.1); + rightSide.set(-0.1); leftSide.set(-0.1); } @@ -47,9 +47,9 @@ public void retract() { */ public void hold() { leftSide.set(0.0); - //rightSide.set(0.0); + rightSide.set(0.0); leftSide.setIdleMode(CANSparkBase.IdleMode.kBrake); - //rightSide.setIdleMode(CANSparkBase.IdleMode.kBrake); + rightSide.setIdleMode(CANSparkBase.IdleMode.kBrake); } } \ No newline at end of file diff --git a/src/main/java/frc/robot/subsystems/SwerveSubsystem.java b/src/main/java/frc/robot/subsystems/SwerveSubsystem.java index 4310643..6111fab 100644 --- a/src/main/java/frc/robot/subsystems/SwerveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/SwerveSubsystem.java @@ -141,7 +141,7 @@ public class SwerveSubsystem extends SubsystemBase { .getTable("Swerve").getDoubleTopic("rlpos").getEntry(rearLeft.getPosition().angle.getRadians()); /** - * This subsystems manages all of the swerve drive logic and also give data to odometry + * This subsystems manages all of the swerve drive logic and also gives data to odometry */ public SwerveSubsystem() { // PathPlanner stuff @@ -153,7 +153,7 @@ public SwerveSubsystem() { new HolonomicPathFollowerConfig( new PIDConstants(1.0, 0.0, 0.0), new PIDConstants(1.0, 0.0, 0.0), - 1.5, //swervesubsystem.setmodulestate + 6.7, //swervesubsystem.setmodulestate 0.301625,//11.875 meters new ReplanningConfig() ), @@ -267,17 +267,6 @@ public void periodic() { public Pose2d getPose() { return poseEstimator.getEstimatedPosition(); } -//make if statement if blue, keep pose the same, if red, make pose negative x negative y - - public Pose2d getPathplannerPose() { - if (DriverStation.getAlliance().get() == DriverStation.Alliance.Red) { - double newX = poseEstimator.getEstimatedPosition().getX(); - double newY = 16.59128 - poseEstimator.getEstimatedPosition().getY(); - Rotation2d newRot = poseEstimator.getEstimatedPosition().getRotation(); - - return new Pose2d(newX, newY, newRot); - } else { return poseEstimator.getEstimatedPosition(); } - } /** * Get current heading of robot * @return Heading of robot in radians @@ -299,19 +288,12 @@ public SwerveDrivePoseEstimator getPoseEstimator() { * @param chassisSpeeds {@link ChassisSpeeds} object */ public void driveRobotRelative(ChassisSpeeds chassisSpeeds) { - if (DriverStation.getAlliance().get() == DriverStation.Alliance.Red) { double forward = -chassisSpeeds.vxMetersPerSecond; double sideways = -chassisSpeeds.vyMetersPerSecond; double rotation = chassisSpeeds.omegaRadiansPerSecond; drive(-forward, -sideways, rotation, false, true); - } else { - double forward = -chassisSpeeds.vxMetersPerSecond; - double sideways = -chassisSpeeds.vyMetersPerSecond; - double rotation = chassisSpeeds.omegaRadiansPerSecond; - drive(-forward, -sideways, rotation, false, true); - } } /** From 9b98a96280c71ef55f028327a72f7952c667589e Mon Sep 17 00:00:00 2001 From: zaneal <102438595+zaneal@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:13:26 -0700 Subject: [PATCH 2/2] Stuff --- src/main/deploy/pathplanner/navgrid.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/deploy/pathplanner/navgrid.json b/src/main/deploy/pathplanner/navgrid.json index 6082c32..40d11fb 100644 --- a/src/main/deploy/pathplanner/navgrid.json +++ b/src/main/deploy/pathplanner/navgrid.json @@ -1 +1 @@ -{"field_size":{"x":16.54,"y":8.21},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true],[true,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file +{"field_size":{"x":16.54,"y":8.21},"nodeSizeMeters":0.3,"grid":[[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true],[true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]]} \ No newline at end of file