Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
573f158
Testing Adding a new page.
snvgglebear Dec 14, 2025
f1086c9
Updated actions.
snvgglebear Dec 14, 2025
5cd0613
Updated to run on branch push for testing.
snvgglebear Dec 14, 2025
09e5cc9
Changed heading ranges.
snvgglebear Dec 14, 2025
4a04337
Testing update to main workflow.
snvgglebear Dec 14, 2025
fa99985
Testing new workflow.
snvgglebear Dec 14, 2025
02c206b
Testing new woflow.
snvgglebear Dec 14, 2025
f3f59b5
Fixed formatting.
snvgglebear Dec 14, 2025
0ad9b6f
Added permissions.
snvgglebear Dec 14, 2025
fb86fe2
Fixed actions.
snvgglebear Dec 14, 2025
5697234
Added missing call to gh-deploy
snvgglebear Dec 14, 2025
fab38d0
Fixed new workflow and typos in basic Git.
snvgglebear Dec 14, 2025
b2bd57d
Added assets and updated git basics and project page.
snvgglebear Dec 14, 2025
2acb971
Updating kitbot tutorial for neos.
snvgglebear Dec 14, 2025
34f9063
Added new images and continued updating kitbot page.
snvgglebear Dec 15, 2025
058bff1
Updating the create robot page.
snvgglebear Dec 15, 2025
79ab256
Finished overhauling creating drivetrain.
snvgglebear Dec 15, 2025
04588ff
Corrected some Talon references.
snvgglebear Dec 15, 2025
8d32192
Added electronics page and assets.
snvgglebear Dec 15, 2025
6a223e4
Removed old workflows that are not needed.
snvgglebear Dec 15, 2025
7f55f64
Started updating the Autonomous command.
snvgglebear Dec 15, 2025
dc91d65
Working on Autonomous command.
snvgglebear Dec 15, 2025
dbb139c
added to autonomous.
snvgglebear Dec 16, 2025
fbea5ea
Merge branch 'robolancer_updates' of https://github.com/RoboLancers/F…
snvgglebear Dec 16, 2025
0e08871
added back workflows.
snvgglebear Dec 16, 2025
35d61ea
fixed branch in workflow.
snvgglebear Dec 16, 2025
2999637
Fixed build.
snvgglebear Dec 16, 2025
2695ca8
fixed branch name
snvgglebear Dec 16, 2025
82ef352
changed deploy.
snvgglebear Dec 16, 2025
99c0ad4
fixed typo.
snvgglebear Dec 16, 2025
5dded90
Changed heading level.
snvgglebear Dec 16, 2025
8e5d714
Fixed typo
snvgglebear Dec 16, 2025
b310180
Added dev container config.
snvgglebear Dec 17, 2025
03dead4
Merge branch 'robolancer_updates' of https://github.com/RoboLancers/F…
snvgglebear Dec 17, 2025
1a28c84
Finished section about configuring the controller to move the robot.
snvgglebear Dec 17, 2025
0cfeef1
Added advantageKit page for use later.
snvgglebear Dec 17, 2025
3fc64f0
Updated deploy_site workflow.
snvgglebear Dec 17, 2025
e1b40b3
Add link to WPILIB docs and reference info
snvgglebear Jan 9, 2026
18cdd30
Testing custom MCP server and instructions.
snvgglebear Jan 16, 2026
01b5dc9
Merge branch 'robolancer_updates' of https://github.com/RoboLancers/F…
snvgglebear Jan 16, 2026
d3c99cb
Added updated instructions.
snvgglebear Jan 31, 2026
9eb19db
Added code examples and working on fixing formatting.
snvgglebear Jan 31, 2026
286dd45
Working on reformatting.
snvgglebear Feb 12, 2026
0289e69
Updated markdown errors with Claude's help.
snvgglebear Mar 31, 2026
04d3b64
Fixed a bunch more formatting errors in the Markdown and code snippets.
snvgglebear Mar 31, 2026
616b01a
Fixed additional markdown formatting errors.
snvgglebear Mar 31, 2026
a48fc28
Filled in a lot of missing information, added a basic shooter example…
snvgglebear Mar 31, 2026
e4d6be3
Updates requirements.txt, moved java code examples into java files. (…
snvgglebear Mar 31, 2026
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
Prev Previous commit
Next Next commit
Finished overhauling creating drivetrain.
  • Loading branch information
snvgglebear committed Dec 15, 2025
commit 79ab2563c6d9c61b9f0bcb26693efcb969b68570
92 changes: 44 additions & 48 deletions docs/programming/driving_robot.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,18 +511,6 @@ Now it’s time to make an arcadeDrive from our differentialDrive!

## Making our robot controllable

### Creating the Joystick

In order to drive our robot, it needs to know what will be controlling it. To do so, we will create a new joystick in RobotContainer.java, and an operator constant for the joystick port.

!!! summary ""
**1)** Open Constants.java
Check and make sure the `kDriverControllerPort` constant is present.
**2)** Open RobotContainer.java
- Change all `ExampleSubsystem` references to `DriveSubsystem`

<!-- TODO: add details on how to find joystick port in driverstation tips -->

### Creating the Drivearcade Command

- Remember that **methods** tell the robot what it can do but in order to make it do these things we must give it a **command**. See [Command Based Robot](../basics/wpilib.md#command-based-robot){target=_blank}
Expand Down Expand Up @@ -553,7 +541,7 @@ Before we begin we must create the class file for the DriveArcade command. See [
#### In the constructor

!!! summary ""
**1)** Inside the parenthesis of the the constructor `#!java DriveArcade()` add 3 variables:
**1)** Inside the parenthesis of the the constructor `driveArcade()` add 3 variables:
```Java
public DriveCommand(
DoubleSupplier xSpeed, DoubleSupplier zRotation, DriveSubsystem driveSubsystem)
Expand Down Expand Up @@ -585,7 +573,6 @@ Before we begin we must create the class file for the DriveArcade command. See [
#### In the execute method

!!! summary ""
!!! summary ""
**1)** In the execute method we will we want to call the **arcadeDrive** method we created in **Drivetrain** and give it the variables **moveSpeed** `xspeed` and **rotateSpeed** `zrotation` we created as parameters.

In the execute() method below rotateSpeed type:
Expand Down Expand Up @@ -700,54 +687,58 @@ Since we will be using this command to control the robot we want it to run indef
```
</details>

### Connecting the Joystick
- In RobotContainer We will now add the code to take the joystick inputs and use them to move the robot.
### Creating the Joystick

!!! summary ""
The joystick code goes inside the `configureBindings()` method.
- We will the default command for the drive subsystem to an instance of the DriveCommand with the values provided by the joystick axes on the driver controller.
- The Y axis of the controller is inverted so that pushing the stick away from you (a negative value) drives the robot forwards (a positive value).
- Similarly for the X axis where we need to flip the value so the joystick matches the WPILib convention of counter-clockwise positive
In order to drive our robot, it needs to know what will be controlling it. To do so, we will use the joystick in `RobotContainer.java`, as `m_drivecontroller`.


!!! summary ""
**1)** Open Constants.java
Check and make sure the `kDriverControllerPort` constant is present.
**2)** Open RobotContainer.java
- Change all `ExampleSubsystem` references to `DriveSubsystem`

```Java
driveSubsystem.setDefaultCommand(new DriveCommand(
() -> -driverController.getLeftY() *
(driverController.getHID().getRightBumperButton() ? 1 : 0.5),
() -> -driverController.getRightX(),
driveSubsystem));
```
<!-- TODO: add details on how to find joystick port in driverstation tips -->

### Using setDefaultCommand

