Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions AdvantageScopeAssets/Robot_SkunkWorks25/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "SkunkWorks25",
"isFTC": false,
"rotations":[{"axis":"x", "degrees":90}, {"axis":"z", "degrees":90}],
"position": [0, 0, 0],
"cameras": [],
"components": []
}
Binary file added AdvantageScopeAssets/Robot_SkunkWorks25/model.glb
Binary file not shown.
204 changes: 204 additions & 0 deletions layouts/AdvantageScope Simulation Layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"hubs": [
{
"x": -2568,
"y": -8,
"width": 2576,
"height": 1456,
"state": {
"sidebar": {
"width": 457,
"expanded": [
"/AdvantageKit",
"/AdvantageKit/RealOutputs",
"/AdvantageKit/RealOutputs/Odometry",
"/AdvantageKit/RealOutputs/Vision",
"/AdvantageKit/RealOutputs/Vision/Summary",
"/AdvantageKit/RealOutputs/FieldSimulation",
"/LiveWindow",
"/AdvantageKit/DriverStation/Joystick0",
"/AdvantageKit/DriverStation/Joystick0/AxisValues",
"/AdvantageKit/DriverStation/Joystick0/POVs",
"/AdvantageKit/RealOutputs/SwerveStates",
"/AdvantageKit/RealOutputs/SwerveChassisSpeeds",
"/AdvantageKit/Drive",
"/AdvantageKit/Drive/Gyro",
"/AdvantageKit/Drive/Gyro/YawPosition",
"/ReefControls/ToDashboard",
"/SmartDashboard",
"/Drive",
"/RealOutputs/FieldSimulation",
"/Vision",
"/RealOutputs",
"/RealOutputs/Odometry",
"/RealOutputs/Vision",
"/RealOutputs/Vision/Summary",
"/RealOutputs/SwerveChassisSpeeds",
"/RealOutputs/SwerveStates"
]
},
"tabs": {
"selected": 4,
"tabs": [
{
"type": 0,
"title": "",
"controller": null,
"controllerUUID": "6fxezphvrvpdki59bqqa5se2t30p8vdw",
"renderer": "#/",
"controlsHeight": 0
},
{
"type": 8,
"title": "Joysticks",
"controller": [
"Xbox Controller (White)",
"None",
"None",
"None",
"None",
"None"
],
"controllerUUID": "p9hqok97max3hyp4ejkn4dd9prqwwo2s",
"renderer": null,
"controlsHeight": 85
},
{
"type": 9,
"title": "Swerve",
"controller": {
"sources": [
{
"type": "states",
"logKey": "/RealOutputs/SwerveStates/Measured",
"logType": "SwerveModuleState[]",
"visible": true,
"options": {
"color": "#ff0000",
"arrangement": "0,1,2,3"
}
},
{
"type": "states",
"logKey": "/RealOutputs/SwerveStates/SetpointsOptimized",
"logType": "SwerveModuleState[]",
"visible": true,
"options": {
"color": "#0000ff",
"arrangement": "0,1,2,3"
}
}
],
"maxSpeed": 5,
"sizeX": 0.65,
"sizeY": 0.65,
"orientation": 1
},
"controllerUUID": "1j2s4c0yxly77co9y6o6floht8ksvloc",
"renderer": null,
"controlsHeight": 200
},
{
"type": 2,
"title": "Odometry",
"controller": {
"sources": [
{
"type": "robot",
"logKey": "/RealOutputs/Odometry/Robot",
"logType": "Pose2d",
"visible": true,
"options": {}
},
{
"type": "trajectory",
"logKey": "/RealOutputs/Odometry/Trajectory",
"logType": "Pose2d[]",
"visible": true,
"options": {
"color": "#00ff00",
"size": "normal"
}
}
],
"game": "2025 Field (Welded)",
"bumpers": "auto",
"origin": "blue",
"orientation": 0,
"size": 30
},
"controllerUUID": "4ecxill7amo42z261j7t6c976awreu4d",
"renderer": null,
"controlsHeight": 200
},
{
"type": 3,
"title": "SimView",
"controller": {
"sources": [
{
"type": "robot",
"logKey": "/RealOutputs/FieldSimulation/RobotPosition",
"logType": "Pose2d",
"visible": true,
"options": {
"model": "2025 KitBot"
}
},
{
"type": "vision",
"logKey": "/RealOutputs/Vision/Summary/TagPoses",
"logType": "Pose3d[]",
"visible": true,
"options": {
"color": "#00ff00",
"size": "normal"
}
},
{
"type": "gamePiece",
"logKey": "/RealOutputs/FieldSimulation/Coral",
"logType": "Pose3d[]",
"visible": true,
"options": {
"variant": "Coral"
}
},
{
"type": "gamePiece",
"logKey": "/RealOutputs/FieldSimulation/Algae",
"logType": "Pose3d[]",
"visible": true,
"options": {
"variant": "Algae"
}
}
],
"game": "2025 Field (Welded)",
"origin": "blue"
},
"controllerUUID": "cjdhv3tf2cj61gyw8ypksfya2etydczd",
"renderer": {
"cameraIndex": -1,
"orbitFov": 50,
"cameraPosition": [
12.927385108772846,
4.788574591149738,
-0.43842544008732975
],
"cameraTarget": [
-6.070399849279336,
-2.785638513072066,
-2.2613820054053995
]
},
"controlsHeight": 370
}
]
}
}
}
],
"satellites": [],
"version": "4.1.5"
}
20 changes: 20 additions & 0 deletions layouts/elastic-layout-sim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1.0,
"grid_size": 128,
"tabs": [
{
"name": "Teleoperated",
"grid_layout": {
"layouts": [],
"containers": []
}
},
{
"name": "Autonomous",
"grid_layout": {
"layouts": [],
"containers": []
}
}
]
}
39 changes: 39 additions & 0 deletions sim-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Guide to using simulation
## Step 1: Pick your controller type
In the file Constants.java, located at \src\main\java\frc\robot, change the variable "controlScheme" to either ControlScheme.OI or ControlScheme.XBOX to change the type of controller you would like to use

