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

# Gravity Compensation Config Parameters

> Every setting for axol gravity-comp — what it does and its default.

export const F = ({children}) => <code style={{
  whiteSpace: "nowrap"
}}>{children}</code>;

export const prefix_0 = "axol."

Every setting for `axol gravity-comp`. Add any flag below to the command, or set it once in the control panel — see [Command configuration](/cli/configuration) for config files and syntax details.

```bash theme={null}
axol gravity-comp --kd 0.8 --axol.left.elbow.mass 0.3
```

## General

| Flag              | Default          | Description                                                                                                                                      |
| ----------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--left_channel`  | `can_alm_axol_l` | CAN interface for the left arm. `null` disables the arm.                                                                                         |
| `--right_channel` | `can_alm_axol_r` | CAN interface for the right arm. `null` disables the arm.                                                                                        |
| `--free_joints`   | `null` (all)     | Joints to gravity-compensate, e.g. `[WRIST_3]` or `[SHOULDER_1,ELBOW]`. Other joints hold rigidly. `null` frees all seven.                       |
| `--kd`            | `0.5`            | Damping (Nm·s/rad) on freed joints. Higher is less floppy.                                                                                       |
| `--record`        | `null`           | Record the hand-guided motion to `~/.almond/recordings/<name>_*.npz` so [`motion.build`](/cli/motion-build) can turn it into a reference motion. |
| `--rate_hz`       | `250.0`          | Control-loop rate (Hz).                                                                                                                          |
| `--log_level`     | `INFO`           | `DEBUG`, `INFO`, `WARNING`, or `ERROR`.                                                                                                          |
| `--config_path`   | —                | Load a JSON/YAML config file. Flags override it.                                                                                                 |

<h2 id="robot">
  Robot
</h2>

Arm stiffness, gripper limits, and per-joint gains. The `mass` and `com` values are what gravity comp uses to hold the arm weightless — tune them if an arm sags or pushes back.

| Flag                                          | Default   | Description                                                                                                                                                                                                                                                                                                                                        |
| --------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <F>--{prefix_0}left\_stiffness</F>            | `1.0`     | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). Lower values only add compliance — the arm tracks a little less tightly but yields more to obstacles. One number applies to every joint; a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. |
| <F>--{prefix_0}right\_stiffness</F>           | `1.0`     | Same, for the right arm.                                                                                                                                                                                                                                                                                                                           |
| <F>--{prefix_0}has\_gripper</F>               | `true`    | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8.                                                                                                                                                                                                                    |
| <F>--{prefix_0}max\_step\_rad</F>             | `0.5`     | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables.                                                                                                                                                                                                                        |
| <F>--{prefix_0}left.gripper.torque\_limit</F> | `0.5`     | Grip force — peak gripper torque (Nm).                                                                                                                                                                                                                                                                                                             |
| <F>--{prefix_0}left.gripper.max\_speed</F>    | `10.0`    | Maximum gripper speed (rad/s).                                                                                                                                                                                                                                                                                                                     |
| <F>--{prefix_0}left.elbow\.kp</F>             | per joint | Position stiffness of one joint, in `[0, 500]`. This is the stiffness-`1` value.                                                                                                                                                                                                                                                                   |
| <F>--{prefix_0}left.elbow\.kd</F>             | per joint | Velocity damping in the motor firmware, in `[0, 5]`.                                                                                                                                                                                                                                                                                               |
| <F>--{prefix_0}left.elbow\.kd\_host</F>       | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. Scaled down automatically in poses where the joint carries less inertia. `0` on joints whose firmware damping is enough.                                                                                                                    |
| <F>--{prefix_0}left.elbow\.kd\_host\_hz</F>   | `null`    | Centre frequency (Hz) of the band the host damping acts in. `null` tracks the arm's pose automatically.                                                                                                                                                                                                                                            |
| <F>--{prefix_0}left.elbow\.kd\_host\_q</F>    | `null`    | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`.                                                                                                                                                                                                                                                                                    |
| <F>--{prefix_0}left.elbow\.j\_eff</F>         | per joint | Effective inertia (kg·m²) used for acceleration feed-forward.                                                                                                                                                                                                                                                                                      |
| <F>--{prefix_0}left.elbow\.mass</F>           | per joint | Mass (kg) of the link, used for gravity compensation. Tune if an arm sags or pushes back in [gravity comp](/operations/gravity-comp).                                                                                                                                                                                                              |
| <F>--{prefix_0}left.elbow\.com</F>            | per joint | Centre of mass `[x, y, z]` (m) of the link.                                                                                                                                                                                                                                                                                                        |
| <F>--{prefix_0}left.elbow\.friction.fc</F>    | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction).                                                                                                                                                                                                                                                              |
| <F>--{prefix_0}left.elbow\.friction.k</F>     | per motor | Friction curve sharpness.                                                                                                                                                                                                                                                                                                                          |
| <F>--{prefix_0}left.elbow\.friction.fv</F>    | per motor | Viscous friction (Nm·s/rad).                                                                                                                                                                                                                                                                                                                       |
| <F>--{prefix_0}left.elbow\.friction.fo</F>    | per motor | Constant torque offset (Nm).                                                                                                                                                                                                                                                                                                                       |

