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

akit to main #299

Merged
merged 94 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
2bc84cc
switch to loggedrobot and basic setup before big io division :)
Oliver-Cushman Jul 31, 2024
0285d58
okay maybe we only need 1 pdh :joy:
Oliver-Cushman Jul 31, 2024
db11fcb
ampper adapted to adv kit
Oliver-Cushman Aug 3, 2024
05f4f8d
i dont even know if this whole io file thing is needed since its gonn…
Oliver-Cushman Aug 3, 2024
ad2c57e
climb converted
Oliver-Cushman Aug 3, 2024
0b23d1c
auto log outputs
Oliver-Cushman Aug 3, 2024
ad19811
voices in my network tables
Oliver-Cushman Aug 4, 2024
ffb2fc2
ok the logging actually works now and we have some new config :D
Oliver-Cushman Aug 5, 2024
da23690
new config
Oliver-Cushman Aug 5, 2024
0bbe48e
elevator migrated
Oliver-Cushman Aug 6, 2024
1d9c047
single subsystem advantagekit conversion any% world record
Oliver-Cushman Aug 6, 2024
81db3dd
gversion
Oliver-Cushman Aug 7, 2024
24133d0
fix implementation
Oliver-Cushman Aug 12, 2024
8bb37fd
intake converted will finish pivot and shooter soon
Oliver-Cushman Aug 13, 2024
90817cd
added current field for inputs and converted shooter
Oliver-Cushman Aug 14, 2024
422dcd9
pivot conversion
RudyG252 Aug 15, 2024
35997b5
end of an era mon ami
PatribotsProgramming Aug 15, 2024
61a4436
Merge branch 'advantagekit' of https://github.com/patribots4738/Cresc…
PatribotsProgramming Aug 15, 2024
59d20a9
log test :)
PatribotsProgramming Aug 15, 2024
bb542ec
start swerve conversion and add pivot applied volts and output current
RudyG252 Aug 15, 2024
19f090e
moved around subsystems
Oliver-Cushman Aug 15, 2024
268254a
sim to realbot
PatribotsProgramming Aug 15, 2024
5b5955e
VSCODE, STOP GENERATING THE WRONG PACKAGE IMPORT AND MY LIFE IS YOURS
Oliver-Cushman Aug 16, 2024
b114434
Merge branch 'advantagekit' of https://github.com/Patribots4738/Cresc…
Oliver-Cushman Aug 16, 2024
2cf0213
new file path
PatribotsProgramming Aug 16, 2024
454f442
Merge branch 'advantagekit' of https://github.com/patribots4738/Cresc…
PatribotsProgramming Aug 16, 2024
89d9666
limelight ass
PatribotsProgramming Aug 16, 2024
85c2021
max swerve module conversion to advantage kit
RudyG252 Aug 19, 2024
5ab73a8
limlery
PatribotsProgramming Aug 19, 2024
084509a
Merge branch 'advantagekit' of https://github.com/patribots4738/Cresc…
PatribotsProgramming Aug 19, 2024
76a8e1e
limelight done + started converting some sim logic
Oliver-Cushman Aug 20, 2024
95993e9
StateConstants.isSimulation()
Oliver-Cushman Aug 20, 2024
6360e5c
sunset
Oliver-Cushman Aug 20, 2024
5ff2ece
remove unused imports
Oliver-Cushman Aug 20, 2024
8790197
bro forgot the outputs
Oliver-Cushman Aug 20, 2024
243b67e
colors inputs gmae is game
PatribotsProgramming Aug 20, 2024
f744b31
update swervemodule inputs in swerve
RudyG252 Aug 20, 2024
3310104
navigate math in MAXSwerveModule from methods to updateInputs, and us…
RudyG252 Aug 20, 2024
4070708
swerve got some logs
RudyG252 Aug 20, 2024
782902a
Merge branch 'advantagekit' of https://github.com/Patribots4738/Cresc…
RudyG252 Aug 20, 2024
2891623
process inputs
Oliver-Cushman Aug 20, 2024
890e746
Merge branch 'advantagekit' of https://github.com/Patribots4738/Cresc…
Oliver-Cushman Aug 20, 2024
7a0a50f
limelight fix but new enemy help help help
PatribotsProgramming Aug 20, 2024
1cb69d6
what
PatribotsProgramming Aug 20, 2024
bc9b899
gyro???
RudyG252 Aug 21, 2024
594f079
Merge branch 'advantagekit' of https://github.com/Patribots4738/Cresc…
RudyG252 Aug 21, 2024
8b009fe
silly silly processing
RudyG252 Aug 21, 2024
1c0af9c
no more pigeon just gyro
RudyG252 Aug 21, 2024
c2379a9
clarify types gyro method names
RudyG252 Aug 21, 2024
4a03e15
I should probably update the method name where I use it too
RudyG252 Aug 21, 2024
e8f1291
single
PatribotsProgramming Aug 21, 2024
e659a36
Merge branch 'advantagekit' of https://github.com/patribots4738/Cresc…
PatribotsProgramming Aug 21, 2024
c02673e
i want gyro
Oliver-Cushman Aug 22, 2024
3803246
important
RudyG252 Aug 22, 2024
3ad4233
die
PatribotsProgramming Aug 22, 2024
f3b4c07
i guess ill just go and die.
PatribotsProgramming Aug 22, 2024
1d2e087
added message to confirm incorrect robor type
Oliver-Cushman Aug 22, 2024
b653a4c
will reimplement the stateconstants version of isSimulation later but…
Oliver-Cushman Aug 22, 2024
c14a957
gmae is game mes amis
PatribotsProgramming Aug 22, 2024
e976c0c
bet
PatribotsProgramming Aug 23, 2024
183b745
unc please
Oliver-Cushman Aug 25, 2024
45c84ee
she heron on my formula till i hooksUp
Oliver-Cushman Aug 25, 2024
40abe2c
is this the controller of the summer ???
Oliver-Cushman Aug 26, 2024
6126088
ill do akit log paths tomorrow i promise
Oliver-Cushman Aug 26, 2024
6f60832
log
Oliver-Cushman Aug 26, 2024
e190c41
i hate robors they are BAD BOYS.
PatribotsProgramming Aug 26, 2024
d9d7964
purge.
Oliver-Cushman Aug 27, 2024
a5acf48
one left
PatribotsProgramming Aug 27, 2024
9adebca
oliver said to push
RudyG252 Aug 27, 2024
ebd6ea7
Merge branch 'advantagekit' of https://github.com/Patribots4738/Cresc…
RudyG252 Aug 27, 2024
be5da1a
the smart is dashboard for da field
PatribotsProgramming Aug 27, 2024
585931e
Merge branch 'advantagekit' of https://github.com/patribots4738/Cresc…
PatribotsProgramming Aug 27, 2024
9b3c04d
fix bootloop, preset setup should be done but I can't test in sim the…
RudyG252 Aug 28, 2024
e4f2033
Merge branch 'advantagekit' of https://github.com/Patribots4738/Cresc…
RudyG252 Aug 28, 2024
f9a3fe0
welcome lpi to the akit avengers
Oliver-Cushman Aug 28, 2024
4ad314d
the frank that pushes to main would call these guys "pesky little fri…
Oliver-Cushman Aug 28, 2024
2c19b91
new robot type because i dont want to keep switching it
Oliver-Cushman Aug 28, 2024
b5203ff
no more arguments we're all friends here
RudyG252 Aug 29, 2024
9e8367a
lost no more
RudyG252 Aug 29, 2024
29000a5
jit
PatribotsProgramming Aug 30, 2024
86ec931
mr davis units correction
Oliver-Cushman Sep 11, 2024
1a5c7a9
mild cleanup on limelight akit inputs
Oliver-Cushman Sep 12, 2024
3022525
were so back
PatribotsProgramming Sep 13, 2024
ec88cc9
Revert "were so back"
PatribotsProgramming Sep 19, 2024
a993021
aint no party
PatribotsProgramming Sep 19, 2024
0659d4a
banging wings are back in town san diego california
PatribotsProgramming Sep 19, 2024
ff3b42a
wheel rad and infinite can errors
PatribotsProgramming Sep 20, 2024
26b7386
input execution
Oliver-Cushman Sep 23, 2024
527aee5
update deps
Oliver-Cushman Sep 23, 2024
10222a7
tuned to 12 feet - should run through speeds again
PatribotsProgramming Sep 24, 2024
2eb2e92
new shooter map to 13
PatribotsProgramming Sep 26, 2024
cfae0fd
override overload
Oliver-Cushman Sep 26, 2024
b08011f
make heron implementation less dumb
Oliver-Cushman Sep 26, 2024
00de768
the batman riddler does he know image
Oliver-Cushman Sep 26, 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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This gitignore has been specially created by the WPILib team.
# If you remove items from this file, intellisense might break.

BuildConstants.java

### C++ ###
# Prerequisites
*.d
Expand Down
36 changes: 36 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2024.3.2"
id "com.peterabeles.gversion" version "1.10"
}

repositories {
Expand All @@ -17,6 +18,7 @@ def ROBOT_MAIN_CLASS = "frc.robot.Main"
// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
deploy {

targets {
roborio(getTargetTypeClass('RoboRIO')) {
// Team number is loaded either from the .wpilib/wpilib_preferences.json
Expand Down Expand Up @@ -72,6 +74,9 @@ dependencies {
simulationRelease wpi.sim.enableRelease()

implementation 'com.github.shueja:Monologue:v1.0.0-beta6'

def akitJson = new groovy.json.JsonSlurper().parseText(new File(projectDir.getAbsolutePath() + "/vendordeps/AdvantageKit.json").text)
annotationProcessor "org.littletonrobotics.akit.junction:junction-autolog:$akitJson.version"
}

test {
Expand Down Expand Up @@ -102,3 +107,34 @@ wpi.java.configureTestTasks(test)
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
}

repositories {
maven {
url = uri("https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit")
credentials {
username = "Mechanical-Advantage-Bot"
password = "\u0067\u0068\u0070\u005f\u006e\u0056\u0051\u006a\u0055\u004f\u004c\u0061\u0079\u0066\u006e\u0078\u006e\u0037\u0051\u0049\u0054\u0042\u0032\u004c\u004a\u006d\u0055\u0070\u0073\u0031\u006d\u0037\u004c\u005a\u0030\u0076\u0062\u0070\u0063\u0051"
}
}
mavenLocal()
}

configurations.all {
exclude group: "edu.wpi.first.wpilibj"
}

task(checkAkitInstall, dependsOn: "classes", type: JavaExec) {
mainClass = "org.littletonrobotics.junction.CheckInstall"
classpath = sourceSets.main.runtimeClasspath
}
compileJava.finalizedBy checkAkitInstall

project.compileJava.dependsOn(createVersionFile)
gversion {
srcDir = "src/main/java/"
classPackage = "frc.robot"
className = "BuildConstants"
dateFormat = "yyyy-MM-dd HH:mm:ss z"
timeZone = "America/Los_Angeles" // Use preferred time zone
indent = " "
}
38 changes: 35 additions & 3 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@

import java.util.Optional;

import org.littletonrobotics.junction.LogFileUtil;
import org.littletonrobotics.junction.LoggedRobot;
import org.littletonrobotics.junction.Logger;
import org.littletonrobotics.junction.networktables.NT4Publisher;
import org.littletonrobotics.junction.wpilog.WPILOGReader;
import org.littletonrobotics.junction.wpilog.WPILOGWriter;
import org.littletonrobotics.urcl.URCL;

import edu.wpi.first.wpilibj.DataLogManager;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.RobotController;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import frc.robot.util.Constants.AutoConstants;
import frc.robot.util.Constants.DriveConstants;
import frc.robot.util.Constants.FieldConstants;
import frc.robot.util.Constants.NeoMotorConstants;
import frc.robot.util.Constants.LoggingConstants;
import frc.robot.util.rev.Neo;
import frc.robot.util.rev.NeoPhysicsSim;
import monologue.Monologue;
Expand All @@ -28,7 +35,7 @@
* build.gradle file in the
* project.
*/
public class Robot extends TimedRobot {
public class Robot extends LoggedRobot {

private static Optional<Alliance> alliance = Optional.empty();
public static GameMode gameMode = GameMode.DISABLED;
Expand All @@ -48,8 +55,33 @@ public static enum GameMode {

@Override
public void robotInit() {

// Git metadata for tracking version for AKit
Logger.recordMetadata("ProjectName", BuildConstants.MAVEN_NAME);
Logger.recordMetadata("BuildDate", BuildConstants.BUILD_DATE);
Logger.recordMetadata("GitSHA", BuildConstants.GIT_SHA);
Logger.recordMetadata("GitDate", BuildConstants.GIT_DATE);
Logger.recordMetadata("GitBranch", BuildConstants.GIT_BRANCH);

switch (LoggingConstants.getMode()) {
case REAL:
Logger.addDataReceiver(new WPILOGWriter("/media/sda1/logs")); // Log to a USB stick ("/U/logs")
Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
break;
case REPLAY:
String logPath = LogFileUtil.findReplayLog(); // Pull the replay log from AdvantageScope (or prompt the user)
Logger.setReplaySource(new WPILOGReader(logPath)); // Read replay log
Logger.addDataReceiver(new WPILOGWriter(LogFileUtil
.addPathSuffix(logPath, "_sim"))); // Save outputs to a new log
break;
case SIM:
Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
break;
}

Logger.start();

robotContainer = new RobotContainer();
Monologue.setupMonologue(robotContainer, "Robot/Draggables", false, true);

DataLogManager.start();
DataLogManager.logNetworkTables(true);
Expand Down
Loading
Loading