Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove direct hardware access from the subsystem and go through an IO layer. This is necessary so that we can simulate the robot's mechanisms on desktop and still use the same control configurations and setups (joystick inputs, path following, and commands).
Do the same for swerve modules - MAXSwerveModule hardware implementation becomes MAXSwerveModuleIO, with a corresponding IO object for use in simulation
Add a simple simulation framework to coordinate battery voltage droop from multiple mechanisms
Add some simple tests to demonstrate JUnit and test setup
See the documentation here on running simulation: https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/index.html
I've attached three files to get started with the simulation GUI. Save these to your project folder before running simulation (for example, if you've cloned the repository to
C:\Users\you\Documents\2023-swerve\
, download these files directly into that folder). These are set up to show a simple field and robot UI, controllable with a keyboard. Use WASD to move and QE to rotate the robot. If the robot leaves the field, starting autonomous mode will reset its position to 0, 0 at the bottom left corner of the field.simgui-ds.json
simgui-window.json
simgui.json