> 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/documentation/reference/mechanism-configs/shared-options.md).

# Shared options

`ArmConfig`, `ElevatorConfig`, `PivotConfig` and `FlyWheelConfig` share these options. They work the same way on each.

## `withTelemetry`

Names the mechanism and chooses how much it publishes. This is the mechanism's own name: the motor inside it has its own [`withTelemetry`](https://yams.yassrobotics.com/documentation/reference/editor/config/motor-basics.md#withtelemetry).

<figure><img src="https://1354553280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZM0CFmYiQzcrY4zDcTtZ%2Fuploads%2Fgit-blob-028153a5e05f59f979aecb9ab1b51806a0902b39%2Ftelemetry-tree.png?alt=media" alt="Two NetworkTables trees for a mechanism: the read-only values under NT Mechanisms and the tunable values under NT Tuning"><figcaption><p>Where a mechanism's values appear in NetworkTables.</p></figcaption></figure>

```java
.withTelemetry("Arm", TelemetryVerbosity.HIGH)
```

The name is the `<Mechanism>` part of every NetworkTables path, and the name [live tuning](https://yams.yassrobotics.com/documentation/how-to-tuning/live-tuning.md) uses. [Telemetry](https://yams.yassrobotics.com/documentation/understanding/telemetry.md) explains the paths and verbosity levels.

**Used in:** simulation and on the real robot.

**Available on:** `ArmConfig`, `ElevatorConfig`, `PivotConfig`, `FlyWheelConfig`.

## `withHardLimits`

Where the mechanism physically cannot go any further.

<figure><img src="https://1354553280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZM0CFmYiQzcrY4zDcTtZ%2Fuploads%2Fgit-blob-c86b8c09dc002c22d067c85853f47631572f6037%2Fmech-hard-limits.png?alt=media" alt="A bar of a mechanism&#x27;s travel. The hard limits at each end are physical stops. The soft limits sit a little inside them and are where the motor controller keeps the mechanism. withHardLimits is set on the mechanism config and the simulated mechanism cannot pass them. withSoftLimits is set on the motor config and the real motor controller will not drive past them."><figcaption><p>Hard limits are physical stops. Soft limits sit inside them.</p></figcaption></figure>

```java
new ArmConfig().withHardLimits(Degrees.of(-30), Degrees.of(110));
new ElevatorConfig().withHardLimits(Meters.of(0), Meters.of(1.3));
new PivotConfig().withHardLimits(Degrees.of(-180), Degrees.of(180));
```

The simulated mechanism stops dead at them, as the real one would against metal. They do not stop the real motor: that is what [`withSoftLimits`](https://yams.yassrobotics.com/documentation/reference/editor/config/limits-and-protection.md#withsoftlimits) is for. Set both, with the soft limits a little inside the hard ones.

**Used in:** simulation, where they are **required** for an `Arm`, `Elevator` or `Pivot` to be created, and on the real robot by `max()`, `min()`, `isAtMax()` and `isAtMin()` when no soft limit is set. On the real robot they never stop the motor.

**Available on:** `ArmConfig` and `PivotConfig` (angles), `ElevatorConfig` (distances). **Not on** `FlyWheelConfig`: a flywheel has no end to its travel.

## `withSimColor`

The color of the mechanism's line in its `Mechanism2d` window. The default is orange.

```java
.withSimColor(new Color8Bit(Color.BLUE))
```

**Used in:** simulation only.

**Available on:** `ArmConfig`, `ElevatorConfig`, `PivotConfig`, `FlyWheelConfig`.

## `withMechanismPositionConfig`

Places the mechanism on a drawing of the robot, so several mechanisms line up when you view them together.

<figure><img src="https://1354553280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZM0CFmYiQzcrY4zDcTtZ%2Fuploads%2Fgit-blob-625b8c9ce7ec9db1aef2a74189f11cc9f313f215%2Fmech-window.png?alt=media" alt="A Mechanism2d window showing a robot outline, the mechanism as an orange line and its setpoint as a grey line. withSimColor sets the color of the mechanism&#x27;s line. withMechanismPositionConfig sets where it sits on the robot with withRelativePosition, the size of the window with withMaxRobotLength and withMaxRobotHeight, and the plane it moves in with withMovementPlane. None of these change how the mechanism moves."><figcaption><p>The Mechanism2d window, and what each option changes in it.</p></figcaption></figure>

```java
.withMechanismPositionConfig(new MechanismPositionConfig()
    .withRelativePosition(new Translation3d(0.2, 0.0, 0.3)) // 20 cm forward, 30 cm up
    .withMaxRobotLength(Meters.of(0.85))
    .withMaxRobotHeight(Meters.of(1.2))
    .withMovementPlane(MechanismPositionConfig.Plane.XZ))
```

| Option                                     | What it sets                                                                            |
| ------------------------------------------ | --------------------------------------------------------------------------------------- |
| `withRelativePosition`                     | Where the mechanism's root is on the robot.                                             |
| `withMaxRobotLength`, `withMaxRobotHeight` | The size of the window. Without them it is twice the mechanism's length.                |
| `withMovementPlane`                        | The plane the mechanism moves in: `XZ` (seen from the side, the default), `YZ` or `XY`. |

**Used in:** simulation only. It changes the drawing and the mechanism's reported 3D position, never how the mechanism moves.

**Available on:** `ArmConfig`, `ElevatorConfig`, `PivotConfig`, `FlyWheelConfig`.

## Code reference

* [`MechanismPositionConfig`](https://github.com/Yet-Another-Software-Suite/YAMS/blob/master/yams/java/yams/core/mechanisms/config/MechanismPositionConfig.java)


---

# 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/documentation/reference/mechanism-configs/shared-options.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.
