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

Mating #12

Merged
merged 66 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
2de603c
Merge pull request #1 from RoboLancers/dev
Gitter499 Jan 9, 2024
67acf3f
fix(CI): Fixed workflow file typo
Gitter499 Jan 19, 2024
c506f87
fix(CI): Added BuildConstants
Gitter499 Jan 19, 2024
edadb26
feat(indexer): Added first iteration of indexer subsystem
Gitter499 Jan 19, 2024
215b484
feat(indexer): Added IndexNote command
Gitter499 Jan 19, 2024
b55bff6
feat(pivot): Added first iteration of pivot subsystem
Gitter499 Jan 19, 2024
68deeee
feat(shooter): Added
Gitter499 Jan 19, 2024
0cb29dd
feat(misc): Added tuning utility
Gitter499 Jan 19, 2024
35ba87f
major indexer refactoring: renamed members, changed access modifiers,…
mattperls-code Jan 19, 2024
e3bdc4b
major pivot refactoring: renamed members, changed access modifiers, n…
mattperls-code Jan 19, 2024
1f36c62
fixed use controller to use motion profile setpoint as feed forward i…
mattperls-code Jan 19, 2024
bf8f475
intakeretractor feat?
koolfyn Jan 20, 2024
c279ee0
intakeretractor: feat??
koolfyn Jan 20, 2024
995665c
major refactoring: singleton pattern, changed a lot of names and modi…
mattperls-code Jan 20, 2024
6377635
Add files via upload
Floofyer Jan 21, 2024
17f7cb4
Add files via upload
Floofyer Jan 23, 2024
7993058
Added intake
Floofyer Jan 24, 2024
d7f5a07
Fixed some github problems
Floofyer Jan 24, 2024
7f7b8e3
dababy
koolfyn Jan 24, 2024
95e468d
intakeretractor feat?
koolfyn Jan 20, 2024
deba2c4
intakeretractor: feat??
koolfyn Jan 20, 2024
8035094
major refactoring: singleton pattern, changed a lot of names and modi…
mattperls-code Jan 20, 2024
f3cde3a
dababy
koolfyn Jan 24, 2024
ff62d91
Merge branch 'dev-intakeretractor' of https://github.com/koolfyn/321-…
koolfyn Jan 24, 2024
61e5548
Merge branch 'dev' into dev-intake
Gitter499 Jan 24, 2024
9f3d8b1
Fixed the mistakes
Floofyer Jan 24, 2024
493e858
Merge branch 'dev-intake' of https://github.com/Floofyer/321-Crescend…
Floofyer Jan 24, 2024
b663999
fix(CI): Fixed formatting bug
Gitter499 Jan 25, 2024
052077f
feat(indexer): Moved IndexNote command to Indexer
Gitter499 Jan 25, 2024
3ee9bb8
feat(launcher): Added InterpolationTable and MathUtils
Gitter499 Jan 25, 2024
7d42246
feat(pivot): Added Interpolation to pivot pitch angle and basic comma…
Gitter499 Jan 25, 2024
d8715d4
feat(shooter): Added basic shooter with interpolation and FF
Gitter499 Jan 25, 2024
432552c
feat(launcher): Added basic yeet commands
Gitter499 Jan 25, 2024
e1e6570
feat(launcher): Made stuff final
Gitter499 Jan 25, 2024
e17908b
made changes and todos for launcher. refactored some names, modifiers…
mattperls-code Jan 26, 2024
af3d686
small change to instantiation of subsystems in commands
mattperls-code Jan 26, 2024
37acd55
camel case
mattperls-code Jan 26, 2024
b341dc6
chore(intake): Ran spotless
koolfyn Jan 26, 2024
97ab51f
Added FF to intake
Floofyer Jan 26, 2024
996ae50
Spotless done
Floofyer Jan 26, 2024
f1ac556
refactored naming, changed modifiers, and reoganized a bit. configura…
mattperls-code Jan 28, 2024
b9c55d0
final refactor for retractor. changed class name, enum name for clari…
mattperls-code Jan 28, 2024
abf90d9
Did the todo's and made a minor change to commands.
Floofyer Jan 29, 2024
ad923f7
Spotless
Floofyer Jan 29, 2024
1fa642c
final refactor, ready to be merged with retractor
mattperls-code Jan 29, 2024
30829d1
spotless
mattperls-code Jan 29, 2024
b4887b9
spotless
mattperls-code Jan 29, 2024
dd5799e
Merge pull request #9 from koolfyn/dev-intakeretractor
mattperls-code Jan 29, 2024
6e23e02
combined retractor and sucker into intake single parent subsystem
mattperls-code Jan 29, 2024
ea731d4
combined retractor and sucker into one parent subsystem
mattperls-code Jan 29, 2024
98ec876
combined launcher subsystems, need to clean up beam break usage and r…
mattperls-code Jan 29, 2024
915f6da
slight changes, todos to be done
mattperls-code Jan 29, 2024
641002e
feat(launcher): Added AimTable, refactored some code, and added index…
Gitter499 Jan 30, 2024
c87fef6
feat(launcher): Added AimTable, refactored some code, and added index…
Gitter499 Jan 30, 2024
d44f88c
feat(mating): Added MateAndShoot command. Waiting for Matt to refacto…
Gitter499 Jan 30, 2024
5382e24
fixed mate command, renamed some methods and commands
mattperls-code Jan 30, 2024
ead4df9
spotless
mattperls-code Jan 30, 2024
6aeed22
chore(aim-table): Wrote unit tests and fixed bugs
Gitter499 Feb 2, 2024
ecf2a4e
chore(aim-table): Wrote unit tests and fixed bugs
Gitter499 Feb 2, 2024
777d399
working changes for tuning
mattperls-code Feb 14, 2024
363353e
initial constants for pivot and flywheel that will probably change, a…
mattperls-code Feb 15, 2024
6841d1a
retractor is tuned, potentially will change based on gearing
mattperls-code Feb 15, 2024
2fa30fe
pivot is tuned, maybe adjust motion profile speed and acceleration
mattperls-code Feb 16, 2024
4ea99f4
made pivot and retractor use the same conventions, refactored some st…
mattperls-code Feb 16, 2024
9027f51
config stuff
mattperls-code Feb 16, 2024
f96c9ea
both arms work and velocity control is ready to be tuned
mattperls-code Feb 16, 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
26 changes: 15 additions & 11 deletions 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"
id 'com.diffplug.spotless' version '6.12.0'
id "com.peterabeles.gversion" version "1.10"
}
Expand Down Expand Up @@ -52,6 +52,7 @@ def includeDesktopSupport = false
dependencies {
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()
implementation 'org.jetbrains:annotations:24.0.0'

roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
Expand All @@ -68,6 +69,7 @@ dependencies {
simulationRelease wpi.sim.enableRelease()

testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testImplementation 'org.junit.platform:junit-platform-launcher:1.8.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

Expand Down Expand Up @@ -104,14 +106,16 @@ spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**','**/BuildConstants.java'
exclude '**/build/**', '**/build-*/**','src/main/java/org/robolancers321/BuildConstants.java'
}

toggleOffOn()
googleJavaFormat().reflowLongStrings()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()


licenseHeader '/* (C) Robolancers 2024 */'
}
kotlin {
Expand Down Expand Up @@ -156,12 +160,12 @@ spotless {
}
}

