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

# Calibrating Axol

> Measure each joint's friction and gravity so Axol's arms move smoothly at slow speed.

Axol's arm controllers cancel the friction and gravity at each joint. Every gearbox is slightly different, so each Axol needs its own measurements for smooth slow motion. Calibrate after you set up Axol, and again after you replace a joint or gearbox.

Until you calibrate, Axol uses default values that work on any unit. Slow, precise motion is rougher with the defaults.

## Before you start

* Clear the space around both arms.
* Keep the E-Stop within reach.
* Stop any other operation that is using Axol.
* Plan for about 1.5 hours. Each joint takes about 6 minutes.

## Run the calibration

In a terminal on the robot's computer, run:

```bash theme={null}
axol tune.factory
```

You can also press **Factory calibration (all joints)** in the [diagnostics dashboard](https://docs.almond.bot/guides/diagnostics-dashboard.md).

Axol moves each joint of both arms back and forth at slow and moderate speeds, starting at the wrists. From these sweeps it measures each joint's friction and the weight of the links it carries. To calibrate one arm only, see [`tune.factory`](https://docs.almond.bot/cli/tune-factory).

The new calibration takes effect on this computer as soon as the run finishes. It is saved to `~/.almond/calibration.json`.

## Share the calibration with other computers

The calibration is stored under the serial number of Axol's hub, which stays with the arms. If the computer has an upload key, the run uploads the calibration when it finishes. Add the key to `.env` on the computer you calibrate from:

```bash theme={null}
AXOL_SUPABASE_KEY=<service key with storage write access>
```

Without a key, the calibration is saved on this computer only, and the run tells you so. To upload it later, run [`axol calibration.push`](https://docs.almond.bot/cli/tune-factory#calibration-push). Add `--dry-run` to see what would be uploaded first.

Any computer connected to Axol downloads its calibration when you run [`axol can.setup`](https://docs.almond.bot/cli/can-setup). To download it at any other time, run `axol calibration.pull`. Downloading needs no key.

If a value is set in more than one place, a calibration file on the computer overrides the uploaded calibration, and the uploaded calibration overrides the defaults.

## Check the result

Run the slow test motion before and after you calibrate, and compare the shake scores:

```bash theme={null}
axol tune.motion --motion slow_osc --arms right --repeat 2
```

In this motion the right arm is bent up in front of Axol while the shoulder moves slowly back and forth. Each pass prints a shake score from the wrist camera's IMU. A lower score means a smoother arm. Run both measurements in the same session, because the score can drift by 10 to 20% over a day.

> [!NOTE]
>
> To recalibrate a single joint, use [`tune.friction --profile slow`](https://docs.almond.bot/cli/tune-friction) for friction and [`tune.gravity`](https://docs.almond.bot/cli/tune-gravity) for gravity. Then upload the result with `axol calibration.push`.


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