A simulation engine is a powerful tool that provides realistic approximations of physical systems. With maple-sim, we integrate the open-source Java rigid-body dynamics engine, dyn4j, capable of simulating 2D forces and collisions between rigid shapes. This integration transforms the scope of robot simulations by enabling realistic interactions between robots, field elements, and game pieces.
Before maple-sim, most FRC robot simulations focused solely on the robot itself—its sensors, movements, and internal operations. Now, through the power of physics simulation, maple-sim allows your robot to engage directly with its environment. Imagine testing robot interactions with obstacles, field elements, and game pieces, all within the simulated world. A simulation that is realistic enough to feel like a video game.
With this advanced level of simulation, the possibilities are endless. You can:
- Test autonomous modes with pinpoint accuracy.
- Fine-tune advanced TeleOp enhancement features like pathfinding-auto-alignment.
- Optimize shooters and other subsystems, all while gathering meaningful data from simulated physics.
And the best part? You can achieve all of this without needing a real robot on hand.
For an in-depth description of the simulations, please refer to Simulation Details.
Please follow the guides below for quick setup:
- Hardware Abstractions
- Installing maple-sim
- Using the Simulated Arena
- Simulating Swerve Drivetrain
- Simulating Intake
- Simulating Projectiles
- Simulating Opponent Robots
🙏 Big thanks to nstrike for all the help in setting up the Java Docs. Official Java Docs.
- Advanced Swerve Drive Project: 6328's swerve drive project utilizing AdvantageKit, modified with advanced drivetrain simulations. View the changelog from the original project here.
- Maple-Swerve-Skeleton: Our custom swerve drive project based on the Advanced Swerve Drive Project, featuring drivetrain simulation, vision simulation, and convenient control features.
- 5516-2024-OffSeason-RobotCode: Our 2024 off-season robot code, which implements a range of advanced simulations. This code can be run on a real robot and even played like a video game. Watch the Videos
🏃 Support for YAGSL in actively under development, coming soon!
We welcome your contributions! Here’s how you can help:
Submit an issue if you’ve found a bug or have a feature request.
Create a pull request if you have something to contribute.
Join our Discord server to connect with the community and collaborate on projects!