Skip to content

Elevating FRC Java Robot Simulations to the Next Level with Physics Engines

License

BSD-3-Clause and 2 other licenses found

Licenses found

BSD-3-Clause
LICENSE-Dyn4j.md
Unknown
LICENSE-IronMaple.md
Unknown
LICENSE-WPILib.md
Notifications You must be signed in to change notification settings

Shenzhen-Robotics-Alliance/maple-sim

Repository files navigation

team logo project logo

Elevating FRC Java Robot Simulations to the Next Level with Physics Engines

Why a Physics Engine?

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.

physics engine illustration

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.

Demo Video 1

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.

Simulation Details

For an in-depth description of the simulations, please refer to Simulation Details.

Quick Start

Please follow the guides below for quick setup:

  1. Hardware Abstractions
  2. Installing maple-sim
  3. Using the Simulated Arena
  4. Simulating Swerve Drivetrain
  5. Simulating Intake
  6. Simulating Projectiles
  7. Simulating Opponent Robots

Java Docs

🙏 Big thanks to nstrike for all the help in setting up the Java Docs. Official Java Docs.

Examples and Templates

  1. Advanced Swerve Drive Project: 6328's swerve drive project utilizing AdvantageKit, modified with advanced drivetrain simulations. View the changelog from the original project here.
  2. Maple-Swerve-Skeleton: Our custom swerve drive project based on the Advanced Swerve Drive Project, featuring drivetrain simulation, vision simulation, and convenient control features.
  3. 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!

Contributing

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!

About

Elevating FRC Java Robot Simulations to the Next Level with Physics Engines

Resources

License

BSD-3-Clause and 2 other licenses found

Licenses found

BSD-3-Clause
LICENSE-Dyn4j.md
Unknown
LICENSE-IronMaple.md
Unknown
LICENSE-WPILib.md

Stars

Watchers

Forks

Packages

 
 
 

Languages