Per-arm and per-joint flags are shown for `left` / `elbow`. Swap in `right`, or any joint: `shoulder_1`, `shoulder_2`, `shoulder_3`, `elbow`, `wrist_1`, `wrist_2`, `wrist_3`.

<Note>
  A robot calibrated with [`tune.pid --save`](/cli/tune-pid), [`tune.friction --save`](/cli/tune-friction), or [`tune.gravity --save`](/cli/tune-gravity) uses its own measured values (from `~/.almond/calibration.json`) instead of the defaults below. Flags you pass still override both.
</Note>

<Accordion title="Per-joint defaults">
  Both arms share these. `kp`/`kd` are the stiffness-`1` values (the default); the **soft** columns are what stiffness `0` blends toward. `shoulder_1` also sets `kd_host_q` to `3.0`; every other joint leaves it `null`.

  | Joint        | `kp` | `kd` | `kd_host` | `j_eff` | `mass` (kg) | soft `kp` | soft `kd` |
  | ------------ | ---- | ---- | --------- | ------- | ----------- | --------- | --------- |
  | `shoulder_1` | 250  | 3.5  | 40        | 1.27    | 1.80        | 40        | 1.4       |
  | `shoulder_2` | 250  | 3.5  | 35        | 1.1     | 1.00        | 50        | 1.57      |
  | `shoulder_3` | 180  | 5.0  | 0         | 0.25    | 3.75        | 45        | 1.0       |
  | `elbow`      | 130  | 5.0  | 0         | 0.6     | 0.25        | 40        | 2.22      |
  | `wrist_1`    | 180  | 1.7  | 0         | 0       | 0.25        | 30        | 0.69      |
  | `wrist_2`    | 130  | 3.5  | 0         | 0       | 0.65        | 25        | 1.5       |
  | `wrist_3`    | 130  | 2.0  | 0         | 0       | 0.75        | 25        | 0.9       |
</Accordion>

<Accordion title="Per-motor friction defaults">
  Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on the reference robot with [`tune.friction`](/cli/tune-friction).

  | Joint        | Left arm                         | Right arm                         |
  | ------------ | -------------------------------- | --------------------------------- |
  | `shoulder_1` | `0.9091, 799.59, 0, 0.37`        | `1.2972, 742.11, 0, −0.1557`      |
  | `shoulder_2` | `1.1378, 756.76, 0, −0.3969`     | `1.3950, 768.06, 0, 0.2082`       |
  | `shoulder_3` | `0.3599, 835.51, 0, −0.0133`     | `0.4377, 107.94, 0.0853, −0.0147` |
  | `elbow`      | `0.6023, 855.95, 0, −0.072`      | `0.6066, 784.78, 0, 0.049`        |
  | `wrist_1`    | `0.3765, 88.91, 0.0298, −0.0115` | `0.5245, 98.58, 0.3062, −0.0097`  |
  | `wrist_2`    | `0.1521, 780.31, 0, −0.0152`     | `0.1092, 899.67, 0, 0.0021`       |
  | `wrist_3`    | `0.0714, 927.26, 0, 0.0042`      | `0.1172, 204.46, 0, 0.0042`       |
</Accordion>
