Skip to content

Commit

Permalink
Fix broken links from wpilibsuite/allwpilib#6494 (#2649)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciencewhiz committed May 11, 2024
1 parent 957066b commit c929c44
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions source/docs/software/examples-tutorials/wpilib-examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ These examples demonstrate WPILib implementations of common robot controls. Sen
* **Gyro Mecanum** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gyromecanum>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/GyroMecanum>`__, `Python <https://github.com/robotpy/examples/tree/main/GyroMecanum>`__): Demonstrates field-oriented control of a mecanum robot through the ``MecanumDrive`` class in conjunction with a gyro.
* **MecanumBot** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/mecanumbot>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/MecanumBot>`__, `Python <https://github.com/robotpy/examples/tree/main/MecanumBot>`__): Demonstrates an advanced mecanum drive implementation, including encoder-and-gyro odometry through the ``MecanumDriveOdometry`` class, and composition with PID velocity control through the ``MecanumDriveKinematics`` and ``PIDController`` classes.
* **PotentiometerPID** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/potentiometerpid>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/PotentiometerPID>`__, `Python <https://github.com/robotpy/examples/tree/main/PotentiometerPID>`__): Demonstrates the use of the ``PIDController`` class and a potentiometer to control the position of an elevator mechanism.
* **RamseteController** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecontroller>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/RamseteController>`__, `Python <https://github.com/robotpy/examples/tree/main/RamseteController>`__): Demonstrates the use of the ``RamseteController`` class to follow a trajectory during the autonomous period.
* **SwerveBot** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SwerveBot>`__, `Python <https://github.com/robotpy/examples/tree/main/SwerveBot>`__): Demonstrates an advanced swerve drive implementation, including encoder-and-gyro odometry through the ``SwerveDriveOdometry`` class, and composition with PID position and velocity control through the ``SwerveDriveKinematics`` and ``PIDController`` classes.
* **UltrasonicPID** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ultrasonicpid>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/UltrasonicPID>`__, `Python <https://github.com/robotpy/examples/tree/main/UltrasonicPID>`__): Demonstrates the use of the ``PIDController`` class in conjunction with an ultrasonic sensor to drive to a set distance from an object.

Expand Down Expand Up @@ -70,7 +69,6 @@ These examples demonstrate the use of the :ref:`Command-Based framework <docs/so
* **Inlined Hatchbot** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/hatchbotinlined>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/HatchbotInlined>`__, `Python <https://github.com/robotpy/examples/tree/main/HatchbotInlined>`__): A complete set of robot code for a simple hatch-delivery bot typical of the 2019 FRC game *Destination: Deep Space*. Commands are written in an "inline" style, in which explicit subclassing of ``Command`` is avoided.
* **Traditional Hatchbot** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/hatchbottraditional>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/HatchbotTraditional>`__, `Python <https://github.com/robotpy/examples/tree/main/HatchbotTraditional>`__): A complete set of robot code for a simple hatch-delivery bot typical of the 2019 FRC game *Destination: Deep Space*. Commands are written in a "traditional" style, in which subclasses of ``Command`` are written for each robot action.
* **MecanumControllerCommand** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/mecanumcontrollercommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand>`__): Demonstrates trajectory generation and following with a mecanum drive using the ``TrajectoryGenerator`` and ``MecanumControllerCommand`` classes.
* **RamseteCommand** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__, `Python <https://github.com/robotpy/examples/tree/main/RamseteCommand>`__): Demonstrates trajectory generation and following with a differential drive using the ``TrajectoryGenerator`` and ``RamseteCommand`` classes. A matching step-by-step tutorial can be found :ref:`here <docs/software/pathplanning/trajectory-tutorial/index:Trajectory Tutorial>`.
* **Select Command Example** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/selectcommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SelectCommand>`__, `Python <https://github.com/robotpy/examples/tree/main/SelectCommand>`__): Demonstrates the use of the ``SelectCommand`` class to run one of a selection of commands depending on a runtime-evaluated condition.
* **SwerveControllerCommand** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand>`__): Demonstrates trajectory generation and following with a swerve drive using the ``TrajectoryGenerator`` and ``SwerveControllerCommand`` classes.

Expand All @@ -83,7 +81,6 @@ These examples demonstrate the use of the :ref:`State-Space Control <docs/softwa
* **StateSpaceFlywheelSysId** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespaceflywheelsysid>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheelSysId>`__, `Python <https://github.com/robotpy/examples/tree/main/StateSpaceFlywheelSysId>`__): Demonstrates state-space control using SysId's System Identification for controlling a flywheel.
* **StateSpaceElevator** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespaceelevator>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/StateSpaceElevator>`__): Demonstrates state-space control of an elevator.
* **StateSpaceArm** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacearm>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/StateSpaceArm>`__): Demonstrates state-space control of an Arm.
* **StateSpaceDriveSimulation** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacedifferentialdrivesimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/StateSpaceDifferentialDriveSimulation>`__): Demonstrates state-space control of a differential drivetrain in combination with a RAMSETE path following controller and Field2d class.

Simulation Physics Examples
---------------------------
Expand All @@ -92,7 +89,6 @@ These examples demonstrate the use of the physics simulation.

* **ElevatorSimulation** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/elevatorsimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/ElevatorSimulation>`__, `Python <https://github.com/robotpy/examples/tree/main/ElevatorSimulation>`__): Demonstrates the use of physics simulation with a simple elevator.
* **ArmSimulation** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/armsimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/ArmSimulation>`__, `Python <https://github.com/robotpy/examples/tree/main/ArmSimulation>`__): Demonstrates the use of physics simulation with a simple single-jointed arm.
* **StateSpaceDriveSimulation** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacedifferentialdrivesimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/StateSpaceDifferentialDriveSimulation>`__): Demonstrates state-space control of a differential drivetrain in combination with a RAMSETE path following controller and Field2d class.
* **SimpleDifferentialDriveSimulation** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/simpledifferentialdrivesimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation>`__): A barebones example of a basic drivetrain that can be used in simulation.

