A barebones robot simulation example that utilizes:
- CTRE swerve & simuation
- WPILib arm and flywheel physics simulation
- PhotonVision simulation
- AdvantageScope
Note that this is meant to be used as reference, not as a base template for your robot.
simviz.mov
- CTRE swerve
- Simulation built in
- Example intake subsystem
- Utilizes WPILib's
SingleJointedArmSim
andFlywheelSim
to simulate arm and roller physics - Visualized with WPILib's Mechanism2d widget
- Utilizes WPILib's
- PhotonVision sim
- Updated based on the CTRE swerve sim pose
- Visualized using the built in Field2d widget & web GUI
- AdvantageScope for 3d viz and plotting
- Basic layout provided
- WPILib simulation
- WPILib physics simulation
- PhotonVision simulation
- Mechanism2d
- AdvantageScope 3D Field
- Left stick X/Y: Swerve translate
- Right stick X: Swerve rotate
- Right bumper: Deploy intake when held
- Ensure the Arm Viz and Sim Field are displayed
- In AdvantageScope, click
File > Import Layout
and selectadvantagescope_layout.json
. - Connect to the local simulator
File > Connect to Simulator
- View PhotonVision camera sim at http://localhost:1182