Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PROD_FLAG=false
PROD_FLAG=true
62 changes: 7 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,15 @@
# PWRUP Command Robot Base

## Introduction

Welcome to the **PWRUP Command Robot Base**! This repository serves as the foundation for building command-based robots that our team will create in the years ahead. By providing a structured framework, essential libraries, and key features, this template aims to streamline the development process and set our robots up for success.

### Key Benefits:
- **Modularity:** Easily fork this repository to kickstart a new robot project.
- **Reusability:** Built-in features and libraries ensure consistency and speed up development.
- **Scalability:** Designed to be expanded with additional functionality as our team's needs grow.

---

## Functionality

This template provides the core structure for building robots using the **Command-Based Programming** model. It includes essential features and tools to simplify the creation and deployment of robot software, ensuring that our team has a solid base to work from.

### Use Case:
When a new robot project is started, the team can **fork** this repository, allowing them to focus on adding custom code specific to their robot, while benefiting from the standardized tools and libraries already included.
# SPAMURAI

---

## Features Overview

This repository includes several pre-configured features and libraries to accelerate development and promote best practices. As the team’s requirements evolve, we’ll continue to integrate more functionalities.

### Current Features:
## TODO

1. **[Source vs. Online Library Building](./docs/SourceBuildingPlugin.md)**:
- Enables developers to decide whether to build the robot software from the **latest source code** or from a pre-built **online library**.
- This flexibility is particularly useful when working under tight deadlines or experimenting with local changes without needing to push to GitHub.
- See the detailed documentation [here](./docs/SourceBuildingPlugin.md).
Todo can be found in the [TODO.md](TODO.md) file.

### Future Expansion:
- Additional libraries and features will be added as the team's needs grow, ensuring the template evolves with the requirements of our robot projects.

---

## Getting Started

### 1. Forking the Repository
To create a new robot, simply **fork this repository** and start adding your custom robot code. The template is designed to be modular, allowing you to build upon it with minimal configuration.

### 2. Using the Build System
By default, the repository is configured to use Gradle, with a built-in option for selecting **source vs. online builds**. This ensures that whether you're pulling the latest version of a library from a repository or building locally, the process is seamless.

Refer to the [SourceBuildingPlugin.md](./docs/SourceBuildingPlugin.md) for more information on configuring the build system based on your current needs.

### 3. Customizing Your Robot Code
Once you've forked the repository:
- Add your custom subsystems, commands, and robot logic.
- Leverage the pre-configured structure to ensure your robot code adheres to best practices and command-based programming principles.

---
## Building

## Contribution Guidelines
This project requires (at the moment) the "PROD_FLAG" to be set to "true" in the ".env" file. This will essentially clone the dependencies from github and manually build them. Turning this off will make this NOT build!

If you have ideas for new features or improvements to this template, please feel free to:
1. Fork the repository.
2. Create a branch for your feature or fix.
3. Submit a pull request with detailed information about the changes.
## Config

We encourage all team members to contribute to this repository so that it continues to meet the evolving needs of our robot projects.
The configs for teleop/auto/other can be found in the /config/ folder. Please read the [documentation](https://github.com/lolhol/KeybindConfigurator) of KeybindConfigurator for more information. All the initiation code is found in the /initiate/ folder (inside src).
3 changes: 3 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This is a list of things that we have to make.

1. possibly migrate to LUA config for ease of use since you cannot import .toml files in KeybindConfigurator
28 changes: 17 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ deploy {
files = project.fileTree('src/main/deploy')
directory = '/home/lvuser/deploy'
}

frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
files = project.fileTree('config')
directory = '/home/lvuser/config'
}
}
}
}
Expand Down Expand Up @@ -66,9 +71,9 @@ dependencies {
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()

// addGithubRepoJitPack("lolhol", "KeybindConfigurator", "0.2") // Example usage

addGithubRepoJitPack("lolhol", "KeybindConfigurator", "0.2")

implementation 'com.moandjiezana.toml:toml4j:0.7.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
Expand Down Expand Up @@ -97,7 +102,7 @@ wpi.java.configureTestTasks(test)

// Configure the string concatenation setting for inline compilation
tasks.withType(JavaCompile) {
options.compilerArgs.add '-XDstringConcat=inline'
options.compilerArgs.addAll(['-XDstringConcat=inline', '-Xlint:unchecked'])
}

// ---------------- Helper functions ----------------
Expand Down Expand Up @@ -142,20 +147,21 @@ def addGithubRepo(String user, String repo, String nonProductionImplementationSt
println("")
println("")

def jarFiles = fileTree(dir: "lib/build", include: '*.jar').filter { jarFile ->
!alreadyAdded.contains(jarFile)
def jarFiles = fileTree(dir: "lib/build", include: "**/*.jar")
println("Adding to dependencies:")

jarFiles.each { jarFile ->
println(jarFile.path)
}

dependencies {
implementation files(jarFiles)
}

alreadyAdded.addAll(jarFiles)

return;
}

dependencies {
implementation nonProductionImplementationString
} else {
dependencies {
implementation nonProductionImplementationString
}
}
}
Empty file added config/auto-config.toml
Empty file.
2 changes: 2 additions & 0 deletions config/teleop-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[testingFunction]
arg0 = "Initiating Teleop with 'testingFunction'!"
1 change: 1 addition & 0 deletions networktables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
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
}
}
19 changes: 0 additions & 19 deletions src/main/java/frc/robot/Constants.java

This file was deleted.

15 changes: 1 addition & 14 deletions src/main/java/frc/robot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,11 @@

import edu.wpi.first.wpilibj.RobotBase;

/**
* Do NOT add any static variables to this class, or any initialization at all.
* Unless you know what
* you are doing, do not modify this file except to change the parameter class
* to the startRobot
* call.
*/
public final class Main {
private Main() {
}

/**
* Main initialization function. Do not perform any initialization here.
*
* <p>
* If you change your main robot class, change the parameter type.
*/
public static void main(String... args) {
RobotBase.startRobot(Robot::new);
}
}
}
Loading