## Step 2: Start Simulation
In the command palate (open via ctrl+shift+p), search for the command WPILib: Simulate Robot Code

Navigate to it using arrow keys, and press enter to run the command

Eventually, a pop up will appear asking what tools you would like to run. Ensure "SIM GUI" is checked. If you would like to use the actual driver station, select that as well.

## Step 3: Register Joysticks (If you would like to simulate TeleOp)
In the simulation GUI that will automatically open, there is a dropdown labeled "System Joysticks" and a dropdown labeled "Joysticks"

Drag the joysticks you would like to use from the system joysticks dropdown into the same port you would be the joysticks into on driver station (for an OI this should be ports 0 and 1, and for an Xbox controller this should be port 0)

IMPORTANT: If you are using an Xbox controller, select the box "Map Gamepad". This maps the Xbox axis into WPILib

## Step 4: Open simulation
From the Windows start menu, open the app AdvantageScope.

For a pre-configured version of the app, hover over the file dropdown in the top left and select "Import Layout". In this project there is a file called "AdvantageScope Simulation Layout" located in \layouts, import this.

Next, from the same file dropdown as earlier select the option "Connect to Simulator". On connection, you should see a timeline of numbers moving forward towards the right of the screen.

If you are using the simulation layout, you can then select the SimView tab in the upper right, and a 3D field with the robot on it will load.

## Step 5: Run Match
First, select the alliance station you would like to use from the FMS dropdown in the SIM GUI

If you would like to run only Auto: Select the Auto to run through the Auto Choices dropdown in SIM GUI. In the Robot State dropdown in SIM GUI, select autonomous. This will instantly start the auto
If you would like to run only TeleOp: In the Robot State dropdown on SIM GUI, select Teleoperated. The robot will now drive following TeleOp joysticks.

If you would like to simulate a match: First, queue an auto and select an alliance station as described above. Then, in the FMS dropdown on SIM GUI press the "Auto" button located next to the text "Match Time"

## Notes
At the moment only teleop from the red alliance perspective is working

If the simulation is too laggy, you can reduce the 3d rendering lighting quality. In the top left of AdvantageScope there is a dropdown "Help". Under it press the button "Show Preferences". You can then change the 3D mode from to Low Power or Standard
98 changes: 98 additions & 0 deletions simgui-ds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"keyboardJoysticks": [
{
"axisConfig": [
{
"decKey": 65,
"incKey": 68
},
{
"decKey": 87,
"incKey": 83
},
{
"decKey": 69,
"decayRate": 0.0,
"incKey": 82,
"keyRate": 0.009999999776482582
}
],
"axisCount": 3,
"buttonCount": 4,
"buttonKeys": [
90,
88,
67,
86
],
"povConfig": [
{
"key0": 328,
"key135": 323,
"key180": 322,
"key225": 321,
"key270": 324,
"key315": 327,
"key45": 329,
"key90": 326
}
],
"povCount": 1
},
{
"axisConfig": [
{
"decKey": 74,
"incKey": 76
},
{
"decKey": 73,
"incKey": 75
}
],
"axisCount": 2,
"buttonCount": 4,
"buttonKeys": [
77,
44,
46,
47
],
"povCount": 0
},
{
"axisConfig": [
{
"decKey": 263,
"incKey": 262
},
{
"decKey": 265,
"incKey": 264
}
],
"axisCount": 2,
"buttonCount": 6,
"buttonKeys": [
260,
268,
266,
261,
269,
267
],
"povCount": 0
},
{
"axisCount": 0,
"buttonCount": 0,
"povCount": 0
}
],
"robotJoysticks": [
{
"guid": "78696e70757401000000000000000000",
"useGamepad": true
}
]
}
19 changes: 19 additions & 0 deletions src/main/deploy/pathplanner/autos/SimPhysTest.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "SimPhysTest"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
Loading