Skip to content

Commit a5f0d30

Browse files
committed
Merge branch 'main' into dylan-auton
2 parents 98c1ed1 + cfed219 commit a5f0d30

File tree

260 files changed

+17994
-7559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+17994
-7559
lines changed
10.6 MB
Binary file not shown.
Binary file not shown.
8.93 MB
Binary file not shown.

akit-logs/elevatory-broky.wpilog

53.5 MB
Binary file not shown.

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "java"
3-
id "edu.wpi.first.GradleRIO" version "2025.3.1"
3+
id "edu.wpi.first.GradleRIO" version "2025.3.2"
44
id "com.peterabeles.gversion" version "1.10"
55
id "com.diffplug.spotless" version "6.12.0"
66
id 'org.jetbrains.kotlin.jvm'
@@ -43,10 +43,10 @@ deploy {
4343

4444
// The options below may improve performance, but should only be enabled on the RIO 2
4545
//
46-
// final MAX_JAVA_HEAP_SIZE_MB = 100;
47-
// jvmArgs.add("-Xmx" + MAX_JAVA_HEAP_SIZE_MB + "M")
48-
// jvmArgs.add("-Xms" + MAX_JAVA_HEAP_SIZE_MB + "M")
49-
// jvmArgs.add("-XX:+AlwaysPreTouch")
46+
final MAX_JAVA_HEAP_SIZE_MB = 100;
47+
jvmArgs.add("-Xmx" + MAX_JAVA_HEAP_SIZE_MB + "M")
48+
jvmArgs.add("-Xms" + MAX_JAVA_HEAP_SIZE_MB + "M")
49+
jvmArgs.add("-XX:+AlwaysPreTouch")
5050
}
5151

5252
// Static files artifact
@@ -55,7 +55,7 @@ deploy {
5555
directory = '/home/lvuser/deploy'
5656
// Change to true to delete files on roboRIO that no
5757
// longer exist in deploy directory on roboRIO
58-
deleteOldFiles = false
58+
deleteOldFiles = true
5959
}
6060
}
6161
}
@@ -103,6 +103,8 @@ dependencies {
103103
def akitJson = new groovy.json.JsonSlurper().parseText(new File(projectDir.getAbsolutePath() + "/vendordeps/AdvantageKit.json").text)
104104
annotationProcessor "org.littletonrobotics.akit:akit-autolog:$akitJson.version"
105105
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
106+
107+
implementation 'gov.nist.math:jama:1.0.3'
106108
}
107109

108110
test {

readme.md

Lines changed: 9 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,18 @@
11

22

3-
# Swerve Base Template :: Steel Hawks
3+
# Chimera :: Steel Hawks
44
![Logo](https://www.steelhawks.net/logo.svg)
55

6-
7-
## Authors
8-
9-
- [@steelhawks](https://www.github.com/steelhawks)
10-
- [@farhanj2](https://www.github.com/farhanj2)
11-
12-
136
## Acknowledgements
147

15-
- [WPILIB Version: v2025.1.1](https://github.com/wpilibsuite/allwpilib/releases/tag/v2025.1.1)
16-
17-
18-
19-
## Project Structure
20-
21-
# Project File Structure
22-
23-
```plaintext
24-
SwerveTemplate/
25-
├── src/
26-
│ ├── main/
27-
│ │ │
28-
│ │ deploy/
29-
│ │ │
30-
│ │ └── java/
31-
│ │ ├── org.steelhawks/
32-
│ │ │ ├── commands/
33-
│ │ │ │ ├── SuperStructure.java # The command factory for commands that require multiple subsystems
34-
│ │ │ │ ├── DriveCommands.java # The command factory for commands for driving the robot, including pathfinding and auton
35-
│ │ │ ├── generated/ # The folder with the generated TunerConstants from CTRE's Swerve tuner on Phoenix Tuner X
36-
│ │ │ │ ├── TunerConstants.java # The generated TunerConstants from CTRE's Swerve tuner on Phoenix Tuner X
37-
│ │ │ ├── util/ # The folder with all custom libraries, such as vision with Limelight, and implementations in code such as odometry.]
38-
│ │ │ │ ├── AllianceFlip.java # A helper class that flips the robot's pose coordinates and rotation based on the alliance
39-
│ │ │ │ ├── Conversions.java # A helper class in converting between obscure units
40-
│ │ │ │ ├── DashboardTrigger.java # A helper class that triggers a command when a button is pressed from the iPad app HawkControl. This can be used in tandem with a controller.
41-
│ │ │ │ ├── LocalADStarAK.java # A helper class that implements the A* algorithm for pathfinding
42-
│ │ │ │ ├── PhoenixUtil.java # A helper class that contains utility functions for Phoenix motor controllers
43-
│ │ │ │ ├── TunableNumber.java # A helper class which allows for tuning of numbers in the AdvantageScope, without redeploying each time a number is changed
44-
│ │ │ ├── subsystems/ # The main folder where all the subsystem logic is written
45-
│ │ │ │ ├── swerve/ # The folder with all the swerve logic
46-
│ │ │ │ │ ├── GyroIO.java # The IO Interface for the Gyro
47-
│ │ │ │ │ ├── GyroIONavX.java # The IO Implementation for the NavX
48-
│ │ │ │ │ ├── GyroIOPigeon2.java # The IO Implementation for the Pigeon2 (Most likely the main gyro)
49-
│ │ │ │ │ ├── ModuleIO.java # The IO Interface for a SwerveModule
50-
│ │ │ │ │ ├── ModuleIOSim.java # The IO Implementation for a SwerveModule in the simulator
51-
│ │ │ │ │ ├── ModuleIOTalonFX.java # The IO Implementation for a SwerveModule for TalonFX motors
52-
│ │ │ │ │ ├── PhoenixOdometryThread.java # A daemon thread that runs the odometry calculations
53-
│ │ │ │ │ ├── Swerve.java # The main subsystem that controls the movement of the drivetrain
54-
│ │ │ │ │ ├── SwerveModule.java # The helper file for a SwerveModule, taking in a ModuleIO in its constructor
55-
│ │ │ │ ├── LED.java # The subsystem that controls the LEDs
56-
│ │ │ ├── Constants.java # Configuration for motor ports, speeds, etc
57-
│ │ │ ├── Autos.java # Configuration for Autonomous commands and to use vision or not
58-
│ │ │ ├── BuildConstants.java # Gets the Git status of the code such as if it is dirty, time of commit, etc. This is generated when code is deployed
59-
│ │ │ ├── SwerveModule.java # Controls individual module's speed and direction
60-
│ │ │ ├── OperatorLock.java # Enum to control different key mappings
61-
│ │ │ ├── RobotMode.java # Enum to control different key mappings
62-
│ │ │ └── RobotContainer.java # Manages controls and subsystems
63-
│ └── test/
64-
│ └── java/ # Unit tests (if any)
65-
├── vendordeps/ # External vendor libraries
66-
├── build.gradle # Gradle build file
67-
├── settings.gradle # Gradle settings
68-
└── WPILib-License.md # WPILib license info
69-
```
70-
71-
## Explanation of Project Structure
72-
73-
### Root Directory
74-
- **`build.gradle`**: Defines project dependencies, build tasks, and configuration for Gradle.
75-
- **`settings.gradle`**: Specifies project settings and root directory info for Gradle.
76-
- **`vendordeps/`**: Contains vendor dependency files, crucial for hardware interfaces (e.g., CTRE or Rev Robotics libraries).
77-
- **`WPILib-License.md`**: Licensing information for WPILib, which provides the core libraries for FRC robot programming.
78-
79-
### `src/main/java/org/steelhawks/`
80-
- **`Constants.java`**: Holds all constant values, such as motor ports, PID settings, and other configurations.
81-
- **`SwerveModule.java`**: Manages each swerve module’s direction and speed, allowing independent control over each wheel.
82-
- **`RobotContainer.java`**: Links subsystems, commands, and input devices, acting as the central command hub for the robot code.
83-
- **`OperatorLock.java`** & **`RobotMode.java`**: Enumerations that handle different control modes and operator mappings for flexible user input setups.
84-
85-
### Commands
86-
- **`commands/SuperStructure.java`**: A command factory for handling complex commands involving multiple subsystems, making it easier to coordinate between drivetrain, intake, and shooter, if applicable.
87-
- **`commands/DriveCommands.java`**: A command factory for handling driving commands such as pathfinding, autonomous routines, and other drivetrain-specific tasks.
88-
89-
### `subsystems/`
90-
- **`Swerve.java`**: Main subsystem that manages the swerve drive logic, allowing the robot to move omnidirectionally by coordinating individual `SwerveModule` instances.
8+
- [WPILIB Version: v2025.3.2](https://github.com/wpilibsuite/allwpilib/releases/tag/v2025.3.2)
919

92-
### `util/`
93-
- **Utility Code**: This folder is designed to store helper classes and utilities that support core functionality, like math utilities, sensor handling, or other common tasks.
9410

95-
### `src/test/java`
96-
- **Testing**: Contains unit tests or simulation-based tests, allowing verification of subsystem and command behavior in a safe environment.
9711

98-
# Tuning
99-
<p>When you make a clone of this repo, make sure to change the following.</p>
100-
<p>1. Set the name of your robot at ROBOT_NAME in Constants.java</p>
101-
<p>2. Identify and tune the swerve drive using CTRE's Swerve Drive Generator. Information on this can be found <a href="https://v6.docs.ctr-electronics.com/en/2024/docs/tuner/tuner-swerve/creating-your-project.html">here</a>.</p>
102-
<p>3. Once done, start tuning Pathplanner. This can be done by first creating a straight line to tune the translation PID, then using that same line, but adding a full 360º turn to tune the rotation PID.</p>
103-
<p>4. Do a full and through recheck of all your code to see if anything is off or incorrect before proceeding to writing more code. This will save you in the long run.</p>
12+
## Robot Mechanisms
13+
- Swerve: Mk4n L3 drivetrain for quick cycles
14+
- Elevator: Scores from L1-L4
15+
- Claw: Static end effector at 35 degrees which holds and scores coral
16+
- Arm: Pivoting mechanism used to knock algae off the reef
17+
- PhotonVision: Four cameras around the robot used to add to our global and local pose estimators
18+
- LEDs: Used for driver indication

src/deploy/pathplanner/navgrid.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)