Skip to content

Commit

Permalink
Merge pull request #10 from grt192/elevator-merge
Browse files Browse the repository at this point in the history
Elevator merge
  • Loading branch information
penguin212 authored Jan 31, 2024
2 parents 402a31a + 12641f6 commit bbf4537
Show file tree
Hide file tree
Showing 59 changed files with 2,529 additions and 106 deletions.
68 changes: 68 additions & 0 deletions .OutlineViewer/outlineviewer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"Clients": {
"open": true
},
"Connections": {
"open": true
},
"[email protected]:59486": {
"Publishers": {
"open": true
},
"Subscribers": {
"open": true
},
"open": true
},
"[email protected]:59984": {
"Publishers": {
"open": true
},
"Subscribers": {
"open": true
},
"open": true
},
"[email protected]:61719": {
"Publishers": {
"open": true
},
"open": true
},
"[email protected]:65507": {
"Publishers": {
"open": true
},
"open": true
},
"NetworkTables Settings": {
"mode": "Client (NT4)",
"serverTeam": "192"
},
"Server": {
"open": true
},
"outlineviewer@5": {
"open": true
},
"retained": {
"elevator": {
"open": true
}
},
"shuffleboard@2": {
"Subscribers": {
"open": true
}
},
"transitory": {
"Shuffleboard": {
"Auton": {
"Field": {
"open": true
},
"open": true
}
}
}
}
Binary file added .gradle 8.30.16 PM/7.5.1/checksums/checksums.lock
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file added .gradle 8.30.16 PM/7.5.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle 8.30.16 PM/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Jan 16 20:29:04 PST 2024
gradle.version=7.5.1
Empty file.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2024.1.1"
id "edu.wpi.first.GradleRIO" version "2024.2.1"
}

