> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SafetyConfig

> Every safety field, what it does, and what changing it costs you.

The limits a follower applies to every command it receives. Pass one to the
constructor and it is enforced from then on.

```python theme={null}
from zeroruntime.teleops import SafetyConfig, FailsafeAction

follower = MyArm(MEETING_ID, safety=SafetyConfig(
    watchdog_timeout_s=0.5,
    max_staleness_ms=150.0,
    slew={"shoulder_pan": 4.0, "gripper": 8.0},
    on_starvation=FailsafeAction.HOLD))
```

## Fields

<ParamField path="watchdog_timeout_s" type="float" default="0.5">
  How long the follower waits before deciding something is wrong. It covers two
  cases: no commands arriving, and your own loop no longer calling `tick()`.
</ParamField>

<ParamField path="max_staleness_ms" type="float" default="100.0">
  Commands that arrive later than this are dropped instead of applied. Raise it
  on a slow link, lower it when a late command is worse than no command.
</ParamField>

<ParamField path="slew" type="float | dict" default="5.0">
  How far a joint may move in one tick, in descriptor units. A slower loop
  therefore means a slower arm.

  Pass a mapping when joints use different units, such as an arm in degrees
  with a gripper on `0…100`.
</ParamField>

<ParamField path="require_deadman" type="bool" default="True">
  Commands apply only while the operator holds the deadman.
</ParamField>

<ParamField path="on_starvation" type="FailsafeAction" default="HOLD">
  What the arm does when commands stop. `HOLD` keeps it where it is.
  `TORQUE_OFF` cuts power to the motors, so a loaded arm will fall, and it
  needs a `torque_enable()` method on your subclass.
</ParamField>

<ParamField path="resume_requires_reclaim" type="bool" default="False">
  Stay held after a trip instead of resuming on the next command. Only
  [`arm()`](/robotics/api-reference/python/follower#safety) releases it.
</ParamField>

<Note>
  Position limits are not set here. Return them from `Follower.limits()`
  instead.
</Note>

<Note>
  The defaults are set low on purpose. Measure `watchdog_timeout_s` and
  `max_staleness_ms` on your own network, under load, and set them from what you
  see.
</Note>

## Values

The ones you will see in practice:

```python theme={null}
SafeState:        HOLDING  ACTIVE  ESTOPPED
SafeStateReason:  STARVATION  STALLED  ESTOP  ROBOT_FAULT
FailsafeAction:   HOLD  TORQUE_OFF
```

`STARVATION` means no commands are arriving from the leader. `STALLED` means the
follower's own loop stopped calling `tick()`. One points at the far machine, the
other at this one.

## Related

<CardGroup cols={2}>
  <Card title="Follower" icon="robot" href="/robotics/api-reference/python/follower">
    Where this is passed, and the stop and resume methods that go with it.
  </Card>

  <Card title="Safety" icon="shield-halved" href="/robotics/concepts/safety">
    The states a follower moves between, and what to check before running.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.