Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elevator merge #10

Merged
merged 74 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
86644ac
updated to 2024
eerinn Jan 22, 2024
601e1a2
removed imports
eerinn Jan 22, 2024
af3a3bb
fixed everything
CrolineCrois Jan 22, 2024
3a236e6
changed functions to commands
eerinn Jan 25, 2024
c289378
put stuff in constants
eerinn Jan 25, 2024
34aed73
changed library
eerinn Jan 30, 2024
67f5b45
github checks for build
penguin212 Jan 25, 2024
3998aa0
vendor libraries
penguin212 Nov 28, 2023
35cc689
choreo
CrolineCrois Jan 10, 2024
a5c47ee
choreo and traj and field2d
CrolineCrois Jan 11, 2024
3edb118
choreo implementaiton in robotconatiner for first swerve base only
CrolineCrois Jan 12, 2024
1245aaf
some patths
CrolineCrois Jan 12, 2024
c6f3cc0
straightline and curve auton paths
CrolineCrois Jan 12, 2024
5cf91f0
testing changes
CrolineCrois Jan 12, 2024
f7877c8
swerve testing changes
CrolineCrois Jan 13, 2024
e6fb015
max vel calculations
CrolineCrois Jan 13, 2024
378655a
update choreo traj with correct robot specs
CrolineCrois Jan 13, 2024
78a0d35
import clean up
CrolineCrois Jan 16, 2024
8728c61
swerve drive and steer tuning values
CrolineCrois Jan 16, 2024
5fdbd23
swerve testing changes
CrolineCrois Jan 16, 2024
0cf82a1
even more swerve testing changes
CrolineCrois Jan 17, 2024
9e45f38
zilly zoofy manual encoder range fixing
CrolineCrois Jan 17, 2024
6776c07
using get mapped
CrolineCrois Jan 17, 2024
feaa3f0
re enable wraparound
CrolineCrois Jan 20, 2024
b3ec077
drive controllers
penguin212 Jan 20, 2024
58100b0
basic functions and constructor code
siyoyoCode Jan 17, 2024
bd3b7a5
used enumerations
siyoyoCode Jan 17, 2024
be79997
fixed shooter logic
siyoyoCode Jan 17, 2024
f85b3cc
fixed setAngle code
siyoyoCode Jan 17, 2024
10241d2
update
siyoyoCode Jan 19, 2024
9c28a2f
made new shooter functions, added second motor
siyoyoCode Jan 20, 2024
71c3f9c
shooter changed
siyoyoCode Jan 21, 2024
68ac0ac
controller bindings and shooter functions
siyoyoCode Jan 21, 2024
bbac621
controller bindings
siyoyoCode Jan 21, 2024
b4d390c
updated comments
siyoyoCode Jan 21, 2024
3e3182e
updated all commands
siyoyoCode Jan 24, 2024
8a3ffad
deleted unnecesary comments
siyoyoCode Jan 24, 2024
6e39d5f
field positioning auto aim
siyoyoCode Jan 24, 2024
42edb8d
deleted excess folders
siyoyoCode Jan 24, 2024
5c23784
auto aim logic
siyoyoCode Jan 24, 2024
cc04887
made auto aim command
siyoyoCode Jan 25, 2024
757b175
simulation changes
siyoyoCode Jan 25, 2024
8068d0f
simulate setup
CrolineCrois Jan 25, 2024
395135a
added debugging comments
siyoyoCode Jan 25, 2024
dbd4f6d
fixed controller bindings
siyoyoCode Jan 26, 2024
ab771cf
updated gearbox ratio
siyoyoCode Jan 26, 2024
ddd607f
updated motor ids
siyoyoCode Jan 26, 2024
a7cac08
testing changes
penguin212 Jan 27, 2024
64ce150
added phoenix v5 vendor dep for talons
penguin212 Jan 27, 2024
1916a9d
testing shooter code
siyoyoCode Jan 27, 2024
ee4d494
fixed hell.
rishay-jain Jan 31, 2024
e2dbe96
rename + reformat
penguin212 Jan 31, 2024
f927456
fixed vendor deps
penguin212 Jan 14, 2024
0861a6e
fuses are 40A :skull:
MysticalApple Jan 16, 2024
db0bf6b
climb! (untested)
MysticalApple Jan 16, 2024
960dc3f
forgor how clamp works
MysticalApple Jan 16, 2024
1ae68a1
current spikes are useful actually
MysticalApple Jan 16, 2024
3c16dcc
command-controllable climb
MysticalApple Jan 16, 2024
b140623
better commands
MysticalApple Jan 19, 2024
72cc6a8
fixed some stuff (not everything)
MysticalApple Jan 20, 2024
f823890
unnecessary import
MysticalApple Jan 20, 2024
70e4020
constant climb speed
MysticalApple Jan 24, 2024
e5706ff
make climb folder
penguin212 Jan 31, 2024
c26c318
Merge pull request #9 from grt192/climb-merge
penguin212 Jan 31, 2024
68b3a16
Added Elevator Constants
Jan 14, 2024
0cf43c1
Implemented basic enum class for elevator states
Jan 14, 2024
94b31c0
Elevator subsystem so far
Jan 14, 2024
d43e66c
Added controller for manual mode, also implemented move to state feat…
Jan 16, 2024
a9f3176
Added constants and fixed issues
Jan 18, 2024
d8ee11d
Added reverse nt stuff, needs testing
Jan 18, 2024
18684a0
Config for Outline Viewer
Jan 19, 2024
003c5f1
Elevator commands init
Jan 19, 2024
e0a1543
Added methods for get target and set auto
Jan 19, 2024
12641f6
reformat
penguin212 Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}
}
}
23 changes: 23 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and test robot code
on: push
jobs:
build:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2024-22.04
steps:
- uses: actions/checkout@v3
- name: Add repository to git safe directories
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile and run tests on robot code
run: ./gradlew build
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@master
with:
status: ${{ job.status }}
notify_when: 'failure'
token: ${{ secrets.GITHUB_TOKEN }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
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
Loading