java {
Expand Down
3 changes: 2 additions & 1 deletion simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"NTProvider": {
"types": {
"/FMSInfo": "FMSInfo"
"/FMSInfo": "FMSInfo",
"/Shuffleboard/Auton/Field": "Field2d"
}
},
"NetworkTables": {
Expand Down
58 changes: 58 additions & 0 deletions src/main/deploy/choreo/2MStraightLine.traj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"samples": [
{
"x": 0,
"y": 0,
"heading": 0,
"angularVelocity": -7.55803462394642e-23,
"velocityX": 4.80718084308354,
"velocityY": 0,
"timestamp": 0
},
{
"x": 0.399999999995696,
"y": 0,
"heading": -7.497604164638229e-24,
"angularVelocity": -9.193245718395418e-23,
"velocityX": 4.904634275090461,
"velocityY": 0,
"timestamp": 0.08155552026115727
},
{
"x": 0.7999999999949925,
"y": 0,
"heading": -5.539197561099716e-24,
"angularVelocity": 2.4013165429964444e-23,
"velocityX": 4.904634275134157,
"velocityY": 0,
"timestamp": 0.16311104052231454
},
{
"x": 1.1999999999967819,
"y": 0,
"heading": -3.709865909310565e-24,
"angularVelocity": 2.2430502175244085e-23,
"velocityX": 4.904634275164754,
"velocityY": 0,
"timestamp": 0.24466656078347182
},
{
"x": 1.599999999998375,
"y": 0,
"heading": -1.853623907916435e-24,
"angularVelocity": 2.276046566478452e-23,
"velocityX": 4.9046342751623415,
"velocityY": 0,
"timestamp": 0.3262220810446291
},
{
"x": 2,
"y": 0,
"heading": 7.346839692639297e-40,
"angularVelocity": 2.2728363693887657e-23,
"velocityX": 4.904634275162733,
"velocityY": 0,
"timestamp": 0.40777760130578633
}
]
}
103 changes: 103 additions & 0 deletions src/main/deploy/choreo/2X1MCurve.traj
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"samples": [
{
"x": 0,
"y": 0,
"heading": 1.050069725977771e-40,
"angularVelocity": 1.5398262290553578e-16,
"velocityX": 2.794710467944005,
"velocityY": 3.5303599919188637,
"timestamp": 0
},
{
"x": 0.23173749164767796,
"y": 0.29282094581619517,
"heading": 1.3440021243249235e-17,
"angularVelocity": 1.7652368051626978e-16,
"velocityX": 3.0436823126628485,
"velocityY": 3.8459634962062363,
"timestamp": 0.07613721401873688
},
{
"x": 0.49239298101355006,
"y": 0.5602252989065818,
"heading": -3.323421049691745e-18,
"angularVelocity": -2.2017409632498635e-16,
"velocityX": 3.423496547973215,
"velocityY": 3.5121373501399438,
"timestamp": 0.15227442803747376
},
{
"x": 0.7919875221555976,
"y": 0.7831366780255028,
"heading": 5.996654462713521e-18,
"angularVelocity": 1.224115648587833e-16,
"velocityX": 3.934929127683013,
"velocityY": 2.927758547388317,
"timestamp": 0.22841164205621065
},
{
"x": 1.1317406170413713,
"y": 0.9381018452824517,
"heading": 3.317621643457253e-17,
"angularVelocity": 3.5698130436912057e-16,
"velocityX": 4.462378867750975,
"velocityY": 2.0353406576828874,
"timestamp": 0.3045488560749475
},
{
"x": 1.5,
"y": 1,
"heading": -3.674138992979092e-38,
"angularVelocity": -4.357424534191873e-16,
"velocityX": 4.836785633740269,
"velocityY": 0.8129816084561599,
"timestamp": 0.3806860700936844
},
{
"x": 1.8687850971430546,
"y": 0.9472063385941725,
"heading": 2.0043532320076904e-17,
"angularVelocity": 2.6387750181910064e-16,
"velocityX": 4.855136739459322,
"velocityY": -0.6950401387793096,
"timestamp": 0.45664378600020644
},
{
"x": 2.210735226102118,
"y": 0.799355927973932,
"heading": -2.8324657515278217e-18,
"angularVelocity": -3.0116753508593537e-16,
"velocityX": 4.501848493976605,
"velocityY": -1.9464831038464674,
"timestamp": 0.5326015019067285
},
{
"x": 2.5122510777106877,
"y": 0.5805458963497601,
"heading": 1.603040244881554e-17,
"angularVelocity": 2.4833379961114195e-16,
"velocityX": 3.9695223587330672,
"velocityY": -2.8806820875516777,
"timestamp": 0.6085592178132506
},
{
"x": 2.7724292850840286,
"y": 0.31390580296723725,
"heading": 2.4391259489329175e-17,
"angularVelocity": 1.1007251786346634e-16,
"velocityX": 3.425303200180388,
"velocityY": -3.510375347660468,
"timestamp": 0.6845169337197727
},
{
"x": 3,
"y": 0.018946131691336632,
"heading": 0,
"angularVelocity": -3.2111628420777353e-16,
"velocityX": 2.996018405734816,
"velocityY": -3.8832088058149257,
"timestamp": 0.7604746496262949
}
]
}
57 changes: 57 additions & 0 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@
* constants are needed, to reduce verbosity.
*/
public final class Constants {
public static class ElevatorConstants {
public static final int EXTENSION_ID = 0;
public static final int EXTENSION_FOLLOW_ID = 0;

public static final float EXTENSION_LIMIT_METERS = 0;

public static final int ZERO_LIMIT_ID = 0;

public static final int GROUND_POSITION = 0;
public static final int SPEAKER_POSITION = 0;
public static final int AMP_POSITION = 0;
public static final int CHUTE_POSITION = 0;
public static final int TRAP_POSITION = 0;
public static final int START_POSITION = 0;

public static final double POSITIONCONVERSIONFACTOR = 0;
public static final double VELOCITYCONVERSIONFACTOR = 0;
}
public static class OperatorConstants {
public static final int kDriverControllerPort = 0;
}
Expand All @@ -39,11 +57,50 @@ public static class SwerveConstants {

public static final int BR_DRIVE = 6;
public static final int BR_STEER = 7;
public static final double BR_OFFSET = 2.43 + Math.PI * 3.0 / 4.0;

private static double MODULE_DIST = Units.inchesToMeters(27.25 / 2.0);
public static final Translation2d FL_POS = new Translation2d(-MODULE_DIST, MODULE_DIST);
public static final Translation2d FR_POS = new Translation2d(MODULE_DIST, MODULE_DIST);
public static final Translation2d BL_POS = new Translation2d(-MODULE_DIST, -MODULE_DIST);
public static final Translation2d BR_POS = new Translation2d(MODULE_DIST, -MODULE_DIST);
}

public static class RollerandPivotConstants {
public static final int lastmotorID = 0;
public static final int topmotorID = 2;
public static final int bottommotorID = 3;
public static final int motor1ID = 1;

public static final int sensorID = 0;
public static final int extendedlimitswitchID = 1;
public static final int retractedlimitswitchID = 2;
//public static final int intakeencoderID = 3;

public static final double rollersclockwise = 1;
public static final double rollerscounterclockwise = -1;
public static final double sensorreached = 1;
public static final double pivotclockwise = 1;
public static final double pivotcounterclockwise = -1;
public static final double pastsensortime = 0.5;
}




public static class ClimbConstants {
public static final int LEFT_WINCH_MOTOR_ID = 21;
public static final int LEFT_ZERO_LIMIT_ID = 11;

public static final int RIGHT_WINCH_MOTOR_ID = 22;
public static final int RIGHT_ZERO_LIMIT_ID = 12;

public static final double WINCH_REDUCTION = 9.49;
public static final double AXLE_PERIMETER_METERS = 6 * Units.inchesToMeters(.289) ;

public static final double EXTENSION_LIMIT_METERS = Units.inchesToMeters(39);
public static final double EXTENSION_TOLERANCE_METERS = 0.01;

public static final double MAX_WINCH_POWER = 0.6;
}
}
Loading

0 comments on commit bbf4537

Please sign in to comment.