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

Pre sammy testing #97

Merged
merged 29 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5aff6f5
Drivebase Fixes
jbko6 Mar 20, 2024
bb88dae
Merge branch 'main' of https://github.com/robototes/Crescendo2024 int…
jbko6 Mar 20, 2024
0963032
Changes from 3/19
jbko6 Mar 20, 2024
b00452e
revert some prior pivot changes, add some intake fixes, add pivot san…
jbko6 Mar 21, 2024
0998249
spotless
jbko6 Mar 21, 2024
ab7e37b
change pivot limits
jbko6 Mar 21, 2024
7488d0e
Switch to multitag on coprocessor strategy
KangarooKoala Mar 21, 2024
a3786f1
misc. pivot and intake fixes
jbko6 Mar 21, 2024
15b57d7
Merge branch 'dont-recalc-estimates' of https://github.com/robototes/…
jbko6 Mar 21, 2024
5d86992
start adjusting launcher and launcher data.csv
jbko6 Mar 21, 2024
414596f
adjust module offsets
jbko6 Mar 22, 2024
7c73d56
Merge branch 'main' of https://github.com/robototes/Crescendo2024 int…
kirbt Mar 22, 2024
a600760
yar har
kirbt Mar 22, 2024
e528ff0
preset Changes
jbko6 Mar 22, 2024
b081f78
Merge branch 'Pre-Sammy-Testing' of https://github.com/robototes/Cres…
jbko6 Mar 22, 2024
623273a
more data points
jbko6 Mar 23, 2024
b3dc0ec
Update AutoLogic.java
kirbt Mar 23, 2024
2e11fd7
drivebase null checker
kirbt Mar 23, 2024
2ebd5af
aa
kirbt Mar 23, 2024
f3f9889
spotlessapply
kirbt Mar 23, 2024
3380ac8
gulp
kirbt Mar 23, 2024
dfb4d63
a
kirbt Mar 23, 2024
de107ef
cleanup
kirbt Mar 23, 2024
3d5f218
Merge branch 'Pre-Sammy-testing' of https://github.com/robototes/Cres…
kirbt Mar 23, 2024
d0c74ce
address pr comments
kirbt Mar 23, 2024
028e227
Update src/main/java/frc/team2412/robot/Controls.java
kirbt Mar 23, 2024
148937b
huh
kirbt Mar 23, 2024
058587f
Merge branch 'Pre-Sammy-testing' of https://github.com/robototes/Cres…
kirbt Mar 23, 2024
2e8a231
spotless
jbko6 Mar 23, 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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java"
id "com.diffplug.spotless" version "6.15.0"
id "edu.wpi.first.GradleRIO" version "2024.3.1"
id "edu.wpi.first.GradleRIO" version "2024.3.2"
id "net.ltgt.errorprone" version "3.1.0"
}

Expand Down
12 changes: 12 additions & 0 deletions okay
kirbt marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
GlacierPeak
LauncherTesting
Stemnasium_Feb28
connorlauncher
fulltarget
limelight
* main
music
practicebot
practicecsvdata
sysid
vision-improvements
13 changes: 8 additions & 5 deletions src/main/deploy/launcher_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

# DISTANCE (meters), ANGLE (degrees), RPM (velocity)

