diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 852c690..7f042c0 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -4,8 +4,9 @@ - [Thinking in Java](./java/README.md) - [Using WPILib](./wpilib/README.md) - - [The Development Environment](./wpilib/development-environment.md) - - [Creating a Project](./wpilib/creating-a-project.md) - - [Commands and Subsystems](./wpilib/commands-and-subsystems.md) - - [Applied Command-Based Programming](./wpilib/commands-applied.md) -- [Auto Language](./drivelang/README.md) \ No newline at end of file + - [The Development Environment](./wpilib/development-environment.md) + - [Creating a Project](./wpilib/creating-a-project.md) + - [Commands and Subsystems](./wpilib/commands-and-subsystems.md) + - [Applied Command-Based Programming](./wpilib/commands-applied.md) + - [Simulator](./wpilib/simulator.md) +- [Auto Language](./drivelang/README.md) diff --git a/src/wpilib/development-environment.md b/src/wpilib/development-environment.md index 7174390..2d09ef4 100644 --- a/src/wpilib/development-environment.md +++ b/src/wpilib/development-environment.md @@ -9,15 +9,10 @@ See also: [WPILib's guide](https://docs.wpilib.org/en/stable/docs/zero-to-robot/ ## Installing WPILib -WPILib provides installers -for Windows, macOS, and Linux. +WPILib is available on Windows, macOS, and Linux. -First, -you'll need to download -the latest release of WPILib -from GitHub Releases. -You can follow [this link](https://github.com/wpilibsuite/allwpilib/releases/latest) -and then scroll down until you find the "Assets" section. +Download the installer from [this link](https://github.com/wpilibsuite/allwpilib/releases/latest) +(under the "Assets" section). After you download and run the installer, it will prompt you to choose to install "tools only" or "everything." @@ -26,7 +21,11 @@ you should choose "everything" and select "download for this computer only" when it prompts you to install VS Code. -## Setting up Your Editor (optional) +## Downloading the code + +Head over to our [GitHub organization](https://github.com/frc3636) and either use VSCode's ["Git: Clone"](https://git-scm.com/downloads) command to download the latest code or download it as a ZIP if you don't intend to change. + +## Using an alternative editor (optional) If you chose not to install VS Code with the WPILib installer, you'll probably want to set up your editor of choice diff --git a/src/wpilib/simulator.md b/src/wpilib/simulator.md new file mode 100644 index 0000000..ee4b920 --- /dev/null +++ b/src/wpilib/simulator.md @@ -0,0 +1,23 @@ +# Simulator + +The WPILIB simulator lets you control a (fake) robot without expensive real hardware. It's built into the project and runs the robot's code directly on your computer (rather than on the robot's RoboRIO computer). + +## Starting the simulator + +After the robot's code can be downloaded, a simulator can be opened by running `./gradlew simulateJava` in the VSCode Terminal (Ctrl-Shift-P, New Terminal). The robot's state can be controlled in the upper right hand corner. Disabled means it will not accept input, autonomous means it will run a pre-programmed path, and teleoperated means it can be controlled by a driver. + +## Setting up controls + +Enable keyboard control by dragging "Keyboard 0" onto the "Joystick 0" slot and "Keyboard 1" to "Joystick 1". "Joystick 0" means you're controlling the robot's left/right/up/down movement and "Keyboard 0" means you're using WASD to do so. "Joystick 1" means you're controlling the robot's rotation and "Keyboard 1" means you're using J and L to do so. In a real competition, these would be real joysticks, but the simulator lets you use a keyboard for ease of use. + +## Seeing a 2D field + +When using the robot in real life, it keeps track of where it thinks it is based on how far the wheels move and what it sees using its camera. In the simulator, this can be used to see how the robot thinks it will move after you input certain controls. + +The NetworkTables menu in the simulator GUI can be used to view information directly connected to the robot's behavior - like the current controller sensitivity, or where the robot thinks it is on the field. Open `NetworkTables > Shuffleboard > Auto > Field`. + +## Controlling the robot (and how it responds to controls) + +## Setting up a 3D field (and common caveats) + +## Changing code to affect the simulator