Crates.io | frcrs |
lib.rs | frcrs |
version | 0.1.1 |
source | src |
created_at | 2024-11-15 00:07:33.326587 |
updated_at | 2024-11-15 02:15:32.948109 |
description | A robotics control framework designed to streamline the development of control systems for FRC robots |
homepage | |
repository | https://github.com/Team-2502/frcrs |
max_upload_size | |
id | 1448450 |
size | 76,437 |
frcrs is a robotics control framework designed to streamline the development of control systems for FRC robots. It provides a highly modular architecture, focusing on creating independent and reusable subsystems to simplify the overall control structure of the robot.
The main design principle of frcrs is to split robot functionality into independent subsystems. Each subsystem is responsible for controlling a specific part of the robot, such as the drivetrain, shooter, or intake mechanism.
Here’s an example of how a subsystem might be implemented in frcrs:
use frcrs::ctre::SRX;
use crate::constants;
pub struct Drivetrain {
left: SRX,
right: SRX
}
impl Drivetrain {
pub fn new() -> Self {
Self {
left: SRX::new(constants::drivetrain::LEFT),
right: SRX::new(constants::drivetrain::RIGHT)
}
}
pub fn drive(&self, left: f64, right: f64) {
self.left.set(-left);
self.right.set(-right);
}
}
See an example here
git clone https://github.com/Team-2502/frcrs.git
cd frcrs
rustup target add arm-unknown-linux-gnueabi
git clone https://github.com/wpilibsuite/allwpilib.git
cd allwpipib
./gradlew installRoborioToolchain
$HOME/.gradle/toolchains/frc/YYYY/roborio/bin
where YYYY
is the year of the toolchaincargo build --release --target arm-unknown-linux-gnueabi
[deploy]
team_number = 2502
executable = "target/arm-unknown-linux-gnueabi/release/robotcode"
lib = "javastub.jar"
frontend = "talon-board/out"
frontend_dest = "/home/lvuser/talon-board/out"
We welcome contributions! If you have suggestions for improvements or find bugs, feel free to create an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.