project.compileJava.dependsOn(createVersionFile)
gversion {
srcDir = "src/main/java/"
classPackage = "org.robolancers321"
className = "BuildConstants"
dateFormat = "yyyy-MM-dd HH:mm:ss z"
timeZone = "America/New_York" // Use preferred time zone
indent = " "
}
// project.compileJava.dependsOn(createVersionFile)
// // gversion {
// // srcDir = "src/main/java/"
// // classPackage = "org.robolancers321"
// // className = "BuildConstants"
// // dateFormat = "yyyy-MM-dd HH:mm:ss z"
// // timeZone = "America/New_York" // Use preferred time zone
// // indent = " "
// // }
Empty file modified gradlew
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions networktables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ pluginManagement {
}
}

Properties props = System.getProperties();
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
Properties props = System.getProperties()
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true")
92 changes: 92 additions & 0 deletions simgui-ds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"keyboardJoysticks": [
{
"axisConfig": [
{
"decKey": 65,
"incKey": 68
},
{
"decKey": 87,
"incKey": 83
},
{
"decKey": 69,
"decayRate": 0.0,
"incKey": 82,
"keyRate": 0.009999999776482582
}
],
"axisCount": 3,
"buttonCount": 4,
"buttonKeys": [
90,
88,
67,
86
],
"povConfig": [
{
"key0": 328,
"key135": 323,
"key180": 322,
"key225": 321,
"key270": 324,
"key315": 327,
"key45": 329,
"key90": 326
}
],
"povCount": 1
},
{
"axisConfig": [
{
"decKey": 74,
"incKey": 76
},
{
"decKey": 73,
"incKey": 75
}
],
"axisCount": 2,
"buttonCount": 4,
"buttonKeys": [
77,
44,
46,
47
],
"povCount": 0
},
{
"axisConfig": [
{
"decKey": 263,
"incKey": 262
},
{
"decKey": 265,
"incKey": 264
}
],
"axisCount": 2,
"buttonCount": 6,
"buttonKeys": [
260,
268,
266,
261,
269,
267
],
"povCount": 0
},
{
"axisCount": 0,
"buttonCount": 0,
"povCount": 0
}
]
}
10 changes: 10 additions & 0 deletions simgui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"NTProvider": {
"types": {
"/FMSInfo": "FMSInfo"
}
},
"NetworkTables Info": {
"visible": true
}
}
14 changes: 7 additions & 7 deletions src/main/java/org/robolancers321/BuildConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ public final class BuildConstants {
public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "321-Crescendo-2024";
public static final String VERSION = "unspecified";
public static final int GIT_REVISION = 4;
public static final String GIT_SHA = "890b1f13f053a4a882dc48c8de3887bfe2f9294f";
public static final String GIT_DATE = "2024-01-18 19:40:03 EST";
public static final String GIT_BRANCH = "dev";
public static final String BUILD_DATE = "2024-01-18 19:43:26 EST";
public static final long BUILD_UNIX_TIME = 1705625006821L;
public static final int DIRTY = 1;
public static final int GIT_REVISION = 26;
public static final String GIT_SHA = "98ec876acf210c51a7146e70cdaf9765448c192a";
public static final String GIT_DATE = "2024-01-29 15:02:18 EST";
public static final String GIT_BRANCH = "dev-launcher-4";
public static final String BUILD_DATE = "2024-01-29 15:36:21 EST";
public static final long BUILD_UNIX_TIME = 1706560581324L;
public static final int DIRTY = 0;

private BuildConstants(){}
}
12 changes: 12 additions & 0 deletions src/main/java/org/robolancers321/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@

