This repository contains development and testing code for Team 2408's swerve drive implementation for the 2025 season. This is an experimental/practice codebase focused on prototyping and testing swerve drive configurations, and serves as a development ground for our competition robot's drive system.
- Develop and test swerve drive implementations
- Experiment with different control algorithms
- Test hardware configurations
- Document findings for competition implementation
- Train team members on swerve drive concepts
- WPILib 2024.1.1 or newer
- Visual Studio Code
- Git
- WPILib VS Code extension
- REVLib vendor library
- Phoenix vendor library
-
Install required software:
# Clone repository git clone https://github.com/FRCTeam2408/2025_Swerve_Test_1.git cd 2025_Swerve_Test_1 # Build project ./gradlew build
-
Configure VSCode:
- Open project in VSCode
- Install recommended extensions
- Set Java path to WPILib JDK
- Enable format on save
Swerve Module Layout:
Front Left (ID: 1) Front Right (ID: 2)
Back Left (ID: 3) Back Right (ID: 4)
Components per module:
- Drive Motor: [Type TBD]
- Turn Motor: [Type TBD]
- Absolute Encoder: [Type TBD]
- Relative Encoder: [Type TBD]
Additional Sensors:
- Gyro: [Type TBD]
src/main/java/frc/robot/
├── subsystems/
│ └── swerve/ # Swerve drive implementation
│ ├── module/ # Individual module control
│ └── states/ # Module states and kinematics
├── commands/
│ └── swerve/ # Swerve drive commands
├── constants/ # Configuration constants
└── utils/ # Utility classes and helper functions
-
Create a branch for your work:
git checkout -b feature/your-feature-name
-
Make changes and commit:
git add . git commit -m "type(scope): description - Detail 1 - Detail 2"
-
Push changes:
git push origin feature/your-feature-name
-
Create pull request through GitHub
- All code must include unit tests
- Test in simulation before deploying
- Document all test results
- Include comment-based documentation
- Motor limits must be implemented
- Soft limits must be configured
- Emergency stop must be tested
- Watchdog must be enabled
- All autonomous functions must include safety bounds
- Always test in simulation first
- When testing on robot:
- Clear testing area
- Enable at low speeds first
- Have e-stop readily available
- Document all unexpected behavior
# Clean and build
./gradlew clean build
# Run tests
./gradlew test
# Run simulation
./gradlew simulateJava
# Deploy to robot
./gradlew deploy
- Run unit tests locally
- Test in simulation
- Test on practice bot
- Document results
- Update relevant documentation
- Create feature branch
- Write code and tests
- Update documentation
- Create pull request
- Address review feedback
- Merge when approved
- Follow WPILib style guide
- Use meaningful variable names
- Comment all complex logic
- Include Javadoc for public methods
- Keep methods focused and small
- Method documentation (Javadoc)
- Complex logic explanation
- Test coverage
- Usage examples
- Safety considerations
For each test run:
- Date and code version
- Test conditions
- Performance metrics
- Issues encountered
- Solutions implemented
- Team Email: [team email]
- Mentors:
- Dan Hiebert
- Josh Kupka
- Stephanie [Last Name]
- Student Lead: Taaliyah
This project is licensed under the MIT License - see the LICENSE file for details.