A web-based tool for generating Java code for FRC (FIRST Robotics Competition) mechanisms like elevators, arms, and pivots.
This tool helps FRC teams quickly generate well-structured, command-based Java code for common robot mechanisms. It provides:
- Form-based configuration for mechanism parameters
- Real-time simulation of mechanism behavior
- Generated Java code for subsystems with proper control methods
- Support for different motor controllers (SparkMAX, SparkFlex, TalonFX, TalonFXS, ThriftyNova, Redux Nitro)
- Support for different motor types (NEO, NEO550, Minion, Krakenx44, Krakenx60, Cu60, Cu40)
- Code Generation: Create Java subsystem classes with proper control methods, telemetry, and simulation support
- Interactive Simulation: Test and visualize mechanism behavior with adjustable parameters
- Multiple Mechanism Types: Support for elevators, arms, and pivots (turrets/wrists)
- Comprehensive Configuration: Configure PID values, feedforward constants, soft limits, current limits, and more
- Static Export: The site can be built as a static site for easy deployment
- Node.js 18.x or higher
- pnpm (recommended) or npm/yarn
-
Clone the repository:
gh repo clone Yet-Another-Software-Suite/yamg cd yamg -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Open http://localhost:3000 in your browser.
This project is configured for easy deployment to GitHub Pages:
-
Update the
basePathinnext.config.mjsto match your repository name:basePath: '/your-repo-name',
-
Build and export the static site:
pnpm build
-
Push the
outdirectory to thegh-pagesbranch:git add out/ -f git commit -m "Deploy to GitHub Pages" git subtree push --prefix out origin gh-pagesAlternatively, you can use a GitHub Action to automate deployment (see
.github/workflows/deploy.yml).
/app: Next.js app router pages/components: React components for the UI/lib: Core logic for code generation and simulation/lib/motor-controllers: Motor controller specific code/lib/simulation: Simulation classes
/public: Static assets and template files/public/templates: Handlebars templates for code generation/public/simulation: JavaScript simulation files
For more detailed information, see the documentation in the /docs directory:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.