> For the complete documentation index, see [llms.txt](https://docs.yagsl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yagsl.com/overview/our-features/max-speed.md).

# Max Speed

## What is Max Speed?

YAGSL stores the maximum speed and uses it in the following functions

* [ ] [`SwerveDriveKinematics.desaturateWheelSpeeds`](https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/math/kinematics/SwerveDriveKinematics.html#desaturateWheelSpeeds\(edu.wpi.first.math.kinematics.SwerveModuleState\[],double\))
* [ ] [`SwerveMath.calculateMaxAngularVelocity`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/math/SwerveMath.html#calculateMaxAngularVelocity\(double,double,double\))
* [ ] [`SwerveDriveTelemetry.maxSpeed`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/telemetry/SwerveDriveTelemetry.html#maxSpeed)
* [ ] [`SwerveMath.antiJitter`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/math/SwerveMath.html#antiJitter\(edu.wpi.first.math.kinematics.SwerveModuleState,edu.wpi.first.math.kinematics.SwerveModuleState,double\))
* [ ] [`SwerveMath.createDriveFeedforward`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/math/SwerveMath.html#createDriveFeedforward\(double,double,double\))

The maximum speed represents the physical maximum speed of the robot.

## How do I change my Max Speed?

You can change your maximum speed by using `SwerveDrive.setMaximumSpeed` the initial maximum speed is given in [`SwerveParser.createSwerveDrive`](https://yet-another-software-suite.github.io/YAGSL/javadocs/swervelib/parser/SwerveParser.html#createSwerveDrive\(double\)) for initial values like the maximum angular velocity and drive feedforward and telemetry maximum speed.

{% hint style="info" %}
The maximum speed in telemetry does not change because most widgets do not support this and it might break them!
{% endhint %}

<pre class="language-java"><code class="lang-java">  /**
   * Initialize {@link SwerveDrive} with the directory provided.
   *
   * @param directory Directory of swerve drive config files.
   */
  public SwerveSubsystem(File directory)
  {
    // Configure the Telemetry before creating the SwerveDrive to avoid unnecessary objects being created.
    SwerveDriveTelemetry.verbosity = TelemetryVerbosity.HIGH;
    swerveDrive = new SwerveParser(directory).createSwerveDrive(Constants.MAX_SPEED);
<strong>    swerveDrive.setMaximumSpeed(Units.feetToMeters(12.4)); // 12.4ft/s to m/s
</strong>  }
</code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yagsl.com/overview/our-features/max-speed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