- Commands passed to this method will run when the robot is enabled.
- They also run if no other commands using the subsystem are running.
- This is why we write **addRequirements(Robot.m_subsystemName)** in the commands we create, it ends currently running commands using that subsystem to allow a new command is run.

!!! summary ""
**1)** Back in **RobotContainer.java** in the constructor we will call the `setDefaultCommand` of `m_drivetrain` and pass it the `DriveArcade` command

In the **RobotContainer.java** constructor type:

```java
m_drivetrain.setDefaultCommand(new DriveArcade());
**1)** Back in **RobotContainer.java** We will need to remove everything inside the `configureBindings` method.
**2)** in the `configureBindings`we will call the `setDefaultCommand` of `m_drivetrain` and create a new `DriveArcade` command with parameters.

- Commands in this method will run when the robot is enabled.
- They also run if no other commands using the subsystem are running.
- This is why we write **addRequirements(Robot.m_subsystemName)** in the commands we create, it ends currently running commands using that subsystem to allow a new command is run.
- We will the default command for the drive subsystem to an instance of the `DriveArcade` with the values provided by the joystick axes on the driver controller.
- The Y axis of the controller is inverted so that pushing the stick away from you (a negative value) drives the robot forwards (a positive value).
- Similarly for the X axis where we need to flip the value so the joystick matches the WPILib convention of counter-clockwise positive

```Java
driveSubsystem.setDefaultCommand(new DriveArcade(
() -> -m_driverController.getLeftY() *
(m_driverController.getHID().getRightBumperButton() ? 1 : 0.5),
() -> -m_driverController.getRightX(),
driveSubsystem));
```

!!! Tip
Remember to use the light bulb for importing if needed!
!!! Tip
The `New` keyword creates a new instance of a class (object)

??? Example
<details><summary>Example</summary>

Your full **RobotContainer.java** should look like this:

```java
package frc.robot;

import edu.wpi.first.wpilibj.Joystick;
import frc.robot.commands.*;
import frc.robot.subsystems.*;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;
import frc.robot.Constants.OperatorConstants;
import frc.robot.commands.Autos;
import frc.robot.commands.ExampleCommand;
import frc.robot.subsystems.ExampleSubsystem;

/**
* This class is where the bulk of the robot should be declared. Since Command-based is a
Expand All @@ -757,12 +748,12 @@ Since we will be using this command to control the robot we want it to run indef
*/
public class RobotContainer {
// The robot's subsystems and commands are defined here...
public static final Drivetrain m_drivetrain = new Drivetrain();
public static final DriveSubsystem drivetrain = new DriveSubsystem();
private final ExampleSubsystem m_exampleSubsystem = new ExampleSubsystem();

private final ExampleCommand m_autoCommand = new ExampleCommand(m_exampleSubsystem);

public Joystick driverController = new Joystick(Constants.DRIVER_CONTROLLER);
private final CommandXboxController m_driverController =
new CommandXboxController(OperatorConstants.kDriverControllerPort);

/**
* The container for the robot. Contains subsystems, OI devices, and commands.
Expand All @@ -771,8 +762,7 @@ Since we will be using this command to control the robot we want it to run indef
// Configure the button bindings
configureButtonBindings();

// Set default commands on subsystems
m_drivetrain.setDefaultCommand(new DriveArcade());

}

/**
Expand All @@ -782,6 +772,11 @@ Since we will be using this command to control the robot we want it to run indef
* {@link edu.wpi.first.wpilibj2.command.button.JoystickButton}.
*/
private void configureButtonBindings() {
driveSubsystem.setDefaultCommand(new DriveSubSystem(
() -> -driverController.getLeftY() *
(driverController.getHID().getRightBumperButton() ? 1 : 0.5),
() -> -driverController.getRightX(),
driveSubsystem));
}


Expand All @@ -796,3 +791,4 @@ Since we will be using this command to control the robot we want it to run indef
}
}
```
</details>