Skip to content

hammerhead226/2018RobotCode

Repository files navigation

2018RobotCode

Code for team 226's Power Up robot.

Controls

Drivetrain

  • ArcadeDrive: Left joystick Y on driver for throttle, right joystick X for turn
  • ShiftDriveTrainHigh: LS button on driver controller
  • ShiftDriveTrainLow: RS button on driver controller
  • CompressorOn: Y button on driver controller
  • CompressorOff: B button on driver controller
  • DriveArm: RB button on driver controller

Intake

  • DriveIntake: Triggers on manip controller
  • ShiftIntake: RB button on manip controller
  • Intake: RS button on manip controller
  • ShootOuttake: B button on manip controller
  • Shoot: START button on manip controller

Arm

  • ControlArm: Left joystick Y on manip
  • HardZeroArmEncoder: SELECT button on manip controller
  • SetpointHigh: Y button on manip controller
  • SetpointSwitch: X button on manip controller
  • SetpointGround: A button on manip controller

Auton recording controls

  • ToggleAutonRecoding: START button on driver controller
  • ExecuteMacro: SELECT button on driver controller

Dependencies

SharkMacro

  1. Download latest release of SharkMacro from here.
  2. Copy the downloaded .jar file to C:\Users\<YourUser>\wpilib\user\java\lib.
  3. Right click on 2018RobotCode in Eclipse > Build Path > Add External Archives...
  4. Select the jar file you copied to the userlib directory.
  5. Download Apache Commons Lang from here.
  6. Download OpenCSV from here.
  7. Repeat steps 2-4 with commons-lang3-3.7.jar and opencsv-4.1.jar

HammerheadLib

  1. Download latest release of HammerheadLib from here.
  2. Copy the downloaded .jar file to C:\Users\<YourUser>\wpilib\user\java\lib.
  3. Right click on 2018RobotCode in Eclipse > Build Path > Add External Archives...
  4. Select the Hammerhead jar file you copied to the userlib directory.

Development Software

JDK and Eclipse

  1. Install the latest Java SE Development Kit (Windows x64).
  2. Install the latest Eclipse IDE for Java Develoeprs (64 bit).
  3. Follow the 2018 FRC Control System Eclipse setup instructions for Java only.
    • The code deployment error roboRIO Image does not match plugin, allowed image version: ## means you need to update your Eclipse plugins.
    • Numerous (class) cannot be resolved to a type errors may indicate a bad project build path, you should re-create the project.
  4. Install the latest CTRE Phoenix Framework (for the Talon SRX motor controller).
  5. Install the latest Kauai Labs Libraries (for the navX-MXP gyro/accelerometer).

Installing National Instruments Software (FRC Driver Station)

  1. Uninstall all existing National Instruments products form the "National Instruments Software" installer.
  2. Create a National Instruments account.
  3. Install the FRC 2018 Update Suite (you can skip the LabVIEW product) using the serial number from your most recent kit of parts. Activate the software when prompted.
  4. Run "NI Update Service" (manual download) and install all critical updates, but no patches.
  5. Open FRC Driver Station and set your team number on the Setup tab.

Importing the Eclipse Project

  1. Switch your workspace to the cloned folder (where this README is).
  2. Import the Java project into the workspace.
  3. Troubleshooting:
    • Unable to find a javac compiler / com.sun.tools.javac.Main is not on the classpath - JDK needs to be configured in the global build path (above WPILib instructions).
    • Property 'team-number' doesn't exist in this project - follow the instructions in the error message.
    • The import java.* cannot be resolved - "JRE System Library" needs to be added to the project's build path libraries.

Additional

Updating the roboRIO

  1. Follow the Imaging your roboRIO guide.
  2. Follow the Installing Java 8 on the roboRIO using the FRC roboRIO Java Installer guide.
  3. Follow the Installing Phoenix Framework onto your FRC robot guide.

Configuring the Robot Radio

  • OpenMesh OM5P-AC / OM5P-AN (2017 / 2016). Troubleshooting:
    • Bridge firmware load failed: Error finding NPF device name for adapter - disable all other network adapters and try again.
  • D-Link DAP-1522 (2015) (NI install with tools no longer available).

About

Code for the 2018 Power Up robot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages