> 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/arm-config.md).

# ArmConfig

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

`ArmConfig` configures a single-jointed arm mechanism. All builder methods return the `ArmConfig` instance for chaining.

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

***

## Constructor

```java
ArmConfig()
ArmConfig clone()  // Deep copy
```

***

## Builder methods

> **Required for simulation:** `withLength()` and `withHardLimits()` must be set; `Arm` throws `ArmConfigurationException` in simulation without them. All other methods are optional.
>
> The moment of inertia and starting position are no longer part of `ArmConfig`. Set them on the motor controller config with `SmartMotorControllerConfig.withMomentOfInertia(...)` and `SmartMotorControllerConfig.withStartingPosition(Angle)`.

| Method                                                        | Parameters                                             | Description                                                                                                                                                                                                                        |
| ------------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `withLength(Distance distance)`                               | `distance`: arm link length                            | **Required for simulation.** Sets the physical length of the arm link. Used by `SingleJointedArmSim`. Without this, the physics simulation cannot model the arm.                                                                   |
| `withHardLimits(Angle min, Angle max)`                        | `min`: lower bound, `max`: upper bound                 | **Required for simulation.** Sets the physical rotation limits used by `SingleJointedArmSim` and the Mechanism2d visualization. For limits enforced by the motor controller, use `SmartMotorControllerConfig.withSoftLimits(...)`. |
| `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). 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.                                  |
| `getLength()`                  | `Optional<Distance>`           | The arm length, or empty if not configured.                          |
| `getLowerHardLimit()`          | `Optional<Angle>`              | Lower hard limit angle, or empty.                                    |
| `getUpperHardLimit()`          | `Optional<Angle>`              | Upper hard limit angle, or empty.                                    |
| `getSimColor()`                | `Color8Bit`                    | The visualization color. Always returns a value; defaults to orange. |
| `getMechanismPositionConfig()` | `MechanismPositionConfig`      | The position/plane configuration.                                    |

***

## Example

```java
ArmConfig config = new ArmConfig()
    .withLength(Meters.of(0.6))
    .withHardLimits(Degrees.of(-90), Degrees.of(90))
    .withTelemetry("Arm", TelemetryVerbosity.HIGH);
```


---

# 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/arm-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.
