> 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/java-reference/config/pivot-config.md). Agents can also search and read this documentation through its [MCP server](https://yams.yassrobotics.com/~gitbook/mcp).

# PivotConfig

**Package:** `yams.core.mechanisms.config`\
**Javadoc:** [`PivotConfig`](https://javadocs.yassrobotics.com/yams/yams/core/mechanisms/config/PivotConfig.html)

`PivotConfig` configures a rotational mechanism in the XY plane (e.g., a turret or shooter hood). For mechanisms rotating in the XZ plane, use [ArmConfig](https://yams.yassrobotics.com/api-reference/java-reference/config/arm-config.md) instead.

All builder methods return the `PivotConfig` instance for chaining.

See also: [Pivot](https://yams.yassrobotics.com/api-reference/java-reference/mechanisms/pivot.md)

***

## Constructor

```java
PivotConfig()
PivotConfig(PivotConfig cfg)  // Copy constructor
PivotConfig clone()           // Deep copy
```

***

## Builder methods

> **All methods are optional.** Unlike `ArmConfig`, `PivotConfig` has no simulation-required parameters: a pivot does not use arm length in its physics model.

| Method                                                        | Parameters                                             | Description                                                                                                                                                                                                                                           |
| ------------------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `withHardLimits(Angle min, Angle max)`                        | `min`: lower bound, `max`: upper bound                 | Sets the physical rotation limits. The motor controller will not command positions outside these angles. Optional.                                                                                                                                    |
| `withTelemetry(String name, TelemetryVerbosity verbosity)`    | `name`: NT key prefix, `verbosity`: `LOW`/`MID`/`HIGH` | Enables NetworkTables telemetry for this mechanism. Optional.                                                                                                                                                                                         |
| `withSimColor(Color8Bit color)`                               | `color`: RGB color                                     | Sets the Mechanism2d visualization color. Defaults to orange if not set. Optional.                                                                                                                                                                    |
| `withMechanismPositionConfig(MechanismPositionConfig config)` | `config`: position config                              | Where the mechanism is on the robot, for `getPose3d()`, and the plane it moves in. See [MechanismPositionConfig](https://yams.yassrobotics.com/api-reference/java-reference/config/mechanism-position-config.md). Defaults to the XY plane. Optional. |

***

## Getters

| Method                         | Returns                        | Description                                                                     |
| ------------------------------ | ------------------------------ | ------------------------------------------------------------------------------- |
| `getTelemetryName()`           | `Optional<String>`             | The configured NT prefix, or empty if telemetry is not set.                     |
| `getTelemetryVerbosity()`      | `Optional<TelemetryVerbosity>` | The configured verbosity, or empty.                                             |
| `getLowerHardLimit()`          | `Optional<Angle>`              | Lower hard limit angle, or empty if not set.                                    |
| `getUpperHardLimit()`          | `Optional<Angle>`              | Upper hard limit angle, or empty if not set.                                    |
| `getSimColor()`                | `Color8Bit`                    | The visualization color. Always returns a value; defaults to orange.            |
| `getMechanismPositionConfig()` | `MechanismPositionConfig`      | The position/plane configuration. Always returns a value; defaults to XY plane. |

***

## Example

```java
PivotConfig config = new PivotConfig()
    .withHardLimits(Degrees.of(-180), Degrees.of(180))
    .withTelemetry("Turret", TelemetryVerbosity.MID);
```


---

# 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/java-reference/config/pivot-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.
