Shenzhen-Robotics-Alliance / maple-sim

Elevating FRC Java Robot Simulations to the Next Level with Physics Engines
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

[API] API Overhaul #26

Closed oh-yes-0-fps closed 1 day ago

oh-yes-0-fps commented 2 weeks ago

I had some time to burn so I refactored the library to roughly how I would do it. Feel free to tell me what you like and don't like.

This is an implementation of the SimRobot idea we talked about a week ago.

The user would grab the robot from the simulation arena and can either pass it throughout their subsystems or statically access it. The user then uses this robot to initialize their drivetrain sim, gamepiece storage, mechanisms/motors and intakes.

A somewhat comprehensive list of changes:

catr1xLiu commented 2 weeks ago

Most of the code looks impressive me, can you please test the new API in advanced_swerve_example so that we can see how the new API works in real-life code?

Also, please change the target of the PR to https://github.com/Shenzhen-Robotics-Alliance/maple-sim/tree/new-game-piece-API

thanks a lot for contributing!

catr1xLiu commented 1 day ago

The whole library has moved to wpilib units, this means that merging it using git is seemingly impossible.

I'll just merge it to a temporary branch and manually commit changes to dev instead.

Anyways, thanks a lot for all the work! I really like it!