1.397, 298, 4000
2.05, 285, 4300
3, 278, 4800
6, 265, 5500
12, 264, 6000
1.397, 252, 3300
2.05, 249, 3500
2.6, 245, 4000
3.2, 243, 4000
5, 240, 5000
5.64,239, 5000
6, 238, 4500
14, 233, 5000
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"type": "path",
"data": {
"pathName": "HighSpeakerPassAutoLine"
"pathName": "HighSpeakerPassAutoline2"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/autos/TunePID.auto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"type": "path",
"data": {
"pathName": "tunePID"
"pathName": null
}
}
]
Expand Down
79 changes: 79 additions & 0 deletions src/main/deploy/pathplanner/paths/HighSpeakerPassAutoline2.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 0.73,
"y": 6.62
},
"prevControl": null,
"nextControl": {
"x": 1.4096302478319247,
"y": 7.388366776733554
},
"isLocked": false,
"linkedName": "TopSpeaker"
},
{
"anchor": {
"x": 2.934213868427737,
"y": 7.68155593454044
},
"prevControl": {
"x": 1.96668964766501,
"y": 7.7108748503211295
},
"nextControl": {
"x": 3.734277569039197,
"y": 7.657311579976456
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.059835262527669,
"y": 7.520301897746653
},
"prevControl": {
"x": 4.5760731521463045,
"y": 7.637577560869407
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [
{
"waypointRelativePos": 0.85,
"rotationDegrees": 180.0,
"rotateFast": false
},
{
"waypointRelativePos": 0.05,
"rotationDegrees": -120.0,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 180.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": -120.0,
"velocity": 0
},
"useDefaultConstraints": false
}
8 changes: 4 additions & 4 deletions src/main/deploy/practiceswerve/modules/backleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"front": -12.5,
"left": 12.5
},
"absoluteEncoderOffset": 265.47476562500003,
"absoluteEncoderOffset": 221.47476562500003,
"drive": {
"type": "falcon",
"id": 7,
"id": 10,
"canbus": "Drivebase"
},
"angle": {
"type": "falcon",
"id": 8,
"id": 11,
"canbus": "Drivebase"
},
"encoder": {
"type": "cancoder",
"id": 9,
"id": 12,
"canbus": "Drivebase"
},
"inverted": {
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/practiceswerve/modules/backright.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"front": -12.5,
"left": -12.5
},
"absoluteEncoderOffset": 134.47109375000002,
"absoluteEncoderOffset": 173.47109375000002,
"drive": {
"type": "falcon",
"id": 10,
"id": 7,
"canbus": "Drivebase"
},
"angle": {
"type": "falcon",
"id": 11,
"id": 8,
"canbus": "Drivebase"
},
"encoder": {
"type": "cancoder",
"id": 12,
"id": 9,
"canbus": "Drivebase"
},
"inverted": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/practiceswerve/modules/frontleft.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": 12.5,
"left": 12.5
},
"absoluteEncoderOffset": 341.01562500000003,
"absoluteEncoderOffset": 340.01562500000003,
"drive": {
"type": "falcon",
"id": 1,
Expand Down
2 changes: 1 addition & 1 deletion src/main/deploy/practiceswerve/modules/frontright.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"front": 12.5,
"left": -12.5
},
"absoluteEncoderOffset": 356.30859375,
"absoluteEncoderOffset": 357.30859375,
"drive": {
"type": "falcon",
"id": 4,
Expand Down
29 changes: 16 additions & 13 deletions src/main/java/frc/team2412/robot/Controls.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import frc.team2412.robot.commands.intake.AllInCommand;
import frc.team2412.robot.commands.intake.AllReverseCommand;
import frc.team2412.robot.commands.intake.AllStopCommand;
import frc.team2412.robot.commands.intake.FeederInCommand;
import frc.team2412.robot.commands.intake.FeederShootCommand;
import frc.team2412.robot.commands.intake.IntakeRejectCommand;
import frc.team2412.robot.commands.launcher.FullTargetCommand;
import frc.team2412.robot.commands.launcher.ManualAngleCommand;
Expand Down Expand Up @@ -70,7 +70,7 @@ public Controls(Subsystems s) {
launcherSubwooferPresetButton = codriveController.a();
launcherLowerPresetButton = codriveController.y();
// launcherPodiumPresetButton = codriveController.povLeft();
launcherTrapPresetButton = codriveController.rightTrigger();
launcherTrapPresetButton = codriveController.start();
launcherLaunchButton = codriveController.rightBumper();
// intake controls (confirmed with driveteam)
driveIntakeInButton = driveController.a();
Expand Down Expand Up @@ -161,8 +161,8 @@ private void bindIntakeControls() {
codriveIntakeRejectButton.onTrue(new IntakeRejectCommand(s.intakeSubsystem));

// feeder shoot note out
launcherLaunchButton.whileTrue(new FeederInCommand(s.intakeSubsystem));
driveController.rightBumper().whileTrue(new FeederInCommand(s.intakeSubsystem));
launcherLaunchButton.whileTrue(new FeederShootCommand(s.intakeSubsystem));
driveController.rightBumper().whileTrue(new FeederShootCommand(s.intakeSubsystem));
}

private void bindLauncherControls() {
Expand All @@ -176,7 +176,10 @@ private void bindLauncherControls() {
* LauncherSubsystem.ANGLE_MAX_SPEED));

launcherLowerPresetButton.onTrue(
new SetPivotCommand(s.launcherSubsystem, LauncherSubsystem.RETRACTED_ANGLE));
s.launcherSubsystem
.run(s.launcherSubsystem::stopLauncher)
.until(() -> true)
kirbt marked this conversation as resolved.
Show resolved Hide resolved
.andThen(new SetPivotCommand(s.launcherSubsystem, LauncherSubsystem.RETRACTED_ANGLE)));
launcherSubwooferPresetButton.onTrue(
new SetAngleLaunchCommand(
s.launcherSubsystem,
Expand Down Expand Up @@ -211,21 +214,21 @@ private void bindSysIdControls() {
// switch these between arm and flywheel in code when tuning
driveController
.leftBumper()
.whileTrue(s.launcherSubsystem.armSysIdQuasistatic(Direction.kForward));
.whileTrue(s.launcherSubsystem.flywheelSysIdQuasistatic(Direction.kForward));
driveController
.rightBumper()
.whileTrue(s.launcherSubsystem.armSysIdQuasistatic(Direction.kReverse));
.whileTrue(s.launcherSubsystem.flywheelSysIdQuasistatic(Direction.kReverse));
driveController
.leftTrigger()
.whileTrue(s.launcherSubsystem.armSysIdDynamic(Direction.kForward));
.whileTrue(s.launcherSubsystem.flywheelSysIdDynamic(Direction.kForward));
driveController
.rightTrigger()
.whileTrue(s.launcherSubsystem.armSysIdDynamic(Direction.kReverse));
.whileTrue(s.launcherSubsystem.flywheelSysIdDynamic(Direction.kReverse));
// switch these between angle and drive tests in code when tuning
driveController.x().whileTrue(s.drivebaseSubsystem.driveSysIdQuasistatic(Direction.kForward));
driveController.y().whileTrue(s.drivebaseSubsystem.driveSysIdQuasistatic(Direction.kReverse));
driveController.a().whileTrue(s.drivebaseSubsystem.driveSysIdDynamic(Direction.kForward));
driveController.b().whileTrue(s.drivebaseSubsystem.driveSysIdDynamic(Direction.kReverse));
driveController.x().whileTrue(s.drivebaseSubsystem.angleSysIdQuasistatic(Direction.kForward));
driveController.y().whileTrue(s.drivebaseSubsystem.angleSysIdQuasistatic(Direction.kReverse));
driveController.a().whileTrue(s.drivebaseSubsystem.angleSysIdDynamic(Direction.kForward));
driveController.b().whileTrue(s.drivebaseSubsystem.angleSysIdDynamic(Direction.kReverse));
}

public void vibrateDriveController(double vibration) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/frc/team2412/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static Robot getInstance() {
return instance;
}

// increases logging
private static final boolean debugMode = true;
// Really dangerous to keep this enabled as it disables all other controls, use with caution
private static final boolean sysIdMode = false;
Expand All @@ -61,7 +62,7 @@ protected Robot() {
}

public static final MACAddress COMPETITION_ADDRESS = MACAddress.of(0x00, 0x00, 0x00);
public static final MACAddress PRACTICE_ADDRESS = MACAddress.of(0x33, 0x9d, 0xD1);
public static final MACAddress PRACTICE_ADDRESS = MACAddress.of(0x38, 0xd9, 0x9e);
public static final MACAddress BONK_ADDRESS = MACAddress.of(0x33, 0x9D, 0xE7);
public static final MACAddress CRANE_ADDRESS = MACAddress.of(0x22, 0xB0, 0x92);

Expand All @@ -83,7 +84,9 @@ public void robotInit() {
subsystems = new Subsystems();
controls = new Controls(subsystems);

// TODO: might be a duplicate, keep until after comp
AutoLogic.registerCommands();

if (Subsystems.SubsystemConstants.DRIVEBASE_ENABLED) {
AutoLogic.initShuffleBoard();
}
Expand Down Expand Up @@ -139,7 +142,7 @@ public void autonomousInit() {
// Checks if FMS is attatched and enables joystick warning if true
DriverStation.silenceJoystickConnectionWarning(!DriverStation.isFMSAttached());
// System.out.println(AutoLogic.getSelected() != null);
if (AutoLogic.getSelectedAuto() != null) {
if (AutoLogic.getSelectedAuto() != null && SubsystemConstants.DRIVEBASE_ENABLED) {
AutoLogic.getSelectedAuto().schedule();
}
}
Expand Down
Loading
Loading