Skip to content

Commit

Permalink
Merge pull request #13 from Team6593/UnitConverterAdded
Browse files Browse the repository at this point in the history
Arm and Reeler Subsystem
  • Loading branch information
devmanso authored Mar 7, 2023
2 parents 7d609a3 + 4213744 commit 4b702ee
Show file tree
Hide file tree
Showing 20 changed files with 974 additions and 137 deletions.
134 changes: 134 additions & 0 deletions src/main/deploy/pathplanner/AutonPath.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"waypoints": [
{
"anchorPoint": {
"x": 2.2462425171763925,
"y": 0.5366623078925185
},
"prevControl": null,
"nextControl": {
"x": 2.9145460760057396,
"y": 0.5645082895104077
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 4.223307212046523,
"y": 0.6573282282367027
},
"prevControl": {
"x": 3.573567640962442,
"y": 0.5923542711282961
},
"nextControl": {
"x": 5.578386728155211,
"y": 0.792836179847568
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 6.877957459618623,
"y": 0.8615320934345574
},
"prevControl": {
"x": 6.488113716968175,
"y": 0.8522500995619272
},
"nextControl": {
"x": 7.26780120226907,
"y": 0.8708140873071876
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 1.9863466887427603,
"y": 3.3491064512993236
},
"prevControl": {
"x": 2.831008131152064,
"y": 3.339824457426693
},
"nextControl": {
"x": 1.1416852463334566,
"y": 3.358388445171954
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 3.870591444886594,
"y": 2.8200328005594293
},
"prevControl": {
"x": 2.5247023333552843,
"y": 2.8664427699225774
},
"nextControl": null,
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
}
],
"maxVelocity": 4.0,
"maxAcceleration": 3.0,
"isReversed": false,
"markers": [
{
"position": 0.5696969696969661,
"names": [
"event"
]
}
]
}
74 changes: 74 additions & 0 deletions src/main/deploy/pathplanner/New New Path.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"waypoints": [
{
"anchorPoint": {
"x": 1.0,
"y": 3.0
},
"prevControl": null,
"nextControl": {
"x": 2.0,
"y": 3.0
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 3.0,
"y": 5.0
},
"prevControl": {
"x": 3.0,
"y": 4.0
},
"nextControl": {
"x": 3.0,
"y": 4.0
},
"holonomicAngle": 0,
"isReversal": true,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 5.0,
"y": 3.0
},
"prevControl": {
"x": 4.0,
"y": 3.0
},
"nextControl": null,
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
}
],
"markers": []
}
74 changes: 74 additions & 0 deletions src/main/deploy/pathplanner/New Path.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"waypoints": [
{
"anchorPoint": {
"x": 1.0,
"y": 3.0
},
"prevControl": null,
"nextControl": {
"x": 2.0,
"y": 3.0
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 2.742459134207368,
"y": 4.739468910217441
},
"prevControl": {
"x": 2.742459134207368,
"y": 3.7394689102174414
},
"nextControl": {
"x": 2.742459134207368,
"y": 3.7394689102174414
},
"holonomicAngle": 0,
"isReversal": true,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 10.878496818722034,
"y": 5.901654766272497
},
"prevControl": {
"x": 13.273251237860501,
"y": 5.446837066513641
},
"nextControl": null,
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
}
],
"markers": []
}
36 changes: 31 additions & 5 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public static final class LimitSwitchesPorts{
public final int ElevatorTopLimitSwitchPort = 0;
public final int ElevatorLowLimitSwitchPort = 1;

// // Arm limit switches (WIP)
// public final static int ArmLimitSwitchPortOne = 0;
// public final static int ArmLimitSwitchPortTwo = 0;
}

public static final class InputMap {
Expand All @@ -50,26 +53,49 @@ public static final class xBox{

public static final class Motors {
// put motor ID's here
// how to define consts: subsystem + master or slave + orientation (left, right, up, down) + "ID"
// how to define consts: subsystem + master or follower + orientation (left, right, up, down) + "ID"
// change these nums later
public final int MasterRight = 1;
public final int FollowerRight = 2;
public final int MasterLeft = 3;
public final int FollowerLeft = 4;
public final double falconUnitsPerRevolution = 2048;
public final double FalconUnitsPerRevolution = 2048;

public final int ElevatorMotorID = 6;
// Reeler motors
public final int TopMotorID = 10;
public final int BottomMotorID = 11;

// Elevator motor
public final int ElevatorMotorID = 0;

//units per revolution of talon Motors
public final int TalonFX_UnitsPerRev = 2048;
}

public static final class SpeedsForMotors{
public final double elevator_setSpeed = 0.2;
public final double Elevator_setSpeed = 0.2;
}

public static final class DoubleSolenoidChannels{
// DriveTrain
public static final int ForwardChannelDt = 4;
public static final int ReverseChannelDt = 5;

// Arm
public final int ArmCloseChannel = 0;
public final int ArmOpenChannel = 0;
public final int ArmExtendChannel = 0;
public final int armRetractChannel = 0;

}
public static final class Autonomous {
public final double encoderDistanceToChargeStation = 1223.760000; //couple feet or so, change later
public final double balancingSpeed = .15; // 15 percent speed
public final double rollThreshholdDegrees = 1;
}

public static final class PIDValues{
public final double KPARM = .01;
}

}
}
Loading

0 comments on commit 4b702ee

Please sign in to comment.