> For the complete documentation index, see [llms.txt](https://yams.yassrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yams.yassrobotics.com/api-reference/c++-reference/config/flywheel-config.md).

# FlyWheelConfig

**Namespace:** `yams::mechanisms::config`\
**Header:** `<yams/mechanisms/config/FlyWheelConfig.hpp>`\
**Java equivalent:** [Java FlyWheelConfig](https://yams.yassrobotics.com/api-reference/java-reference/config/flywheel-config.md)\
**Doxygen:** [`FlyWheelConfig`](https://doxygen.yassrobotics.com/yams/classyams_1_1mechanisms_1_1config_1_1FlyWheelConfig.html)

`FlyWheelConfig` holds physical and simulation parameters for a `FlyWheel` mechanism.

{% hint style="info" %}
**Simulation Note:** Moment of inertia is not configured on `FlyWheelConfig`. Set it via `SmartMotorControllerConfig::WithMOI()`.
{% endhint %}

***

## Constructor

```cpp
FlyWheelConfig() = default;
```

***

## Builder methods

All methods return `FlyWheelConfig&` for chaining.

| Method                                                               | Description                                                                                                                                                                                                     |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `WithTelemetryName(const std::string& name)`                         | Name used for SmartDashboard and log entries                                                                                                                                                                    |
| `WithRollerDiameter(wpi::units::meter_t diameter)`                   | Roller/flywheel outer diameter, used for surface speed calculations                                                                                                                                             |
| `WithSimColor(const wpi::util::Color8Bit& color)`                    | Color of the simulated flywheel (default: orange)                                                                                                                                                               |
| `WithMechanismPositionConfig(const MechanismPositionConfig& config)` | Where the mechanism is on the robot, for `GetPose3d()`, and the plane it moves in. See [MechanismPositionConfig](https://yams.yassrobotics.com/api-reference/c++-reference/config/mechanism-position-config.md) |

***

## Getters

```cpp
std::string GetTelemetryName() const;
std::optional<wpi::units::meter_t> GetRollerDiameter() const;
wpi::util::Color8Bit GetSimColor() const;
const MechanismPositionConfig& GetMechanismPositionConfig() const;
```

Getters for optional fields return `std::nullopt` if the corresponding setter was not called.

***

## Example

```cpp
config::FlyWheelConfig flywheelConfig;
flywheelConfig.WithRollerDiameter(0.1016_m)
              .WithTelemetryName("Shooter");
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://yams.yassrobotics.com/api-reference/c++-reference/config/flywheel-config.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