Miscellaneous Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Step 3: Creating a Drive Subsystem

Now that our drive is characterized, it is time to start writing our robot code *proper*. As mentioned before, we will use the :ref:`command-based <docs/software/commandbased/what-is-command-based:What Is "Command-Based" Programming?>` framework for our robot code. Accordingly, our first step is to write a suitable drive :ref:`subsystem <docs/software/commandbased/subsystems:Subsystems>` class.

The full drive class from the RamseteCommand Example Project (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__) can be seen below. The rest of the article will describe the steps involved in writing this class.
The full drive class from the RamseteCommand Example Project (`Java <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__) can be seen below. The rest of the article will describe the steps involved in writing this class.

.. tab-set::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Step 4: Creating and Following a Trajectory

With our drive subsystem written, it is now time to generate a trajectory and write an autonomous command to follow it.

As per the :ref:`standard command-based project structure <docs/software/commandbased/structuring-command-based-project:Structuring a Command-Based Robot Project>`, we will do this in the ``getAutonomousCommand`` method of the ``RobotContainer`` class. The full method from the RamseteCommand Example Project (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__) can be seen below. The rest of the article will break down the different parts of the method in more detail.
As per the :ref:`standard command-based project structure <docs/software/commandbased/structuring-command-based-project:Structuring a Command-Based Robot Project>`, we will do this in the ``getAutonomousCommand`` method of the ``RobotContainer`` class. The full method from the RamseteCommand Example Project (`Java <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__) can be seen below. The rest of the article will break down the different parts of the method in more detail.

.. tab-set::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Trajectory Tutorial
===================

This is full tutorial for implementing trajectory generation and following on a differential-drive robot. The full code used in this tutorial can be found in the RamseteCommand example project (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__).
This is full tutorial for implementing trajectory generation and following on a differential-drive robot. The full code used in this tutorial can be found in the RamseteCommand example project (`Java <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__).

.. toctree::
:maxdepth: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Drivetrain Simulation Tutorial
==============================
This is a tutorial for implementing a simulation model of your differential drivetrain using the simulation classes. Although the code that we will cover in this tutorial is framework-agnostic, there are two full examples available -- one for each framework.

* ``StateSpaceDifferentialDriveSimulation`` (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacedifferentialdrivesimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/StateSpaceDifferentialDriveSimulation>`__) uses the command-based framework.
* ``StateSpaceDifferentialDriveSimulation`` (`Java <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacedifferentialdrivesimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/v2024.3.2/wpilibcExamples/src/main/cpp/examples/StateSpaceDifferentialDriveSimulation>`__) uses the command-based framework.
* ``SimpleDifferentialDriveSimulation`` (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/simpledifferentialdrivesimulation>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation>`__) uses a more traditional approach to data flow.

Both of these examples are also available in the VS Code :guilabel:`New Project` window.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Step 1: Creating Simulated Instances of Hardware
================================================
The WPILib simulation framework contains several ``XXXSim`` classes, where ``XXX`` represents physical hardware such as encoders or gyroscopes. These simulation classes can be used to set positions and velocities (for encoders) and angles (for gyroscopes) from a model of your drivetrain. See :ref:`the Device Simulation article<docs/software/wpilib-tools/robot-simulation/device-sim:Device Simulation>` for more info about these simulation hardware classes and simulation of vendor devices.

.. note:: Simulation objects associated with a particular subsystem should live in that subsystem. An example of this is in the ``StateSpaceDriveSimulation`` (`Java <https://github.com/wpilibsuite/allwpilib/blob/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacedifferentialdrivesimulation/subsystems/DriveSubsystem.java>`__, `C++ <https://github.com/wpilibsuite/allwpilib/blob/main/wpilibcExamples/src/main/cpp/examples/StateSpaceDifferentialDriveSimulation/cpp/subsystems/DriveSubsystem.cpp>`__) example.
.. note:: Simulation objects associated with a particular subsystem should live in that subsystem. An example of this is in the ``StateSpaceDriveSimulation`` (`Java <https://github.com/wpilibsuite/allwpilib/blob/v2024.3.2/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/statespacedifferentialdrivesimulation/subsystems/DriveSubsystem.java>`__, `C++ <https://github.com/wpilibsuite/allwpilib/blob/v2024.3.2/wpilibcExamples/src/main/cpp/examples/StateSpaceDifferentialDriveSimulation/cpp/subsystems/DriveSubsystem.cpp>`__) example.

Simulating Encoders
-------------------
Expand Down

0 comments on commit c929c44

Please sign in to comment.