import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import org.robolancers321.subsystems.intake.Intake;
import org.robolancers321.subsystems.launcher.Launcher;

public class RobotContainer {
Intake intake;
Launcher launcher;

public RobotContainer() {
this.intake = Intake.getInstance();
this.launcher = Launcher.getInstance();

this.intake.retractor.setDefaultCommand(this.intake.retractor.tuneControllers());
this.launcher.pivot.setDefaultCommand(this.launcher.pivot.tuneControllers());
this.launcher.flywheel.setDefaultCommand(this.launcher.flywheel.tuneController());

configureBindings();
}

Expand Down
31 changes: 31 additions & 0 deletions src/main/java/org/robolancers321/commands/Mate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* (C) Robolancers 2024 */
package org.robolancers321.commands;

import edu.wpi.first.wpilibj2.command.ParallelCommandGroup;
import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import java.util.function.DoubleSupplier;
import org.robolancers321.subsystems.intake.Intake;
import org.robolancers321.subsystems.launcher.Launcher;

public class Mate extends SequentialCommandGroup {
private Intake intake;
private Launcher launcher;

public Mate(DoubleSupplier distanceSupplier) {
// TODO
/*

this.intake = Intake.getInstance();
this.launcher = Launcher.getInstance();

addCommands(
new ParallelCommandGroup(
this.intake.retractor.moveToMating(), this.launcher.pivot.moveToMating()),
new ParallelRaceGroup(this.intake.sucker.out(), this.launcher.acceptHandoff()));

addRequirements(this.intake, this.launcher);

*/
}
}
40 changes: 40 additions & 0 deletions src/main/java/org/robolancers321/subsystems/intake/Intake.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* (C) Robolancers 2024 */
package org.robolancers321.subsystems.intake;

import edu.wpi.first.wpilibj2.command.SubsystemBase;

public class Intake extends SubsystemBase {
/*
* Singleton
*/

private static Intake instance = null;

public static Intake getInstance() {
if (instance == null) instance = new Intake();

return instance;
}

/*
* Constants
*/

// TODO: implement beam break

/*
* Implementation
*/

public final Retractor retractor;

// TODO
// public final Sucker sucker;

private Intake() {
this.retractor = Retractor.getInstance();

// TODO
// this.sucker = Sucker.getInstance();
}
}
Loading
Loading