mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 00:38:00 -06:00
Upgrade to WPILib 2021
- Update vendor dependencies - Format Constants.java and CSV.java - Remove unused DemoConstants.java
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"enableCppIntellisense": false,
|
||||
"currentLanguage": "java",
|
||||
"projectYear": "2020",
|
||||
"projectYear": "2021",
|
||||
"teamNumber": 4388
|
||||
}
|
||||
+12
-1
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id "java"
|
||||
id "edu.wpi.first.GradleRIO" version "2020.3.2"
|
||||
id "edu.wpi.first.GradleRIO" version "2021.3.1"
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
@@ -56,6 +56,17 @@ dependencies {
|
||||
// Enable simulation gui support. Must check the box in vscode to enable support
|
||||
// upon debugging
|
||||
simulation wpi.deps.sim.gui(wpi.platforms.desktop, false)
|
||||
simulation wpi.deps.sim.driverstation(wpi.platforms.desktop, false)
|
||||
|
||||
// Websocket extensions require additional configuration.
|
||||
// simulation wpi.deps.sim.ws_server(wpi.platforms.desktop, false)
|
||||
// simulation wpi.deps.sim.ws_client(wpi.platforms.desktop, false)
|
||||
}
|
||||
|
||||
// Simulation configuration (e.g. environment variables).
|
||||
sim {
|
||||
// Sets the websocket client remote host.
|
||||
// envVar "HALSIMWS_HOST", "10.0.0.2"
|
||||
}
|
||||
|
||||
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
gradlePluginPortal()
|
||||
String frcYear = '2020'
|
||||
String frcYear = '2021'
|
||||
File frcHome
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
String publicFolder = System.getenv('PUBLIC')
|
||||
|
||||
@@ -15,10 +15,11 @@ import frc4388.utility.LEDPatterns;
|
||||
|
||||
/**
|
||||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
||||
* constants. This class should not be used for any other purpose. All constants should be
|
||||
* declared globally (i.e. public static). Do not put anything functional in this class.
|
||||
* constants. This class should not be used for any other purpose. All constants should be declared
|
||||
* globally (i.e. public static). Do not put anything functional in this class.
|
||||
*
|
||||
* <p>It is advised to statically import this class (or one of its inner classes) wherever the
|
||||
* <p>
|
||||
* It is advised to statically import this class (or one of its inner classes) wherever the
|
||||
* constants are needed, to reduce verbosity.
|
||||
*/
|
||||
public final class Constants {
|
||||
@@ -28,7 +29,7 @@ public final class Constants {
|
||||
/* Drive Train IDs */
|
||||
public static final int DRIVE_LEFT_FRONT_CAN_ID = 2;
|
||||
public static final int DRIVE_RIGHT_FRONT_CAN_ID = 4;
|
||||
public static final int DRIVE_LEFT_BACK_CAN_ID = 3;
|
||||
public static final int DRIVE_LEFT_BACK_CAN_ID = 3;
|
||||
public static final int DRIVE_RIGHT_BACK_CAN_ID = 5;
|
||||
public static final int PIGEON_ID = 6;
|
||||
|
||||
@@ -42,11 +43,10 @@ public final class Constants {
|
||||
public static final int DRIVE_TIMEOUT_MS = 30; // Use for all motor config
|
||||
public static final double OPEN_LOOP_RAMP_RATE = 0.2; // Seconds from 0 to full power on motor
|
||||
public static final double NEUTRAL_DEADBAND = 0.04;
|
||||
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG =
|
||||
new SupplyCurrentLimitConfiguration(false, 60, 40, 2);
|
||||
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG = new SupplyCurrentLimitConfiguration(false, 60, 40, 2);
|
||||
public static final int CLOSED_LOOP_TIME_MS = 1; // Higher numbers mean slower control loops
|
||||
public static final double COS_MULTIPLIER_LOW = 1.0;
|
||||
public static final double COS_MULTIPLIER_HIGH = 0.8;
|
||||
public static final double COS_MULTIPLIER_HIGH = 0.8;
|
||||
|
||||
/* Drive Train Characteristics */
|
||||
public static final double MOTOR_ROT_PER_WHEEL_ROT_HIGH = 7.29;
|
||||
@@ -77,39 +77,39 @@ public final class Constants {
|
||||
public static final double MAX_ACCELERATION_METERS_PER_SECOND_SQUARED = 1.0;
|
||||
public static final double TRACK_WIDTH_METERS = 0.648;
|
||||
public static final DifferentialDriveKinematics kDriveKinematics = new DifferentialDriveKinematics(TRACK_WIDTH_METERS);
|
||||
|
||||
|
||||
/* Remote Sensors */
|
||||
public final static int REMOTE_0 = 0;
|
||||
public final static int REMOTE_1 = 1;
|
||||
|
||||
public static final int REMOTE_0 = 0;
|
||||
public static final int REMOTE_1 = 1;
|
||||
|
||||
/* PID Indexes */
|
||||
public final static int PID_PRIMARY = 0;
|
||||
public final static int PID_TURN = 1;
|
||||
|
||||
public static final int PID_PRIMARY = 0;
|
||||
public static final int PID_TURN = 1;
|
||||
|
||||
/* PID SLOTS */
|
||||
public final static int SLOT_DISTANCE = 0;
|
||||
public final static int SLOT_VELOCITY = 1;
|
||||
public final static int SLOT_TURNING = 2;
|
||||
public final static int SLOT_MOTION_MAGIC = 3;
|
||||
|
||||
public static final int SLOT_DISTANCE = 0;
|
||||
public static final int SLOT_VELOCITY = 1;
|
||||
public static final int SLOT_TURNING = 2;
|
||||
public static final int SLOT_MOTION_MAGIC = 3;
|
||||
|
||||
/* Ratio Calculation */
|
||||
public static final double INCHES_PER_WHEEL_REV = WHEEL_DIAMETER_INCHES * Math.PI;
|
||||
public static final double TICK_TIME_TO_SECONDS = 0.1;
|
||||
public static final double SECONDS_TO_TICK_TIME = 1/TICK_TIME_TO_SECONDS;
|
||||
public static final double SECONDS_TO_TICK_TIME = 1 / TICK_TIME_TO_SECONDS;
|
||||
public static final double INCHES_PER_METER = 39.370;
|
||||
public static final double METERS_PER_INCH = 1/INCHES_PER_METER;
|
||||
|
||||
public static final double WHEEL_ROT_PER_MOTOR_ROT_HIGH = 1/MOTOR_ROT_PER_WHEEL_ROT_HIGH;
|
||||
public static final double TICKS_PER_WHEEL_REV_HIGH = TICKS_PER_MOTOR_REV * MOTOR_ROT_PER_WHEEL_ROT_HIGH;
|
||||
public static final double TICKS_PER_INCH_HIGH = TICKS_PER_WHEEL_REV_HIGH/INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK_HIGH = 1/TICKS_PER_INCH_HIGH;
|
||||
public static final double METERS_PER_INCH = 1 / INCHES_PER_METER;
|
||||
|
||||
public static final double WHEEL_ROT_PER_MOTOR_ROT_LOW = 1/MOTOR_ROT_PER_WHEEL_ROT_LOW;
|
||||
public static final double WHEEL_ROT_PER_MOTOR_ROT_HIGH = 1 / MOTOR_ROT_PER_WHEEL_ROT_HIGH;
|
||||
public static final double TICKS_PER_WHEEL_REV_HIGH = TICKS_PER_MOTOR_REV * MOTOR_ROT_PER_WHEEL_ROT_HIGH;
|
||||
public static final double TICKS_PER_INCH_HIGH = TICKS_PER_WHEEL_REV_HIGH / INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK_HIGH = 1 / TICKS_PER_INCH_HIGH;
|
||||
|
||||
public static final double WHEEL_ROT_PER_MOTOR_ROT_LOW = 1 / MOTOR_ROT_PER_WHEEL_ROT_LOW;
|
||||
public static final double TICKS_PER_WHEEL_REV_LOW = TICKS_PER_MOTOR_REV * MOTOR_ROT_PER_WHEEL_ROT_LOW;
|
||||
public static final double TICKS_PER_INCH_LOW = TICKS_PER_WHEEL_REV_LOW/INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK_LOW = 1/TICKS_PER_INCH_LOW;
|
||||
public static final double TICKS_PER_INCH_LOW = TICKS_PER_WHEEL_REV_LOW / INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK_LOW = 1 / TICKS_PER_INCH_LOW;
|
||||
}
|
||||
|
||||
|
||||
public static final class ShooterConstants {
|
||||
/* Motor IDs */
|
||||
public static final int SHOOTER_FALCON_BALLER_ID = 8;
|
||||
@@ -121,8 +121,8 @@ public final class Constants {
|
||||
public static final int SHOOTER_SLOT_IDX = 0;
|
||||
public static final int SHOOTER_PID_LOOP_IDX = 1;
|
||||
public static final int SHOOTER_TIMEOUT_MS = 30;
|
||||
public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.34, 0.0, 0.0, 0.055, 0, 1.0); //Ff was 0.055
|
||||
//public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.55, 0.0, 100, 0.0, 0, 1.0);
|
||||
public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.34, 0.0, 0.0, 0.055, 0, 1.0); // Ff was 0.055
|
||||
// public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.55, 0.0, 100, 0.0, 0, 1.0);
|
||||
public static final Gains SHOOTER_TURRET_GAINS = new Gains(0.6, 0.0, 0.0, 0.0, 0, 1.0);
|
||||
public static final Gains SHOOTER_ANGLE_GAINS = new Gains(0.05, 0.0, 0.0, 0.0, 0, 0.3);
|
||||
public static final double SHOOTER_TURRET_MIN = -1.0;
|
||||
@@ -130,14 +130,13 @@ public final class Constants {
|
||||
public static final double NEO_UNITS_PER_REV = 42;
|
||||
public static final double DEGREES_PER_ROT = 360;
|
||||
|
||||
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG =
|
||||
new SupplyCurrentLimitConfiguration(true, 60, 40, 0.5);
|
||||
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG = new SupplyCurrentLimitConfiguration(true, 60, 40, 0.5);
|
||||
|
||||
public static final int TURRET_RIGHT_SOFT_LIMIT = -2;
|
||||
public static final int TURRET_LEFT_SOFT_LIMIT = -55;
|
||||
public static final double TURRET_SPEED_MULTIPLIER = 0.3;
|
||||
public static final double TURRET_CALIBRATE_SPEED = 0.075;
|
||||
public static final double TURRET_MOTOR_ROTS_PER_ROT = 101.04972; //89.56696;
|
||||
public static final double TURRET_MOTOR_ROTS_PER_ROT = 101.04972; // 89.56696;
|
||||
public static final double TURRET_MOTOR_POS_AT_ZERO_ROT = -28.452166;
|
||||
|
||||
public static final int HOOD_UP_SOFT_LIMIT = 33;
|
||||
@@ -145,29 +144,29 @@ public final class Constants {
|
||||
public static final double HOOD_CONVERT_SLOPE = 0.47;
|
||||
public static final double HOOD_CONVERT_B = 40.5;
|
||||
public static final double HOOD_CALIBRATE_SPEED = 0.2;
|
||||
public static final double HOOD_MOTOR_ROTS_PER_ROT = 1; //TODO: Find
|
||||
public static final double HOOD_MOTOR_POS_AT_ZERO_ROT = 0; //TODO: Find
|
||||
public static final double HOOD_MOTOR_ROTS_PER_ROT = 1; // TODO: Find
|
||||
public static final double HOOD_MOTOR_POS_AT_ZERO_ROT = 0; // TODO: Find
|
||||
|
||||
public static final double DRUM_RAMP_LIMIT = 1000;
|
||||
public static final double DRUM_VELOCITY_BOUND = 300;
|
||||
}
|
||||
|
||||
|
||||
public static final class ClimberConstants {
|
||||
public static final int CLIMBER_SPARK_ID = 14;
|
||||
}
|
||||
|
||||
|
||||
public static final class LevelerConstants {
|
||||
public static final int LEVELER_CAN_ID = 30;
|
||||
}
|
||||
|
||||
public static final class IntakeConstants {;
|
||||
public static final class IntakeConstants {
|
||||
public static final double EXTENDER_SPEED = 0.3;
|
||||
public static final double INTAKE_SPEED = 1.0;
|
||||
|
||||
public static final int INTAKE_SPARK_ID = 12;
|
||||
public static final int EXTENDER_SPARK_ID = 13;
|
||||
}
|
||||
|
||||
|
||||
public static final class StorageConstants {
|
||||
public static final int STORAGE_CAN_ID = 11;
|
||||
public static final double STORAGE_PARTIAL_BALL = 2;
|
||||
@@ -176,8 +175,8 @@ public final class Constants {
|
||||
public static final double STORAGE_TIMEOUT = 3000;
|
||||
|
||||
/* Storage Characteristics */
|
||||
public static final double MOTOR_ROTS_PER_STORAGE_ROT = 1; //For the first storage belt
|
||||
public static final double INCHES_PER_STORAGE_ROT = 1; //Circumference of the first storage belt
|
||||
public static final double MOTOR_ROTS_PER_STORAGE_ROT = 1; // For the first storage belt
|
||||
public static final double INCHES_PER_STORAGE_ROT = 1; // Circumference of the first storage belt
|
||||
|
||||
/* Ball Indexes */
|
||||
public static final int BEAM_SENSOR_SHOOTER = 11;
|
||||
@@ -204,14 +203,14 @@ public final class Constants {
|
||||
public static final int COOL_FALCON_FORWARD_ID = 3;
|
||||
public static final int COOL_FALCON_REVERSE_ID = 2;
|
||||
}
|
||||
|
||||
|
||||
public static final class LEDConstants {
|
||||
public static final int LED_SPARK_ID = 0;
|
||||
public static final LEDPatterns DEFAULT_PATTERN = LEDPatterns.FOREST_WAVES;
|
||||
}
|
||||
|
||||
|
||||
public static final class VisionConstants {
|
||||
public static final double FOV = 29.8; //Field of view of limelight
|
||||
public static final double FOV = 29.8; // Field of view of limelight
|
||||
public static final double TARGET_HEIGHT = 67.5;
|
||||
public static final double LIME_ANGLE = 24.7;
|
||||
public static final double TURN_P_VALUE = 0.8;
|
||||
@@ -221,20 +220,21 @@ public final class Constants {
|
||||
public static final double DISTANCE_ERROR_EQUATION_B = -15.0684;
|
||||
public static final double GRAV = 385.83;
|
||||
|
||||
//Galactic Search
|
||||
// Galactic Search
|
||||
public static final double searchError = 2;
|
||||
/*public static final double bothCloseVisibleY = -17.69;
|
||||
/*
|
||||
public static final double bothCloseVisibleY = -17.69;
|
||||
public static final double closeLeftVisibleY = -12.57;
|
||||
public static final double closeRightVisibleY = -11.35;
|
||||
public static final double farLeftVisibleX = 3.58;
|
||||
public static final double farRightVisibleX = 7.04;*/
|
||||
public static final double farRightVisibleX = 7.04;
|
||||
*/
|
||||
|
||||
public static final double[] aRed = {1.6, -11.7};
|
||||
public static final double[] bRed = {2.5, -5.5};
|
||||
public static final double[] aBlue = {9.9, 9.0};
|
||||
public static final double[] bBlue = {5.5, 13.3};
|
||||
|
||||
}
|
||||
public static final double[] aRed = { 1.6, -11.7 };
|
||||
public static final double[] bRed = { 2.5, -5.5 };
|
||||
public static final double[] aBlue = { 9.9, 9.0 };
|
||||
public static final double[] bBlue = { 5.5, 13.3 };
|
||||
}
|
||||
|
||||
public static final class OIConstants {
|
||||
public static final int XBOX_DRIVER_ID = 0;
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package frc4388.robot;
|
||||
|
||||
import com.ctre.phoenix.motorcontrol.SupplyCurrentLimitConfiguration;
|
||||
|
||||
import edu.wpi.first.wpilibj.kinematics.DifferentialDriveKinematics;
|
||||
import frc4388.utility.Gains;
|
||||
import frc4388.utility.LEDPatterns;
|
||||
|
||||
/**
|
||||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
|
||||
* constants. This class should not be used for any other purpose. All constants should be
|
||||
* declared globally (i.e. public static). Do not put anything functional in this class.
|
||||
*
|
||||
* <p>It is advised to statically import this class (or one of its inner classes) wherever the
|
||||
* constants are needed, to reduce verbosity.
|
||||
*/
|
||||
public final class DemoConstants {
|
||||
public static final int SELECTED_AUTO = 0;
|
||||
|
||||
public static final class DriveConstants {
|
||||
/* Drive Train IDs */
|
||||
public static final int DRIVE_LEFT_FRONT_CAN_ID = 2;
|
||||
public static final int DRIVE_RIGHT_FRONT_CAN_ID = 4;
|
||||
public static final int DRIVE_LEFT_BACK_CAN_ID = 3;
|
||||
public static final int DRIVE_RIGHT_BACK_CAN_ID = 5;
|
||||
public static final int PIGEON_ID = 6;
|
||||
|
||||
/* Drive Inversions */
|
||||
public static final boolean isRightMotorInverted = true;
|
||||
public static final boolean isLeftMotorInverted = false;
|
||||
public static final boolean isRightArcadeInverted = false;
|
||||
public static final boolean isAuxPIDInverted = false;
|
||||
|
||||
/* Drive Configuration */
|
||||
public static final int DRIVE_TIMEOUT_MS = 30; // Use for all motor config
|
||||
public static final double OPEN_LOOP_RAMP_RATE = 0.2; // Seconds from 0 to full power on motor
|
||||
public static final double NEUTRAL_DEADBAND = 0.04;
|
||||
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG =
|
||||
new SupplyCurrentLimitConfiguration(false, 60, 40, 2);
|
||||
public static final int CLOSED_LOOP_TIME_MS = 1; // Higher numbers mean slower control loops
|
||||
public static final double COS_MULTIPLIER_LOW = 1.0;
|
||||
public static final double COS_MULTIPLIER_HIGH = 0.8;
|
||||
|
||||
/* Drive Train Characteristics */
|
||||
public static final double MOTOR_ROT_PER_WHEEL_ROT_HIGH = 7.29;
|
||||
public static final double MOTOR_ROT_PER_WHEEL_ROT_LOW = 15;
|
||||
public static final double WHEEL_DIAMETER_INCHES = 6;
|
||||
public static final double TICKS_PER_GYRO_REV = 8192;
|
||||
public static final double TICKS_PER_MOTOR_REV = 2048;
|
||||
|
||||
/* PID Constants Drive*/
|
||||
public static final Gains DRIVE_DISTANCE_GAINS_LOW = new Gains(0.1, 0.0, 1.0, 0.0, 0, 0.5);
|
||||
public static final Gains DRIVE_VELOCITY_GAINS_LOW = new Gains(0.05, 0.0, 1.0, 0.025, 0, 1.0);
|
||||
public static final Gains DRIVE_TURNING_GAINS_LOW = new Gains(0.5, 0.0, 2.0, 0.0, 0, 0.55);
|
||||
public static final Gains DRIVE_MOTION_MAGIC_GAINS_LOW = new Gains(0.1, 0.0, 0, 0.025, 0, 1.0);
|
||||
public static final int DRIVE_CRUISE_VELOCITY = 30000;
|
||||
public static final int DRIVE_ACCELERATION = 23000;
|
||||
|
||||
public static final Gains DRIVE_DISTANCE_GAINS_HIGH = new Gains(0.1, 0.0, 0.0, 0.0, 0, 0.5);
|
||||
public static final Gains DRIVE_VELOCITY_GAINS_HIGH = new Gains(0.1, 0.0, 0.0, 0.0, 0, 1.0);
|
||||
public static final Gains DRIVE_TURNING_GAINS_HIGH = new Gains(0.2, 0.0, 0.0, 0.0, 0, 0.55);
|
||||
public static final Gains DRIVE_MOTION_MAGIC_GAINS_HIGH = new Gains(0.1, 0.0, 0.0, 0.0, 0, 1.0);
|
||||
public static final int DRIVE_CRUISE_VELOCITY_HIGH = 20000;
|
||||
public static final int DRIVE_ACCELERATION_HIGH = 7000;
|
||||
|
||||
public static final Gains DRIVE_VELOCITY_GAINS_BACK = new Gains(0.0, 0.0, 0.0, 0.05, 0, 1.0);
|
||||
|
||||
/* Trajectory Constants */
|
||||
public static final double MAX_SPEED_METERS_PER_SECOND = 1.0;
|
||||
public static final double MAX_ACCELERATION_METERS_PER_SECOND_SQUARED = 1.0;
|
||||
public static final double TRACK_WIDTH_METERS = 0.648;
|
||||
public static final DifferentialDriveKinematics kDriveKinematics = new DifferentialDriveKinematics(TRACK_WIDTH_METERS);
|
||||
|
||||
/* Remote Sensors */
|
||||
public final static int REMOTE_0 = 0;
|
||||
public final static int REMOTE_1 = 1;
|
||||
|
||||
/* PID Indexes */
|
||||
public final static int PID_PRIMARY = 0;
|
||||
public final static int PID_TURN = 1;
|
||||
|
||||
/* PID SLOTS */
|
||||
public final static int SLOT_DISTANCE = 0;
|
||||
public final static int SLOT_VELOCITY = 1;
|
||||
public final static int SLOT_TURNING = 2;
|
||||
public final static int SLOT_MOTION_MAGIC = 3;
|
||||
|
||||
/* Ratio Calculation */
|
||||
public static final double INCHES_PER_WHEEL_REV = WHEEL_DIAMETER_INCHES * Math.PI;
|
||||
public static final double TICK_TIME_TO_SECONDS = 0.1;
|
||||
public static final double SECONDS_TO_TICK_TIME = 1/TICK_TIME_TO_SECONDS;
|
||||
public static final double INCHES_PER_METER = 39.370;
|
||||
public static final double METERS_PER_INCH = 1/INCHES_PER_METER;
|
||||
|
||||
public static final double WHEEL_ROT_PER_MOTOR_ROT_HIGH = 1/MOTOR_ROT_PER_WHEEL_ROT_HIGH;
|
||||
public static final double TICKS_PER_WHEEL_REV_HIGH = TICKS_PER_MOTOR_REV * MOTOR_ROT_PER_WHEEL_ROT_HIGH;
|
||||
public static final double TICKS_PER_INCH_HIGH = TICKS_PER_WHEEL_REV_HIGH/INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK_HIGH = 1/TICKS_PER_INCH_HIGH;
|
||||
|
||||
public static final double WHEEL_ROT_PER_MOTOR_ROT_LOW = 1/MOTOR_ROT_PER_WHEEL_ROT_LOW;
|
||||
public static final double TICKS_PER_WHEEL_REV_LOW = TICKS_PER_MOTOR_REV * MOTOR_ROT_PER_WHEEL_ROT_LOW;
|
||||
public static final double TICKS_PER_INCH_LOW = TICKS_PER_WHEEL_REV_LOW/INCHES_PER_WHEEL_REV;
|
||||
public static final double INCHES_PER_TICK_LOW = 1/TICKS_PER_INCH_LOW;
|
||||
}
|
||||
|
||||
public static final class ShooterConstants {
|
||||
/* Motor IDs */
|
||||
public static final int SHOOTER_FALCON_BALLER_ID = 8;
|
||||
public static final int SHOOTER_FALCON_BALLER_FOLLOWER_ID = 15;
|
||||
public static final int SHOOTER_ANGLE_ADJUST_ID = 10;
|
||||
public static final int SHOOTER_ROTATE_ID = 9;
|
||||
|
||||
/* PID Constants Shooter */
|
||||
public static final int SHOOTER_SLOT_IDX = 0;
|
||||
public static final int SHOOTER_PID_LOOP_IDX = 1;
|
||||
public static final int SHOOTER_TIMEOUT_MS = 30;
|
||||
public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.34, 0.0, 0.0, 0.055, 0, 1.0); //Ff was 0.055
|
||||
//public static final Gains DRUM_SHOOTER_GAINS = new Gains(0.55, 0.0, 100, 0.0, 0, 1.0);
|
||||
public static final Gains SHOOTER_TURRET_GAINS = new Gains(0.6, 0.0, 0.0, 0.0, 0, 1.0);
|
||||
public static final Gains SHOOTER_ANGLE_GAINS = new Gains(0.05, 0.0, 0.0, 0.0, 0, 0.3);
|
||||
public static final double SHOOTER_TURRET_MIN = -1.0;
|
||||
public static final double ENCODER_TICKS_PER_REV = 2048;
|
||||
public static final double NEO_UNITS_PER_REV = 42;
|
||||
public static final double DEGREES_PER_ROT = 360;
|
||||
|
||||
public static final SupplyCurrentLimitConfiguration SUPPLY_CURRENT_LIMIT_CONFIG =
|
||||
new SupplyCurrentLimitConfiguration(true, 60, 40, 0.5);
|
||||
|
||||
public static final int TURRET_RIGHT_SOFT_LIMIT = -2;
|
||||
public static final int TURRET_LEFT_SOFT_LIMIT = -55;
|
||||
public static final double TURRET_SPEED_MULTIPLIER = 0.3;
|
||||
public static final double TURRET_CALIBRATE_SPEED = 0.075;
|
||||
public static final double TURRET_MOTOR_ROTS_PER_ROT = 101.04972; //89.56696;
|
||||
public static final double TURRET_MOTOR_POS_AT_ZERO_ROT = -28.452166;
|
||||
|
||||
public static final int HOOD_UP_SOFT_LIMIT = 33;
|
||||
public static final int HOOD_DOWN_SOFT_LIMIT = 3;
|
||||
public static final double HOOD_CONVERT_SLOPE = 0.47;
|
||||
public static final double HOOD_CONVERT_B = 40.5;
|
||||
public static final double HOOD_CALIBRATE_SPEED = 0.2;
|
||||
public static final double HOOD_MOTOR_ROTS_PER_ROT = 1; //TODO: Find
|
||||
public static final double HOOD_MOTOR_POS_AT_ZERO_ROT = 0; //TODO: Find
|
||||
|
||||
public static final double DRUM_RAMP_LIMIT = 1000;
|
||||
public static final double DRUM_VELOCITY_BOUND = 300;
|
||||
}
|
||||
|
||||
public static final class ClimberConstants {
|
||||
public static final int CLIMBER_SPARK_ID = 14;
|
||||
}
|
||||
|
||||
public static final class LevelerConstants {
|
||||
public static final int LEVELER_CAN_ID = 30;
|
||||
}
|
||||
|
||||
public static final class IntakeConstants {;
|
||||
public static final double EXTENDER_SPEED = 0.3;
|
||||
public static final double INTAKE_SPEED = 1.0;
|
||||
|
||||
public static final int INTAKE_SPARK_ID = 12;
|
||||
public static final int EXTENDER_SPARK_ID = 13;
|
||||
}
|
||||
|
||||
public static final class StorageConstants {
|
||||
public static final int STORAGE_CAN_ID = 11;
|
||||
public static final double STORAGE_PARTIAL_BALL = 2;
|
||||
public static final double STORAGE_FULL_BALL = 7;
|
||||
public static final double STORAGE_SPEED = 0.75;
|
||||
public static final double STORAGE_TIMEOUT = 3000;
|
||||
|
||||
/* Storage Characteristics */
|
||||
public static final double MOTOR_ROTS_PER_STORAGE_ROT = 1; //For the first storage belt
|
||||
public static final double INCHES_PER_STORAGE_ROT = 1; //Circumference of the first storage belt
|
||||
|
||||
/* Ball Indexes */
|
||||
public static final int BEAM_SENSOR_SHOOTER = 11;
|
||||
public static final int BEAM_SENSOR_USELESS = 12;
|
||||
public static final int BEAM_SENSOR_STORAGE = 13;
|
||||
public static final int BEAM_SENSOR_INTAKE = 14;
|
||||
|
||||
/* PID Gains */
|
||||
public static final Gains STORAGE_GAINS = new Gains(0.1, 0.0, 0.0, 0.0, 0, 1.0);
|
||||
|
||||
/* PID Values */
|
||||
public static final int SLOT_DISTANCE = 0;
|
||||
|
||||
/* PID Indexes */
|
||||
public static final int PID_PRIMARY = 0;
|
||||
}
|
||||
|
||||
public static final class PneumaticsConstants {
|
||||
public static final int PCM_MODULE_ID = 7;
|
||||
|
||||
public static final int SPEED_SHIFT_FORWARD_ID = 0;
|
||||
public static final int SPEED_SHIFT_REVERSE_ID = 1;
|
||||
|
||||
public static final int COOL_FALCON_FORWARD_ID = 3;
|
||||
public static final int COOL_FALCON_REVERSE_ID = 2;
|
||||
}
|
||||
|
||||
public static final class LEDConstants {
|
||||
public static final int LED_SPARK_ID = 0;
|
||||
public static final LEDPatterns DEFAULT_PATTERN = LEDPatterns.FOREST_WAVES;
|
||||
}
|
||||
|
||||
public static final class VisionConstants {
|
||||
public static final double FOV = 29.8; //Field of view of limelight
|
||||
public static final double TARGET_HEIGHT = 67.5;
|
||||
public static final double LIME_ANGLE = 24.7;
|
||||
public static final double TURN_P_VALUE = 0.8;
|
||||
public static final double X_ANGLE_ERROR = 0.5;
|
||||
public static final double MOTOR_DEAD_ZONE = 0.2;
|
||||
public static final double DISTANCE_ERROR_EQUATION_M = 1.1279;
|
||||
public static final double DISTANCE_ERROR_EQUATION_B = -15.0684;
|
||||
public static final double GRAV = 385.83;
|
||||
|
||||
//Galactic Search
|
||||
public static final double searchError = 2;
|
||||
/*public static final double bothCloseVisibleY = -17.69;
|
||||
public static final double closeLeftVisibleY = -12.57;
|
||||
public static final double closeRightVisibleY = -11.35;
|
||||
public static final double farLeftVisibleX = 3.58;
|
||||
public static final double farRightVisibleX = 7.04;*/
|
||||
|
||||
public static final double[] aRed = {1.6, -11.7};
|
||||
public static final double[] bRed = {2.5, -5.5};
|
||||
public static final double[] aBlue = {9.9, 9.0};
|
||||
public static final double[] bBlue = {5.5, 13.3};
|
||||
|
||||
}
|
||||
|
||||
public static final class OIConstants {
|
||||
public static final int XBOX_DRIVER_ID = 0;
|
||||
public static final int XBOX_OPERATOR_ID = 1;
|
||||
public static final int BUTTON_FOX_ID = 2;
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,12 @@ public class CSV<R> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@code CSV} instance and prepares for populating the fields of objects created by the given generator. Private fields and fields of primitive types are not supported.
|
||||
* @param generator a parameterless supplier which produces a new object with any number of fields corresponding to header names from a CSV file. The first character of the names from the header in the CSV file will be made lowercase and invalid characters will be removed to match Java naming conventions.
|
||||
* Creates a new {@code CSV} instance and prepares for populating the fields of objects created by
|
||||
* the given generator. Private fields and fields of primitive types are not supported.
|
||||
* @param generator a parameterless supplier which produces a new object with any number of fields
|
||||
* corresponding to header names from a CSV file. The first character of the names
|
||||
* from the header in the CSV file will be made lowercase and invalid characters
|
||||
* will be removed to match Java naming conventions.
|
||||
* @see #read(Path)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -82,7 +86,9 @@ public class CSV<R> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads and parses the contents of the given CSV file, and returns an array filled with populated objects created with the previously given generator. Cells are parsed using their corresponding field's {@code valueOf(String)} function.
|
||||
* Reads and parses the contents of the given CSV file, and returns an array filled with populated
|
||||
* objects created with the previously given generator. Cells are parsed using their corresponding
|
||||
* field's {@code valueOf(String)} function.
|
||||
* @param path the path to a CSV file
|
||||
* @return the parsed data from the CSV file
|
||||
* @throws IOException if an I/O error occurs opening the file
|
||||
|
||||
+84
-50
@@ -1,81 +1,69 @@
|
||||
{
|
||||
"fileName": "Phoenix.json",
|
||||
"name": "CTRE-Phoenix",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537",
|
||||
"mavenUrls": [
|
||||
"http://devsite.ctr-electronics.com/maven/release/"
|
||||
"https://devsite.ctr-electronics.com/maven/release/"
|
||||
],
|
||||
"jsonUrl": "http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/Phoenix-latest.json",
|
||||
"jsonUrl": "https://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/Phoenix-latest.json",
|
||||
"javaDependencies": [
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "api-java",
|
||||
"version": "5.18.2"
|
||||
"version": "5.19.4"
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "wpiapi-java",
|
||||
"version": "5.18.2"
|
||||
"version": "5.19.4"
|
||||
}
|
||||
],
|
||||
"jniDependencies": [
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "cci",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"isJar": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"validPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxathena"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "diagnostics",
|
||||
"version": "5.18.2",
|
||||
"groupId": "com.ctre.phoenix.sim",
|
||||
"artifactId": "cci-sim",
|
||||
"version": "5.19.4",
|
||||
"isJar": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"validPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "canutils",
|
||||
"version": "5.18.2",
|
||||
"groupId": "com.ctre.phoenix.sim",
|
||||
"artifactId": "simTalonSRX",
|
||||
"version": "5.19.4",
|
||||
"isJar": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"validPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "platform-stub",
|
||||
"version": "5.18.2",
|
||||
"groupId": "com.ctre.phoenix.sim",
|
||||
"artifactId": "simVictorSPX",
|
||||
"version": "5.19.4",
|
||||
"isJar": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"validPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "core",
|
||||
"version": "5.18.2",
|
||||
"isJar": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"validPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -83,7 +71,7 @@
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "wpiapi-cpp",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_Phoenix_WPI",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
@@ -91,13 +79,14 @@
|
||||
"binaryPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "api-cpp",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_Phoenix",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
@@ -105,27 +94,40 @@
|
||||
"binaryPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "cci",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_PhoenixCCI",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"binaryPlatforms": [
|
||||
"linuxathena",
|
||||
"linuxathena"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix.sim",
|
||||
"artifactId": "cci-sim",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_PhoenixCCISim",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"binaryPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "diagnostics",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_PhoenixDiagnostics",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
@@ -133,39 +135,42 @@
|
||||
"binaryPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "canutils",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_PhoenixCanutils",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"binaryPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "platform-stub",
|
||||
"version": "5.18.2",
|
||||
"artifactId": "platform-sim",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_PhoenixPlatform",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
"skipInvalidPlatforms": true,
|
||||
"binaryPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix",
|
||||
"artifactId": "core",
|
||||
"version": "5.18.2",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_PhoenixCore",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
@@ -173,7 +178,36 @@
|
||||
"binaryPlatforms": [
|
||||
"linuxathena",
|
||||
"windowsx86-64",
|
||||
"linuxx86-64"
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix.sim",
|
||||
"artifactId": "simTalonSRX",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_SimTalonSRX",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": true,
|
||||
"skipInvalidPlatforms": true,
|
||||
"binaryPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.ctre.phoenix.sim",
|
||||
"artifactId": "simVictorSPX",
|
||||
"version": "5.19.4",
|
||||
"libName": "CTRE_SimVictorSPX",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": true,
|
||||
"skipInvalidPlatforms": true,
|
||||
"binaryPlatforms": [
|
||||
"windowsx86-64",
|
||||
"linuxx86-64",
|
||||
"osxx86-64"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"fileName": "REVRobotics.json",
|
||||
"name": "REVRobotics",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.4",
|
||||
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
|
||||
"mavenUrls": [
|
||||
"http://www.revrobotics.com/content/sw/max/sdk/maven/"
|
||||
@@ -11,14 +11,14 @@
|
||||
{
|
||||
"groupId": "com.revrobotics.frc",
|
||||
"artifactId": "SparkMax-java",
|
||||
"version": "1.5.2"
|
||||
"version": "1.5.4"
|
||||
}
|
||||
],
|
||||
"jniDependencies": [
|
||||
{
|
||||
"groupId": "com.revrobotics.frc",
|
||||
"artifactId": "SparkMax-driver",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.4",
|
||||
"skipInvalidPlatforms": true,
|
||||
"isJar": false,
|
||||
"validPlatforms": [
|
||||
@@ -27,7 +27,8 @@
|
||||
"linuxaarch64bionic",
|
||||
"linuxx86-64",
|
||||
"linuxathena",
|
||||
"linuxraspbian"
|
||||
"linuxraspbian",
|
||||
"osxx86-64"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -35,7 +36,7 @@
|
||||
{
|
||||
"groupId": "com.revrobotics.frc",
|
||||
"artifactId": "SparkMax-cpp",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.4",
|
||||
"libName": "SparkMax",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
@@ -46,13 +47,14 @@
|
||||
"linuxaarch64bionic",
|
||||
"linuxx86-64",
|
||||
"linuxathena",
|
||||
"linuxraspbian"
|
||||
"linuxraspbian",
|
||||
"osxx86-64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupId": "com.revrobotics.frc",
|
||||
"artifactId": "SparkMax-driver",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.4",
|
||||
"libName": "SparkMaxDriver",
|
||||
"headerClassifier": "headers",
|
||||
"sharedLibrary": false,
|
||||
@@ -63,7 +65,8 @@
|
||||
"linuxaarch64bionic",
|
||||
"linuxx86-64",
|
||||
"linuxathena",
|
||||
"linuxraspbian"
|
||||
"linuxraspbian",
|
||||
"osxx86-64"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user