# Development install Source: https://docs.almond.bot/advanced/development-install Install Axol from a source checkout with uv to work on the software or build the web UI. This page is for **working on the Axol software itself**: installing from a source checkout, choosing optional extras and building the web UI. To run Axol on the robot, use the [one-command install](/installation) instead. ## Install from a clone In your checkout, install the package with [`uv`](https://docs.astral.sh/uv/). Every dependency comes from PyPI: ```bash theme={null} uv sync ``` Then activate the virtual environment so the `axol` CLI is on your path: ```bash theme={null} source .venv/bin/activate ``` > [!TIP] > > Activate the environment in every new shell. Or start each command with `uv run` (for example, `uv run axol can.setup`) and skip activation. ## Optional extras Add optional extras as you need them. The install script includes `lerobot`, `sim` and `tracker`. | Extra | Contents | When to use | | - | - | - | | `lerobot` | LeRobot (from PyPI, pinned to 0.6.1) | `collect-data`, `run-policy` | | `sim` | viser | `teleop --sim` | ```bash theme={null} uv sync --extra lerobot --extra sim --extra tracker # same extras as the install script ``` > [!WARNING] > > On a Jetson, the PyTorch package from PyPI has no GPU support. `uv sync` also replaces any GPU build of PyTorch you installed yourself. To run policies on the Jetson's GPU, install a PyTorch and Torchvision build for your JetPack version after each `uv sync`. Remote inference and `--device cpu` work without it. > [!NOTE] > > Streaming the ZED cameras to the headset (`teleop --cameras`, `collect-data`) is not an extra. It needs system packages that [`axol provision`](/cli/provision) installs. See [Headset-video stack](#headset-video-stack) below. ## ZED Python bindings The ZED Python bindings (`pyzed`) are not on PyPI. Install the ZED SDK first, then run: ```bash theme={null} axol zed.install ``` See [`zed.install`](/cli/zed-install) for details. ## Headset-video stack Streaming the ZED cameras to the headset needs GStreamer, **PyGObject** and Axol's patched ZED GStreamer plugins. None of these come from PyPI. [`axol provision`](/cli/provision) installs them all, and it is safe to run again. The install script and the updater run the same command: ```bash theme={null} axol provision ``` Its main steps are listed below, in the order they run. Each optional step is skipped on hardware it doesn't apply to. You can also run most of them on their own. | Step | What it does | | - | - | | Quest over USB | Installs `adb` for the [Quest-over-USB](/guides/quest-over-usb) link. | | [`tracker.install`](/cli/tracker#axol-trackerinstall) | Installs Lighthouse tracking for [Mantis](/mantis/tracking). | | [`zed.driver`](/cli/zed-driver) | Upgrades the GMSL camera driver on a ZED Box Duo or Mini, or a ZED Link Duo on an AGX Orin. | | `gyro.install` | Gives access to the board's motion sensor, which [Jelly](/guides/vr-interface#jelly) uses to hold its heading. | | [`zed.install`](/cli/zed-install) | Installs the ZED Python bindings. | | [`gst.install`](/cli/gst-install) | Installs GStreamer and PyGObject. | | [`gst.build-zed`](/cli/gst-build-zed) | Builds the patched ZED GStreamer plugins. | | `rt.install` | Installs the realtime core that controls the arms. This step is required. | | [`jetson.setup`](/cli/jetson-setup) | On a Jetson, tunes power, clocks and scheduling for real-time control. | The Jetson tuning resets when the computer restarts. The install script's service applies it again at every boot with `axol provision --boot`. On a development checkout without that service, run `axol provision --boot` yourself after each restart. ## First-run hardware setup Before you run any motor or robot command, set up the CAN bus once: ```bash theme={null} axol can.setup ``` The command asks for `sudo` when it needs it. It also installs a service that brings the CAN interfaces back up when you unplug and replug an adapter. See [`can.setup`](/cli/can-setup) for details, and [`can.enable`](/cli/can-enable) to bring the interfaces up again by hand. ## Build the web UI `axol serve` serves the web UI from `web/app/dist`. To serve the control panel and VR interface from your own computer, build it once: ```bash theme={null} cd web npm install npm run build --workspace=packages/axol-vr-client # client package first npm run build --workspace=app # → web/app/dist ``` Then start the server and open the printed URL: ```bash theme={null} axol serve ``` You can skip the build. Without it, `axol serve` still runs, and the hosted UI at [axol.almond.bot](https://axol.almond.bot) connects to it. See [`serve`](/cli/serve) and the [Web Control Panel guide](/guides/control-panel). ## Next steps > [card] [CLI Reference](/cli/configuration) > > Every `axol` command and flag, and how configuration works. > [card] [Python API](/api/concepts) > > `Axol`, the kinematics solver, VR teleop, and the LeRobot wrappers. # Core Concepts Source: https://docs.almond.bot/api/concepts Conventions every Axol SDK module shares: async context managers, joint arrays and telemetry. Install the package with `uv sync` (see [Installation](/installation)), then import from its submodules, such as `almond_axol.robot` and `almond_axol.teleop`. The Axol SDK is organized into focused modules: ``` almond_axol/ ├── robot/ Axol (the robot) and Sim (visualizer) — start here ├── rt/ Axol's realtime hardware control core (axol-rt, 240 Hz) ├── kinematics/ Bimanual IK solver (JAX + pyroki) ├── teleop/ VR headset → IK → robot control loop ├── vr/ WebSocket server that receives VR frames ├── zed/ Local ZED camera enumeration + daemon control ├── motor/ Low-level async CAN motor interface ├── serve/ Web control-panel server (FastAPI) behind `axol serve` ├── policy/ Serve your own model to run-policy (no LeRobot needed) └── lerobot/ LeRobot Robot / Teleoperator / Camera wrappers (requires lerobot extra) ├── robot/ AxolRobot — LeRobot Robot wrapping the async hardware driver ├── teleop/ AxolVRTeleop — LeRobot Teleoperator wrapping VRTeleop └── camera/ ZedCamera — LeRobot Camera for a locally attached ZED ``` The browser front-ends are outside the Python package, in `web/`. The [VR teleop interface](/guides/vr-interface) and the [web control panel](/guides/control-panel) are both built to `web/app/dist` and served by [`axol serve`](/cli/serve). End-to-end data flow for teleoperation: ``` VR headset → VRServer (WSS) → VRTeleop → KinematicsSolver → Axol (axol-rt, 240 Hz) → motors ``` End-to-end data flow for LeRobot data collection: ``` VR headset → AxolVRTeleop.get_action() → AxolRobot.send_action() → motors ↑ AxolRobot.get_observation() → dataset (joints from telemetry, cameras from ZedCamera) ``` ## Async context managers `Axol`, `Sim`, `VRTeleop` and `VRServer` open and close hardware resources in `__aenter__` and `__aexit__`. Always use them with `async with`. ## Joint arrays Every method that reads or writes joint state uses an `np.ndarray` of shape `(8,)` in `Joint` enum order: `SHOULDER_1`, `SHOULDER_2`, `SHOULDER_3`, `ELBOW`, `WRIST_1`, `WRIST_2`, `WRIST_3`, `GRIPPER`. Arm joints are in radians. The gripper runs from `0.0` (closed) to `1.0` (fully open). ## Telemetry vs. one-shot reads `.positions` and `.torques` are cached properties that don't block. Read them in a tight control loop without `await`. While the robot is enabled, the realtime core keeps these caches filled, so you don't need to start telemetry. On a robot that is connected but not enabled, `start_telemetry(hz)` starts a background polling loop that fills the same caches. The cache is empty until the first reply arrives, and a MyActuator motor rebooting after a control-mode change can take a moment to answer. Call `await wait_for_telemetry()` once after `start_telemetry()`, before the first `.positions` read. Without the core, direct calls such as `await get_positions()` send individual CAN reads. They suit diagnostics but are too slow for real-time control. # almond_axol.kinematics Source: https://docs.almond.bot/api/kinematics Bimanual inverse kinematics solver using pyroki and JAX/jaxls. Bimanual inverse kinematics using pyroki and JAX/jaxls. Creating a `KinematicsSolver` loads the bundled URDF, builds the collision model between the arms and the torso (`self_collision`, on by default), and JIT-compiles the solver. It compiles the solve both with and without elbow hints, so box mode's first frame never waits for a compile. The first solver in a process takes a few seconds to create. Later calls and later solver instances are fast. > [!NOTE] > > Solver startup is cached at two levels, both automatic: > > * **Per machine.** The XLA compile is saved to `~/.almond/jax-cache`, so its cost (minutes on a Jetson with an empty cache) is paid once per machine. The cache key includes the solver graph and the `jax`/`jaxlib` versions and backend, so upgrading JAX or changing the solver compiles again. Set `JAX_COMPILATION_CACHE_DIR` to use another location. > * **Per process.** The URDF, pyroki robot and collision model are built once per process and shared by every `KinematicsSolver` and `AxolForwardKinematics` instance. Extra instances don't repeat the JAX trace or the jaxls analysis. > > Every new process still spends several seconds on imports, URDF parsing and the jaxls tracing pass (the `Building optimization problem` and `Vectorizing group` log lines). `axol teleop` and `axol serve` do this while the IK worker starts. > > The disk cache covers compiles that happen after it is turned on, which `KinematicsSolver` and `AxolForwardKinematics` do in `__init__`. If your script runs its own JAX or jaxls work **before** creating a solver, call `almond_axol.kinematics.enable_persistent_compilation_cache()` first. ```python theme={null} from almond_axol.kinematics import KinematicsSolver, KinematicsConfig ``` All poses are in the robot's world frame: **+x forward, +y left, +z up** (FLU), with the origin at the base of the torso axis. Every joint vector the solver takes or returns is in the robot's own order: the left arm's 7 joints in `ARM_JOINTS` order (`shoulder_1` to `wrist_3`), then the right arm's. `q[:7]` and `q[7:]` are the per-arm arrays `motion_control` takes, without the gripper slot. ```python theme={null} import numpy as np from almond_axol.kinematics import KinematicsSolver, KinematicsConfig solver = KinematicsSolver(KinematicsConfig(pos_weight=100.0)) q = np.zeros(solver.num_joints, dtype=np.float32) # [left s1…w3, right s1…w3] # Inverse kinematics → new joint array pos = np.array([0.3, 0.2, 0.4], dtype=np.float32) # 30 cm forward, 20 cm left rot = np.eye(3, dtype=np.float32) q = solver.ik(q, left_pose=(pos, rot)) left_arm, right_arm = q[:7], q[7:] # ARM_JOINTS order, ready for motion_control # Forward kinematics → (left, right), each a (pos (3,), rot (3, 3)) numpy # pair — the same format ik takes. Reading a pose, nudging it, and solving # for the joints is a round trip: (l_pos, l_rot), (r_pos, r_rot) = solver.fk(q) q = solver.ik(q, left_pose=(l_pos + np.array([0.0, 0.0, 0.05]), l_rot)) ``` ## Robot models The bundled URDFs are in `almond_axol/kinematics/urdf/`, one per version. All but `axol.urdf` are generated from the Onshape exports by `scripts/build_urdfs.py`. They share the body and arm meshes in `meshes/jelly/`, and keep the parts specific to each version in `meshes//`: | File | Version | Joints besides the 14 arm joints | | - | - | - | | `axol.urdf` | Axol Legacy, the original model (the default) | none | | `axol_standalone.urdf` | Standalone: the shoulder bar and head camera, nothing below | fingers | | `axol_ox_cart.urdf` | Axol on Ox Cart | the cart's lift (`lift`), fingers | | `axol_owl.urdf` | Axol on Owl Mount: a column on a foot plate | fingers | | `axol_jelly.urdf` | Axol on Jelly, picked automatically when Jelly is enabled | `base_x`, `base_y`, `base_yaw` (the base in the plane, for simulators), the two-stage lift (`lift`, `lift_2`), wheels, fingers | | `axol_jelly_parcel.urdf` | Axol on Jelly with the parcel gripper, when `axol.gripper` is `parcel` | as above, with a hinged plate per gripper | **One model for everything.** Each generated file describes the full robot. IK, the sim viewer, the headset overlay, the control panel's viewer and physics simulators all load it. With every body joint at zero, the torso root (`root`) is the world origin, so poses match `axol.urdf`. IK loads the file through `almond_axol.kinematics.model.ik_urdf`, which: * **freezes every joint except the arm joints.** The base, lift, fingers and wheels stay at zero, so the lifts are fully raised. * **uses simpler collision shapes than each part's hull.** These are the custom `` elements, which other importers ignore. `axol.urdf` carries them too. Each body part is a box or capsule fitted to it, and each arm part and finger is a capsule fitted to it. Every shape encloses its part. An `` cylinder is read as a capsule: its radius, and the length of the straight section along the origin's z axis. The parcel gripper's plate is one capsule over its whole swing. To see the shapes over the robot model, run `uv run python scripts/view_ik_collision.py` and open `http://localhost:8003`. Add `--gripper parcel` or `--model owl` for another model. **Picking the version.** With Jelly enabled, the model is Axol on Jelly. Otherwise it is the mount picked under **Mount** on the control panel's Robot tab, saved as `kinematics.mount`: `classic` (Legacy, the default), `standalone`, `ox_cart` or `owl`. `kinematics.robot_model` forces a version. Each version tells IK which parts of the body to keep the arms away from: * **Ox Cart:** the lift column. IK keeps the cart's lift fully raised, so its caster frame is out of reach. If the lift is lowered, the frame comes up toward the hands, and IK doesn't account for it. * **Owl Mount:** the column and its foot plate. The foot plate is left out of the hard upper-arm guard, since it sits under the arms' path. * **Jelly:** the deck, also left out of the hard upper-arm guard. The lift carries the arms down while the deck stays on the ground. Teleop passes the height the lift reports to IK, which moves the deck and the lower column up toward the arms by that amount. Until the lift first reports a homed height, IK treats it as fully raised, and if the readings stop, IK keeps the last height. `KinematicsSolver.lift_contact()` reports how far each arm is inside the deck's soft-cost shell and the direction out. Teleop uses it to move arms that aren't tracking out of the deck's way (`lift_clear_step()`), to raise the return-to-rest goal over the deck (`lift_clear_pose()`), and to keep an engaged arm's target at the height the deck holds it. * **Parallel gripper (every version but `axol.urdf`):** teleop also passes each gripper's commanded opening to IK, which slides the fingers to match. Until the first command, IK treats both grippers as fully open. In `axol.urdf` the fingers are part of the gripper's shape. **Parcel gripper.** With `axol.gripper` set to `parcel`, Axol on Jelly uses `axol_jelly_parcel.urdf` everywhere a URDF is chosen: the IK solver (`KinematicsConfig.gripper`, which teleop sets from `AxolConfig.gripper`), the sim viewer, the headset overlay and the control panel's pose viewer. Each gripper is a fixed jaw (`*_gripper`) and a plate hinged on it (`*_plate`). The hinge, `*_plate_joint`, turns through half a turn, with 0 alongside the jaw. The parcel gripper has no wrist cameras, so this model has only the head camera frames. The parcel gripper model exists for Jelly only. The other versions keep the parallel gripper whichever gripper is fitted. All versions share the same arm chain, so their forward kinematics match. Every generated model has camera optical frames in the ROS optical convention (+z along the optical axis, +x to the right of the image, +y down): * `left_wrist_camera_optical` and `right_wrist_camera_optical` (parallel gripper only) * `head_camera_left_optical` and `head_camera_right_optical` **In a physics simulator.** Mesh paths are relative, so the files import without a ROS package: * **Joints:** Every moving part is a joint. The Jelly base moves through `base_x`, `base_y` and `base_yaw`. The x-drive's omni rollers are not modelled, so plain wheels can't strafe. Each finger pair is one joint (`left_finger_1_joint`, `right_finger_1_joint`), and the second finger mimics it. Importers that ignore `` treat the mimicked joints as independent, so command them with the same value. * **Joint friction and drives:** Each arm joint carries `AxolConfig`'s measured friction for its arm, as `` (Coulomb) and `damping` (viscous). The motors' impedance gains are on the same joint as `` (`kp` in N·m/rad, `kd` in N·m·s/rad). URDF has no drive-gain element, so importers ignore this custom one: read it and set each joint's position-drive stiffness and damping after import. The controller-only terms `j_eff` and `kd_host` are left out. * **Masses:** The arm masses and centres of mass are `AxolConfig`'s tuned values, the same ones gravity compensation uses. Wrist 3's mass is split across the gripper parts, keeping its total and centre of mass. The body, head, wheel and gripper-part masses are estimates, listed in each `Body`'s `masses` and each gripper's `wrist_parts` in the generator. Replace them with measured values. * **MuJoCo:** Compile with `fusestatic="false"`. Fusing fixed-jointed links misplaces their centres of mass. * **Cameras:** Attach Isaac Sim cameras to the `*_optical` links with ROS camera axes. Each wrist camera (ZED X One S fisheye) sits at the projection centre from Stereolabs' camera model, rolled so the gripper is at the bottom of the image as in real frames. Render the wrist cameras with the factory fisheye (Kannala-Brandt) calibration, not a pinhole model. The head camera (ZED X Mini Wide) frames are at each lens's projection centre from Stereolabs' model, 7.2 mm behind its front cover and 50 mm apart. ## `KinematicsSolver` interface | Member | Description | | - | - | | `num_joints` | Total actuated joints across both arms | | `joint_names` | Joint name strings (left arm then right, `ARM_JOINTS` order) | | `left_indices` / `right_indices` | Indices of each arm in the full `q` array: `[0…6]` and `[7…13]`. | | `fk(q)` | Forward kinematics. Returns `((pos_3, rot_3x3), (pos_3, rot_3x3))`, the same format `ik` takes. | | `elbow_positions(q)` | World-frame elbow positions, as `(left_3, right_3)`. | | `elbow_swivel(q)` | An `ElbowSwivel` per side, describing how the elbow can swing with the gripper mount held still. See below. | | `ik(q_current, left_pose, right_pose, left_elbow_pos, right_elbow_pos, ..., pose_weight_scale)` | IK from the current joint vector. Each pose is `(pos_3, rot_3x3)`, and the elbow hints are optional `(3,)` arrays. | | `set_posture_pose(q)` / `posture_pose` | Set or read the null-space attractor: the home pose that prevents joint drift. | | `to_pyroki_order(q)` / `from_pyroki_order(q)` | Convert to and from pyroki's internal joint order. Needed only when you use `solver.robot` or `solver.robot_coll` directly. | `ElbowSwivel` holds: * the shoulder centre, where the three shoulder axes meet * the elbow * the wrist centre, where the forearm roll axis meets `wrist_2`, in the gripper mount frame * the unit direction the elbow moves in as the arm swings with its mount held, from the null space of the arm's Jacobian. The wrist isn't spherical, so this swing isn't a circle. `pose_weight_scale` in `ik()` is a `(position, orientation)` pair, default `(1, 1)`. It multiplies `pos_weight` and `ori_weight` for one solve. Box mode uses `(2, 4)`. ## Straight-line paths `almond_axol.kinematics.path.plan_linear_segment(solver, q_from, q_to, ...)` returns joint vectors that move both **gripper tips** along a straight world-frame line between the poses of two joint configurations. Position is interpolated linearly and orientation with slerp. Each sample is solved with `ik()`, and the posture attractor moves between the endpoints so the elbow keeps the configuration you started from. `fk()` and `ik()` work in the gripper *mount* frame, where the URDF chain ends. The fingers close `GRIPPER_TIP_OFFSET` (145 mm along the link's -Z) beyond it. The planner keeps the tip on the line, because a mount moved in a straight line swings the tip through an arc as the wrist turns. `tip_poses(solver, q)` returns the tip frames. The planner solves the whole segment before anything moves and returns one vector per control tick at `rate`. You can stream the result to `motion_control` as it is. Timing follows the minimum-jerk curve `ease()`, with zero velocity and zero acceleration at both ends. Its peak speed is 1.875 times the average. IK doesn't run on every tick: * The planner solves at least `plan_rate` samples per second of motion (default 10, capped at `rate`). * It solves more often when the tip would otherwise move more than `MAX_STEP_M` (10 mm) or turn more than `MAX_STEP_RAD` (0.1 rad) between samples. * A clamped cubic spline fills in the ticks between solved samples. Solving on every tick would make the motion rougher. Each solve lands slightly off its neighbours' trend, and commanding every sample turns that error into acceleration noise. Because sample spacing follows distance, accuracy doesn't drop as speed rises. A faster segment has higher acceleration instead, which grows with the square of the speed. These parameters control accuracy: * `settle_fraction`: how close each sample is driven to its target, by solving again, before the planner moves on. * `pos_tolerance` and `ori_tolerance`: the error at which a sample counts as unreachable. The planner then raises `PathPlanningError` before anything moves. It also checks the path between solved samples, where a chord strays furthest from the line. * `min_travel` and `min_rotation`: an arm whose tip moves less than `min_travel` and turns less than `min_rotation` stays at `q_from` for the whole segment. At that scale the difference between two taught configurations is drift, and an arm chasing it would swing its elbow a long way for a tiny tip motion. The first vector returned reaches the same gripper pose as `q_from`, but usually with the elbow placed slightly differently. Commanding it directly puts that difference into a single tick. Plan each segment from the previous segment's final vector, and blend in the rest over a few tenths of a second. [`axol waypoints`](/cli/waypoints) does both. Planning uses a JAX trace that `KinematicsSolver` doesn't compile at startup. Call `path.warmup(solver)` once, outside time-critical code, to compile it. For a shortest-path move in joint space instead, such as a return to rest, see `almond_axol.teleop.trajectory.plan_collision_aware_trajectory`. ```python theme={null} from almond_axol.kinematics import KinematicsSolver, plan_linear_segment solver = KinematicsSolver() for q in plan_linear_segment(solver, q_a, q_b, speed=0.25, ang_speed=1.2, rate=250.0): await robot.motion_control(left=..., right=...) ``` ## `KinematicsConfig` fields | Field | Default | Description | | - | - | - | | `pos_weight` | `50.0` | End-effector position tracking weight | | `ori_weight` | `10.0` | End-effector orientation tracking weight | | `elbow_weight` | `0.0` | Weight on the elbow hint from the headset. `0` (the default) turns it off, because the headset's inferred elbow is unreliable on hardware. | | `rest_weight` | `15.0` | Per-step damping that penalises deviation from `q_current`. | | `posture_weight` | `5.0` | Persistent attractor to home pose (prevents null-space drift) | | `manipulability_weight` | `0.05` | Reward for configurations with high manipulability | | `limit_weight` | `75.0` | Joint limit penalty weight | | `self_collision` | `True` | Whether the collision model between the arms and the torso (`base` / `s1`) is part of the solve. See [Self-collision](#self-collision). | | `self_collision_margin` | `0.025` m | Minimum clearance between collision bodies. It is below the arm-to-torso clearance of normal teleop poses, so the collision cost stays inactive during ordinary tracking. | | `self_collision_weight` | `150.0` | Self-collision penalty weight (with `self_collision` on) | | `max_iterations` | `8` | Solver iterations per `ik()` call | | `cost_tolerance` | `1e-4` | Convergence tolerance. It is small enough that only real convergence ends a solve, not a rejected step. | | `lambda_initial` | `1e-2` | Initial Levenberg–Marquardt damping for each solve. | | `lambda_factor` | `10.0` | Multiplier on the damping after each rejected step, so the damping covers its useful range within the iteration budget. | | `max_joint_delta` | `~0.035` rad | Largest joint change per `ik()` call. A larger step is scaled as a whole vector, not clipped per joint, so the motion keeps its direction. | | `max_reach` | `0.82` m | Soft cap on the distance from shoulder to target, which stops runaway targets. It isn't the true reach, which depends on direction (about 0.69 to 0.78 m). | | `reach_soft_start` | `0.78` m | Distance from the shoulder where the soft reach cap starts to act. It is smooth and acts only on targets beyond any reachable pose. | | `manip_damping_threshold` | `0.015` | Manipulability below which extra damping ramps in for that arm. It is about 0.027 at rest, so the damping acts only near a singular pose. | | `manip_damping_boost` | `60.0` | Extra damping weight at zero manipulability, ramped in from `manip_damping_threshold` to slow the solver near singular poses. `0` disables. | | `limit_damping_margin` | `0.12` rad | Distance from a joint limit within which the joint is damped while it moves toward the limit. A joint resting against a limit stays free. | | `elbow_fade_band` | `0.15` m | Height band above the shoulder over which the elbow hint fades to zero, since the inferred elbow is unreliable at shoulder height and above. | | `robot_model` | `None` | Axol version to solve for: `classic`, `standalone`, `ox_cart`, `owl` or `mobile` (Axol on Jelly). `None` picks `mobile` when Jelly is enabled, else `mount`. | | `mount` | `None` | Mount without Jelly: `classic`, `standalone`, `ox_cart` or `owl`. `None` reads `kinematics.mount` from the shared settings. | | `gripper` | `None` | Fitted gripper, `parallel` or `parcel`. `None` reads `axol.gripper` from the shared settings. | | `backend` | `"jax"` | IK backend: `"jax"` (Pyroki, the default) or `"mink"`. The control panel sets it with **IK solver** under **Kinematics**. | When the headset elbow hint is on (`elbow_weight` above `0`), it is projected onto the elbow positions the robot can reach and fades out above shoulder height (see `elbow_fade_band`). In plain teleop with the hint off, the posture attractor sets the arm's swivel. Box mode can pass its own "elbows out" hint with a per-call weight, through `ik(elbow_weight=...)` and with no fade. It is set by `VRTeleopConfig.box_elbow_out` and `box_elbow_weight`, and is off by default. ### Self-collision With `self_collision` on (the default): * the collision model is built, and a soft self-collision cost is part of the IK solve * a hard guard between the upper arms and the base runs on every final step, so a pose target can't push an arm into the torso * the return-to-rest planner avoids collisions Plain teleop rarely needs it, because the operator's own arms keep targets plausible. [Box mode](/guides/vr-interface#box-mode) does need it: its parallel, closing gripper poses would otherwise fold the elbows into the base. With `self_collision` off, all of this is dropped, and the return-to-rest planner interpolates in joint space within the joint limits. Joint limits are clamped on every step either way. `self_collision_margin` and `self_collision_weight` tune the collision-aware solve. # almond_axol.lerobot Source: https://docs.almond.bot/api/lerobot LeRobot-compatible Robot, Teleoperator, and Camera wrappers for the Axol hardware. LeRobot-compatible wrappers for the Axol hardware. They need the `lerobot` extra. These classes implement the LeRobot `Robot`, `Teleoperator` and `Camera` interfaces, so Axol works with any LeRobot training or data-collection pipeline. The [`collect-data`](/cli/collect-data) and [`run-policy`](/cli/run-policy) commands are built on them. > [!WARNING] > > Treat policy checkpoints and LeRobot datasets as trusted input. LeRobot > reads dataset metadata and loads model files without a sandbox. Only load > checkpoints and datasets you created or got from a source you trust, > especially on a computer connected to the robot. ```python theme={null} from almond_axol.lerobot.robot import AxolRobot, AxolRobotConfig from almond_axol.lerobot.teleop import AxolVRTeleop, AxolVRTeleopConfig from almond_axol.lerobot.camera import ZedCamera, ZedCameraConfig ``` ## Use with the stock LeRobot CLIs The **`lerobot_robot_axol`** plugin on PyPI registers these wrappers with LeRobot, so the stock LeRobot CLIs (`lerobot-teleoperate`, `lerobot-record`, `lerobot-replay` and others) can drive Axol. Installing the plugin also installs `almond-axol[lerobot]`. Then select the devices by `type`: ```bash theme={null} pip install lerobot_robot_axol lerobot-teleoperate --robot.type=axol --teleop.type=axol_vr lerobot-record \ --robot.type=axol \ --robot.cameras "{overhead: {type: zed, serial: 41234567, stereo: true}}" \ --teleop.type=axol_vr \ --dataset.repo_id=${HF_USER}/my-dataset \ --dataset.num_episodes=5 ``` | Kind | `type` | Class | | - | - | - | | Robot | `axol` | [`AxolRobot`](#axolrobot) | | Teleoperator | `axol_vr` | [`AxolVRTeleop`](#axolvrteleop) | | Camera | `zed` | [`ZedCamera`](#zedcamera) | Teleoperation still uses the VR headset: open the [VR app](/operations/teleop) and connect to the Host Computer. For the best data collection performance, use [`collect-data`](/cli/collect-data) and [`run-policy`](/cli/run-policy) instead. They add ZED capture in a separate process, NVENC dataset encoding on the Jetson, and video streaming to the headset. > [!NOTE] > > The plugin needs LeRobot 0.6.1, Linux and Python 3.12 or later on the Host Computer. The hosted installer includes Python 3.13. The `zed` camera also needs `pyzed` ([`zed.install`](/cli/zed-install)). To add the plugin to an `axol` environment from the one-command installer, see the [plugin README](https://github.com/almond-bot/axol/tree/main/plugins/lerobot_robot_axol). If you install the plugin from PyPI into the hosted Axol environment, Axol updates from the installer or the control panel keep the same plugin version. If you installed it any other way, such as from a local path or a Git URL, the hosted update stops before it changes anything. Update that environment by hand, from the same source. ## `AxolRobot` LeRobot `Robot` that wraps the async `Axol` hardware driver. A background thread runs an asyncio event loop, so motor telemetry keeps streaming while the synchronous `get_observation()` and `send_action()` calls block the calling thread. ```python theme={null} from almond_axol.lerobot.robot import AxolRobot, AxolRobotConfig from almond_axol.lerobot.camera import ZedCameraConfig config = AxolRobotConfig( cameras={ "overhead": ZedCameraConfig(serial=41234567), "left_arm": ZedCameraConfig(serial=41234568), "right_arm": ZedCameraConfig(serial=41234569), }, ) with AxolRobot(config) as robot: obs = robot.get_observation() # joints + camera frames joint_obs = robot.get_joint_observation() # joints only, for tight control loops robot.send_action(obs) # hold current position ``` ### `AxolRobotConfig` fields | Field | Default | Description | | - | - | - | | `cameras` | `{}` | `ZedCameraConfig` instances keyed by name. Each opens a local ZED camera by serial number. A stereo camera can expose one or both eyes (see [`ZedStereoCamera`](#zedstereocamera)). | | `axol_config` | `AxolConfig()` | Per-joint gains and safety parameters passed to the hardware driver. | | `observe_torques` | `False` | Include joint torques in `observation.state`. | | `observe_cartesian` | `False` | Use each arm's 6-axis end-effector pose and gripper instead of 16 joint positions. Observations come from FK, and `send_action()` resolves poses to joint targets with IK. | | `left_channel` | `"can_alm_axol_l"` | SocketCAN interface for the left arm. | | `right_channel` | `"can_alm_axol_r"` | SocketCAN interface for the right arm. | | `video_backend` | `"auto"` | Camera capture backend: `"gst"` (GPU pipeline, low latency), `"sdk"` (ZED Python SDK), or `"auto"` (`gst` when installed, otherwise the SDK). Use the same backend for collection and inference, because their frames look different. | ### Key methods | Method | Description | | - | - | | `get_observation()` | Returns new camera frames with the nearest robot state, plus torques if enabled. See [Frame and state timing](#frame-and-state-timing). | | `get_observation_with_capture_timestamp()` | Returns the same observation and its median camera exposure time on the `perf_counter` clock. | | `get_joint_observation()` | Returns joint positions only, with no camera reads. Use it in fast teleop loops. | | `send_action(action)` | Sends joint position targets, or end-effector poses with `observe_cartesian`. The arms use impedance control and the grippers use position-force control. | | `positions` | `(left, right)` arm positions from the latest telemetry, each shape `(8,)`. | ### Frame and state timing `get_observation()` picks the camera frames first, then the robot state that matches them. It never waits for a new exposure: 1. It finds the newest exposure time that every camera has already delivered. 2. For each camera, it takes the stored frame nearest that time. Shared-memory readers keep a short history of frames for this (`latest_capture_ts()`, `read_nearest(target, tolerance_s)`). An in-process reader gives its newest frame. 3. From the realtime core's 240 Hz state history, it takes the joint state nearest the frames' median exposure time. FK, if enabled, runs after this. It never returns the same frame set twice, so a loop faster than the cameras waits at most one frame period. It raises an error instead of returning mismatched data when: * a camera has gone silent (its newest frame is a couple of frame periods old), * no state samples fall on both sides of the frame time, * the cameras and the state are too far apart in time. ## `AxolVRTeleop` LeRobot `Teleoperator` that wraps `VRTeleop`. It runs the VR WebSocket server and the IK process on a background thread, so `get_action()` doesn't block and is safe to call from any thread. ```python theme={null} from almond_axol.lerobot.teleop import AxolVRTeleop, AxolVRTeleopConfig teleop = AxolVRTeleop(AxolVRTeleopConfig()) pos_l, pos_r = robot.positions teleop.connect(q_start_left=pos_l, q_start_right=pos_r) while True: action = teleop.get_action() events = teleop.get_teleop_events() ``` ### `AxolVRTeleopConfig` fields | Field | Default | Description | | - | - | - | | `vr_teleop_config` | `VRTeleopConfig()` | Rest poses, IK rate and filter settings. See [`almond_axol.teleop`](/api/teleop). | | `kinematics_config` | `KinematicsConfig()` | IK solver weights. See [`almond_axol.kinematics`](/api/kinematics). | | `vr_server_config` | `VRServerConfig()` | WSS port and TLS certificate paths. See [`almond_axol.vr`](/api/vr). | ### Key methods | Method | Description | | - | - | | `get_action()` | Returns the latest smoothed joint positions as a LeRobot `RobotAction` dict. | | `get_teleop_events()` | Returns and clears pending episode events (`start_recording`, `TERMINATE_EPISODE`, `RERECORD_EPISODE`). | | `request_reset()` | Starts a collision-aware move back to the rest pose. | | `is_resetting` | `True` while the reset move is pending or running. | | `send_feedback_state(state)` | Sends a `VRState` override, such as `SAVING`, to all connected headsets. | ## `ZedCamera` LeRobot `Camera` for a ZED camera attached to this computer. It opens the camera by serial number through the ZED SDK and grabs frames on a background thread. It needs `pyzed` ([`zed.install`](/cli/zed-install)). ```python theme={null} from almond_axol.lerobot.camera import ZedCamera, ZedCameraConfig cam = ZedCamera(ZedCameraConfig(serial=41234567)) cam.connect() frame = cam.read_latest() # newest frame, shape (H, W, 3), non-blocking cam.disconnect() ``` Each frame carries two timestamps on the local `perf_counter` clock: * `capture_perf_ts`: when the sensor exposed the frame (from `TIME_REFERENCE.IMAGE`). * `receive_perf_ts`: when this process retrieved it. On `connect()`, the camera measures the gap between the two and logs a warning if the average is outside the expected range. | Method | Description | | - | - | | `read_latest(max_age_ms=500)` | Newest frame, without blocking. Raises `TimeoutError` if it is older than `max_age_ms`. | | `read_latest_with_ts()` | `(frame, capture_perf_ts, receive_perf_ts)` for the newest frame. | | `read_at_or_after(target_capture_perf_ts, timeout_ms=500)` | Blocks until a frame with `capture_perf_ts >= target` is available. | ## `ZedStereoCamera` Wrapper for a stereo ZED X. It opens one SDK connection and gets both eyes from each grab. The eyes are exposed as `left_view` and `right_view`, which have the same read methods as `ZedCamera`, so the rest of the pipeline treats them as ordinary cameras. ```python theme={null} from almond_axol.lerobot.camera import ZedStereoCamera, ZedCameraConfig stereo = ZedStereoCamera(ZedCameraConfig(serial=41234569, stereo=True)) stereo.connect() left = stereo.left_view.read_latest() # (H, W, 3), left eye right = stereo.right_view.read_latest() # (H, W, 3), right eye stereo.disconnect() ``` When an `AxolRobot` camera has `stereo=True`, its `eyes` setting decides the observation keys (see `AxolRobotConfig.observation_cameras()`): * `"both"`: camera `X` becomes `X_left` and `X_right`, and the dataset records both eyes. This is the default for the overhead camera. * `"left"` or `"right"`: that eye only, under the plain name `X`, so it looks like a mono camera. This is the default for wrist cameras. You rarely set `stereo` or `eyes` by hand. `collect-data` and `run-policy` call `AxolRobotConfig.apply_detected_stereo()`, which detects a stereo ZED X from its serial and sets `eyes` to `"both"` for the overhead camera and `"left"` for the others. `stream_eyes` sets which eyes go to the headset, separately from what is recorded. For example, stream `"both"` for depth during teleop while recording only `"left"`. ### `ZedCameraConfig` fields | Field | Default | Description | | - | - | - | | `serial` | `0` | Serial number of the camera to open. `0` means unassigned, and `collect-data` and `run-policy` skip it, so set only the cameras you have (at least one). List connected cameras with [`list_zed_devices()`](/api/zed). | | `fps` | `60` | Capture frame rate. `None` uses the camera's default. | | `width` | `960` | Frame width. With `height`, it must name a supported ZED resolution: `SVGA` 960×600, `HD1080` 1920×1080 or `HD1200` 1920×1200. `None` detects it on connect. | | `height` | `600` | Frame height (SVGA). | | `color_mode` | `RGB` | Output color channel order. | | `warmup_s` | `1` | Seconds to read frames during `connect()` before returning. | | `stereo` | `False` | Open the camera as a stereo ZED X, with both eyes from one grab. Detected from the serial at startup. | | `eyes` | `"both"` | Which eyes of a stereo camera to record: `"both"`, `"left"` or `"right"`. See [`ZedStereoCamera`](#zedstereocamera). Ignored when `stereo=False`. | | `stream_eyes` | `None` | Which eyes of a stereo camera to stream to the headset. `None` follows `eyes`. Used by `collect-data` and `teleop` only, since `run-policy` streams no video. | | `record` | `True` | Whether to record this camera to the dataset. With `False` it can still stream. | | `stream` | `True` | Whether to stream this camera to the headset. With `False` it can still be recorded. | # almond_axol.motor Source: https://docs.almond.bot/api/motor Low-level async motor interface through the Rust CAN core. Low-level async interface for individual motors. The API is Python, but the Rust `axol-rt` transport sends and receives every CAN frame. Python never opens SocketCAN. Most code uses `Axol` instead. This layer is for diagnostics, custom control modes and bench tests of single motors. ```python theme={null} from almond_axol.motor import CanBus, Motor, ControlMode, MotorStatus, MotorGains, Joint ``` ```python theme={null} import asyncio from almond_axol.motor import CanBus, Motor, ControlMode, Joint async def main(): async with CanBus("can_alm_axol_l") as bus: elbow = Motor(bus, Joint.ELBOW) await elbow.enable() await elbow.set_control_mode(ControlMode.IMPEDANCE) pos = await elbow.get_position() # rad print("elbow position:", pos) await elbow.set_impedance(p_des=pos, v_des=0.0, kp=100.0, kd=2.0, t_ff=0.0) await elbow.disable() asyncio.run(main()) ``` ## `Motor` methods | Method | Description | | - | - | | `enable()` / `disable()` | Enable the motor, or disable it. A disabled motor has no torque. On a Damiao motor, `disable()` also clears a `LOST_COMM` fault (see below). | | `attach(mode)` | Reconnect to a motor that is already enabled, without changing its torque. Checks with reads only that it is enabled, fault-free and in `mode`. | | `is_holding()` | `True` if the motor is enabled and holding torque. Read-only (see below for how each motor family reports it). | | `clear_errors()` | Clear latched error flags | | `set_zero_position()` | Save the current position as the encoder zero, in flash. Set it at a mechanical end stop, not the rest pose. | | `set_control_mode(mode)` | Set the `ControlMode`, which mode-specific commands require. **MyActuator motors reboot to switch, with torque off for about 2 s**, so never call it on a motor holding a load. | | `get_control_mode()` | Read active mode from hardware (`None` for MyActuator) | | `get_model()` | Motor model string, e.g. `"RMD-X6-P20-60"` (`None` for Damiao) | | `get_firmware_version()` | Firmware VersionDate `int`, e.g. `2026042402` (`None` for Damiao) | | `get_position()` | Shaft position (rad); raises if telemetry is active | | `get_velocity()` | Shaft velocity (rad/s) | | `get_torque()` | Torque estimate (Nm); raises if telemetry is active | | `get_temperature()` | Motor temperature (°C) | | `get_voltage()` | Bus voltage (V) | | `get_error_code()` | `MotorStatus` | | `get_gains()` / `set_gains(gains)` | Read/write PID gains (persisted to flash) | | `set_impedance(p_des, v_des, kp, kd, t_ff)` | MIT impedance command; requires `IMPEDANCE` mode | | `set_position_velocity(position, max_speed)` | Built-in position controller; requires `POSITION_VELOCITY` mode | | `set_velocity(velocity)` | Built-in speed controller; requires `VELOCITY` mode | | `set_position_force(position, max_speed, max_torque)` | Damiao only; requires `POSITION_FORCE` mode | | `set_acceleration(acceleration, deceleration)` | Acceleration ramp (rad/s²) | | `set_can_id(can_id)` | Change CAN ID (persisted to flash) | | `start_telemetry(hz, torque=False)` / `stop_telemetry()` | Background polling loop | | `motor.telemetry_active` | `True` while the background polling loop is running. `get_position()` and `get_torque()` raise while it runs. | | `motor.position` | Cached position (rad); populated by telemetry or `set_impedance` responses | | `motor.has_position` | `True` once a position has been cached | | `motor.torque` | Cached torque (Nm); populated by telemetry with `torque=True` | Notes on the methods above: * `disable()` on a Damiao motor in the `LOST_COMM` fault, left by a session that ended without a clean shutdown, clears that fault so the motor reports `DISABLED`. Clearing never enables the motor, and other faults stay in place. * `attach()` uses reads only because `set_control_mode()` would reboot a MyActuator motor and drop its torque for about 2 s. * `is_holding()` on a Damiao motor means the feedback status is `ENABLED`, which is also true of a motor that was enabled but never commanded. On a MyActuator motor it means the running byte of status 1 is set and no fault is latched. * Damiao motors switch control modes with a register write, so switching while holding doesn't disturb them. ## Configuration parameters Both motor families have a named configuration table: MyActuator's `0xC0` parameters and Damiao's `0x7FF` registers. Use it to service a motor over CAN without the vendor's setup software. The [`motor.dump-config`](https://docs.almond.bot/cli/motor-dump-config), [`motor.set-config`](https://docs.almond.bot/cli/motor-set-config) and [`motor.restore-config`](https://docs.almond.bot/cli/motor-restore-config) commands are the usual way in. The same methods are on `Motor`: | Method | Description | | - | - | | `resolve_config_param(name)` | Look up a `MotorParam` by name for this motor's family | | `read_config(param)` | Read one parameter, in the unit its spec names | | `write_config(param, value)` | Write one parameter and persist it to flash/ROM | | `dump_config(raw_range=None)` | Read every known parameter; pass a `range` to sweep raw MyActuator indices | | `restore_config(values, *, include_protected=False)` | Write a saved config back; returns the parameters actually changed (protected ones skipped unless `include_protected`) | | `get_low_voltage_threshold()` / `set_low_voltage_threshold(volts)` | Undervoltage protection threshold (V); MyActuator only | | `get_can_timeout()` / `set_can_timeout(milliseconds)` | Loss-of-comms alarm time (ms); Damiao only | > [!NOTE] > > * On `enable()`, MyActuator motors set a low undervoltage threshold (`LOW_VOLTAGE`, -2 V), so a brief sag in bus voltage can't latch the level-2 undervoltage fault. > * Parameters whose `ParamSpec.min_firmware` is newer than the motor's firmware are left out of dumps and restores. `read_config` and `write_config` raise `MotorError` for them. > * Read-only parameters are never written. > * A restore skips protected parameters (factory calibration and identity, CAN IDs, baud rate) unless you pass `include_protected=True`. Writing them can leave a motor unable to commutate or unreachable on the bus. ## `ControlMode` values | Value | Description | | - | - | | `IMPEDANCE` | MIT impedance control (arm joints) | | `POSITION_VELOCITY` | Motor built-in position controller | | `VELOCITY` | Motor built-in speed controller | | `POSITION_FORCE` | Position with hard torque cap; Damiao only (gripper) | ## `MotorStatus` values `OK`, `DISABLED`, `OVER_VOLTAGE`, `UNDER_VOLTAGE`, `OVER_CURRENT`, `OVER_TEMPERATURE`, `MOS_OVER_TEMP`, `ROTOR_OVER_TEMP`, `LOST_COMM`, `OVERLOAD`, `MOTOR_STALL`\*, `ENCODER_ERROR`\*, `CALIBRATION_ERROR`\*, `POWER_OVERRUN`\*, `SPEEDING`\*, `OUTPUT_SHAFT_CALIBRATION_ERROR`†, `SENSOR_ERROR`†, `MOTOR_ENCODER_CALIBRATION_ERROR`†, `UNKNOWN` \* MyActuator only † Damiao only `UNKNOWN` is a fault. The motor reported a status code that Axol doesn't recognize. The control panel lists it as an *unknown fault*. ## Joint to driver mapping | Joint | Driver | CAN ID | | - | - | - | | `SHOULDER_1` – `WRIST_1` | MyActuator | `0x01` – `0x05` | | `WRIST_2`, `WRIST_3`, `GRIPPER` | Damiao | `0x06` – `0x08` | # almond_axol.policy Source: https://docs.almond.bot/api/policy Serve your own model as an Axol policy: receive joints and camera frames, return action chunks. The SDK for running a model that isn't a LeRobot checkpoint. You write a `Policy` and start it with `serve()`. Then run [Run Policy](/operations/custom-policy) or [DAgger collection](/cli/collect-dagger#remote-policies-through-the-custom-policy-interface) with policy type `custom`. The robot sends each observation (joint state and RGB camera frames) to your `infer()` and executes the action chunks it returns. `serve()` implements the endpoint side of the [custom policy interface](/api/policy-plan) for you. It agrees the session contract with the robot and caches every plan it publishes. It turns the robot's continuation reference into the rows still executing (`Observation.plan`), clears that history whenever the robot resets, and can optionally ensemble overlapping chunks. Your code only sees observations and returns chunks. It needs only Axol's base install (numpy, websockets, OpenCV and Pillow). LeRobot and torch are not required. ```python theme={null} from almond_axol.policy import Observation, Policy, PolicySpec, serve ``` ## Quick start ```python theme={null} import numpy as np from almond_axol.policy import Observation, Policy, PolicySpec, serve class HoldStill(Policy): """Holds the current pose. Swap in your model.""" def setup(self, spec: PolicySpec) -> None: # Load weights here; spec says what the robot will send and expect. self.index = [spec.state_names.index(name) for name in spec.action_names] def reset(self) -> None: pass # clear recurrent state def infer(self, obs: Observation) -> np.ndarray: # obs.state: float32 joints; obs.images["overhead"]: (H, W, 3) uint8 RGB target = obs.state[self.index] return np.tile(target, (30, 1)) # (T, D): one row per control tick serve(HoldStill(), host="0.0.0.0", port=8765) ``` A plain function works too, for stateless models: ```python theme={null} import numpy as np from almond_axol.policy import Observation, serve def infer(obs: Observation) -> np.ndarray: return obs.state[None, :] # a one-row chunk serve(infer, port=8765) ``` ## `Policy` Base class for a custom policy. Override `infer`. The other methods are optional hooks. | Method | Description | | - | - | | `setup(spec)` | Called once per robot connection, before any observation. `spec` is the session's [`PolicySpec`](#policyspec). Load your model here. Raising refuses the session, and the operator sees your message. | | `reset()` | Called whenever the robot discards its plan: at the start of every episode, and whenever execution restarts from scratch mid-episode (a stop, an operator takeover in DAgger, or recovery from a late reply). Clear recurrent state here. | | `infer(obs)` | Return an action chunk predicted from the [`Observation`](#observation). See [Action chunks](#action-chunks). | Set these class attributes to have the session refused before anything moves: | Attribute | Description | | - | - | | `action_names` | The action layout your model emits, in column order. The session is refused unless the robot's layout matches (for example, a joint-space model on a robot configured for Cartesian actions). `None` (default) accepts the robot's layout. | | `fps` | The control rate your model was trained at. The session is refused unless the robot runs at the same `--fps`. `None` (default) skips the check. | | `name` | Shown in the server's log when a robot connects. | The model, checkpoint and task instruction belong to your policy: pass them to its constructor. The robot sends neither its task label nor its policy path. ## `Observation` What `infer` receives: one observation per request, captured with the same exposure-time alignment as data collection. | Attribute | Description | | - | - | | `state` | `np.ndarray` (float32) in `PolicySpec.state_names` order. | | `state_names` | Names for each entry of `state`. | | `joints` | `state` as a `{name: value}` dict, e.g. `obs.joints["left_gripper.pos"]`. | | `images` | `{camera name: frame}`, each frame a `(height, width, 3)` uint8 **RGB** array. | | `plan` | The rows of the robot's current plan that haven't executed yet, aligned with your reply: `plan[k]` is what the robot would command at the tick your row `k` targets. `None` when nothing is executing (episode start, after a reset). Read-only. | | `continuation` | Raw `Continuation(prediction_id, from_row)` identifying the accepted plan and its first remaining row. Use it to index richer model-specific prediction state. `None` when no plan is accepted. | | `last_dispatched` | Independent `LastDispatched(prediction_id, row)` for the most recent completed local dispatch, when `PolicySpec.dispatch_feedback` is enabled. It can name a different prediction from `continuation`. | | `last_dispatched_action` | Read-only copy of the exact published action row named by `last_dispatched`, including server ensembling, before downstream robot filtering. `None` when no dispatch reference is present. | | `delay_steps` | The robot's estimate of how many of your rows will already have passed when your reply arrives. `None` unless the robot runs with `--plan_config.advertise_delay true`. | | `state_time_ns` | Robot-monotonic time the state was sampled. | | `image_time_ns` | Robot-monotonic capture time per camera. | | `state_sample_time_ns`, `image_capture_time_ns` | Aliases of `state_time_ns` and `image_time_ns`, matching the names on `PlanObservation`. | | `request_id` | This request's id, which is also the id of the plan you publish. | `last_dispatched` means the robot's local send of that row completed. It is not a motor acknowledgement, a measured pose, or proof that the target was reached. It is reported whether or not `continuation` is present. Sensor timestamps use the robot's monotonic clock. Don't compare them with the desktop's clock. ### Keeping model-specific prediction state Some policies keep more than the float32 action rows, such as rotation matrices, unclipped gripper openings or latent model state. If yours does, cache that state under `obs.request_id`. On the next request, `obs.continuation.prediction_id` and `from_row` tell you which cached prediction, and which row of it, to condition on. If the published action rows are enough, use `obs.plan` instead. Rules for the cache: * Keep each prediction named by `continuation` or `last_dispatched`, plus your newest one. The robot may never adopt a prediction you publish, so don't let rejected ones push out the adopted or dispatched one. * Clear the cache in `Policy.reset()`, and create it in `setup()` for each new connection. Request IDs can repeat after a reset. * Turn off server ensembling if your cache must match the published rows. Ensembling changes the rows after your model builds its cache. The server keeps both referenced plans itself, so `obs.plan` and `obs.last_dispatched_action` always match what it published. It rejects unknown or out-of-range references and duplicate request IDs, and clears its history on reset. Changing your own output arrays, or copies of observation arrays, can't change what was published. ## `PolicySpec` The robot's session contract, passed to `Policy.setup` (an alias of `PlanSpec`). | Attribute | Description | | - | - | | `state_names` | Order of `Observation.state`. | | `action_names` | The column order every action chunk must have. | | `cameras` | The cameras each observation carries (`CameraSpec` with `name` and `shape`). | | `camera_names` | The camera names only. | | `fps` | Control rate: row `k` of a chunk runs `k / fps` seconds after its request. | | `actions_per_chunk` | The most rows the robot uses from one chunk. Extra rows are dropped. | | `request_interval` | How many rows the robot executes between requests. | | `max_adoption_offset_steps` | The latest row a reply may start executing at. A slower reply triggers recovery. | | `dispatch_feedback` | Whether observations include the independent last-dispatched reference and its resolved action. | ### State and action names The names follow the robot's configuration, so you can train on a dataset recorded with [`collect-data`](/operations/data-collection) and use its `observation.state` / `action` names as-is. | Robot config | State / action names (per arm, `left_` then `right_`) | | - | - | | default (joint space) | `shoulder_1.pos`, `shoulder_2.pos`, `shoulder_3.pos`, `elbow.pos`, `wrist_1.pos`, `wrist_2.pos`, `wrist_3.pos`, `gripper.pos` (16 dimensions) | | `observe_cartesian: true` | `ee.x`, `ee.y`, `ee.z`, `ee.rx`, `ee.ry`, `ee.rz` (metres + rotation vector, world frame) and `gripper.pos` (14 dimensions) | | `observe_torques: true` | The state also carries each joint's `.torque` (actions don't) | Arm joints are radians. The gripper is normalized: `0.0` is closed and `1.0` is fully open. The gripperless SKU drops the `gripper.pos` entries. The observation and action layouts can differ, e.g. joint observations with Cartesian actions. ## Action chunks `infer` returns a chunk of future targets: * a `(T, D)` array-like (numpy, torch or nested lists) whose `D` columns follow `PolicySpec.action_names`; * a single `(D,)` action (a one-row chunk); or * a list of `{action_name: value}` dicts. Row `k` is the target for the `k`-th tick after the request was taken. The robot keeps executing its current plan while you infer. When your reply arrives, it switches to it at the row that is due by then: if 3 ticks passed, it starts at your row 3. Rows are never retimed. Rows beyond `actions_per_chunk` are dropped. Every command then goes through the robot's IK, velocity/acceleration shaping and contact safeguards. The robot executes your chunks **as published**, without blending them. Two ways to keep the hand-over smooth: * **Continue the motion in progress.** Condition your next chunk on `obs.plan`, the rows it will replace (real-time chunking). At minimum, start near `obs.plan[0]`. * **Let the server ensemble.** Pass `ensemble=` to `serve()` for chunked policies trained with ACT-style temporal ensembling (below). Replies must arrive within `max_adoption_offset_steps` rows (default 6, i.e. 200 ms at 30 Hz) and within 10 s overall. The robot then recovers: by default it holds, calls `reset`, and requests a fresh plan. `setup` has up to 5 minutes. Check an endpoint with [`check_policy`](#check_policy) before running it on the robot. ### `Prediction` Return `Prediction` when a particular reply needs a tighter adoption deadline: ```python theme={null} from almond_axol.policy import Policy, Prediction class DeadlinePolicy(Policy): def __init__(self, model): self.model = model def infer(self, obs): actions = self.model(obs.state, obs.images) return Prediction(actions, max_adoption_offset_steps=2) ``` `actions` takes any of the chunk formats above. `max_adoption_offset_steps` is the latest row, counted in control ticks from the request, at which the robot may start executing the reply. It is not a minimum wait or a clock time. It must be: * a nonnegative integer, * smaller than the number of rows the robot uses from the chunk, * no larger than the session's `max_adoption_offset_steps`. `None` keeps the session's deadline. The server adds the request ID and checks the reply before it caches and sends it. ## `serve` ```python theme={null} serve( policy, host = "0.0.0.0", port = 8765, *, ensemble = None, ) ``` Serves `policy` (a `Policy` or a callable `obs -> chunk`) until Ctrl+C. It accepts one robot at a time. An exception in your code is logged and sent back to the robot, which stops the rollout and shows the message. `ensemble=k` temporally ensembles overlapping chunks before publishing them. Each row is a weighted average of every prediction covering that tick, weighted `exp(-k·i)` with `i = 0` the oldest. `0.01` is ACT's default. Grippers and rotation-vector dims follow the newest prediction instead of being averaged. Leave it at `None` for policies that already produce smooth plans. > [!WARNING] > > The interface is unauthenticated plaintext, like the LeRobot inference > server. Bind `127.0.0.1` when the model runs on the robot's own machine. > Otherwise, keep the server on an isolated, trusted network and firewall the > port so only the robot's IP can connect: anyone who can reach it can > impersonate the policy and send arbitrary actions. ## `PolicyServer` The non-blocking form of `serve`: run it on a background thread, e.g. in a notebook or test. ```python theme={null} import threading from almond_axol.policy import Observation, PolicyServer def hold(obs: Observation): return obs.state[None, :] server = PolicyServer(hold, host="127.0.0.1", port=0) threading.Thread(target=server.serve_forever, daemon=True).start() print(server.port) # the bound port (port=0 picks a free one) server.shutdown() ``` | Method | Description | | - | - | | `serve_forever()` | Serve until `shutdown()`. | | `shutdown()` | Stop serving and close the socket. | | `port` | The bound TCP port. | ## `check_policy` Exercises an endpoint without a robot, e.g. in a unit test or CI. It plays the robot's side of a session on a virtual clock, using the same scheduler as `run-policy`. That scheduler decides when to request and which rows of a delayed reply to adopt, and recovers from late replies. The simulated arm tracks its commands perfectly. [`axol policy.check`](/cli/policy-check) is the same from the command line. ```python theme={null} from almond_axol.policy import check_policy, default_spec report = check_policy( "ws://127.0.0.1:8765", spec=default_spec(cameras=("overhead", "left_arm")), ticks=300, delay_steps=3, ) print(report.summary()) assert not report.recoveries ``` `delay_steps` is the simulated reply latency in ticks, independent of this machine's speed. `default_spec()` builds the contract `run-policy` sends with default settings. Its arguments are `cartesian`, `cameras`, `image_shape`, `fps`, `actions_per_chunk`, `request_interval` and `max_adoption_offset_steps`. `CheckReport` has these members: | Attribute | Description | | - | - | | `targets` | `(ticks, D)` executed targets. NaN rows mean nothing was executing, e.g. while waiting for the first plan. | | `plan_ids` | The plan each tick came from. | | `requests` | Requests sent. | | `adopted` | Replies adopted. | | `recoveries` | Why each recovery happened (late reply, exhausted plan). | | `latency_s` | Real round trip per request. | | `max_step_within_plan` | Per-dim largest step between consecutive ticks of one plan. | | `max_step_at_switch` | The same, where one plan hands over to the next. It should be no larger than `max_step_within_plan`. | | `summary()` | A readable report. | ## Robot side and wire format To implement the endpoint in another language, follow the [custom policy interface](/api/policy-plan) directly. These types are its Python form, and `PlanPolicyClient` is the robot's client: ```python theme={null} from almond_axol.policy import ( CameraSpec, Continuation, LastDispatched, PlanActions, PlanObservation, PlanPolicyClient, PlanSpec, ) ``` | Type | Purpose | | - | - | | `PlanSpec` | Ordered state/action layouts, cameras, control rate, horizon and scheduling contract | | `PlanObservation` | Timestamped measured state, RGB images and continuation/dispatch references | | `Continuation` | Accepted prediction identifier and first remaining row | | `LastDispatched` | Published row whose local send completed in the current generation | | `PlanActions` | Reply identifier, action matrix and optional tighter adoption deadline | | `PlanPolicyClient` | Connect, reset, infer and close. Inference and reset share one owner | The SDK speaks interface version 2, the only version the robot accepts. # Custom policy interface Source: https://docs.almond.bot/api/policy-plan Compressed observations and cached action-plan continuation without model-specific robot code. `run-policy --policy_type custom` and `collect-dagger --policy_type custom` use this interface to talk to your policy endpoint. The [`almond_axol.policy`](/api/policy) SDK's `serve()` implements the endpoint side for you. Read on to implement it yourself, for example in another language. The handshake carries `version: 2`. The robot rejects any other version and never downgrades. Each side owns different work: * **Your endpoint** owns the model, the instruction text, normalization, conditioning and its cache of predictions. * **The robot** owns camera capture, the dispatch clock, and replacing future targets when a new plan arrives. Every reply contains absolute targets in the agreed action layout, units and robot frames. The robot checks names and shapes. Matching units and frame conventions is up to your endpoint. The observation and action layouts can differ, for example joint observations with Cartesian actions. ## Setup `PlanPolicyClient.connect(spec)` sends `hello`. The endpoint replies with `ready`, which echoes the whole validated spec. The client refuses any mismatch. ```python theme={null} from almond_axol.policy.plan_protocol import PlanSpec from almond_axol.policy.protocol import CameraSpec spec = PlanSpec( state_names=("joint.left", "joint.right"), action_names=("target.x", "target.y", "gripper"), cameras=(CameraSpec("overhead", (288, 480, 3)),), fps=30, actions_per_chunk=30, request_interval=10, max_adoption_offset_steps=6, dispatch_feedback=True, ) ``` `hello` and `ready` both contain: * `protocol: "axol-policy"` and `version: 2`, * the ordered state and action names, * the cameras, each with `name`, `shape: [height, width, 3]` after preparation, and `codec: "png"`, * the four scheduling fields above. Your endpoint must agree with the robot's camera preparation and action names, and reject an incompatible spec before it sends `ready`. The robot client sends `dispatch_feedback: true` in `hello`, and `ready` must echo it. This turns on the `last_dispatched` reference described below. `PlanSpec.dispatch_feedback` can be false for low-level clients that don't support it. Those clients leave the capability and the `last_dispatched` field off the wire. An explicit `dispatch_feedback: false` is invalid, so leave the field out instead. The robot client and the endpoint must agree on this capability, and the handshake never downgrades it. `max_adoption_offset_steps` is the oldest a reply may be, in control steps from its request, when the robot starts using it. It never delays an early reply. The wire format allows `None` to remove this deadline, and rows still expire at their scheduled times. The robot runtime requires an integer within the horizon. Every image must be PNG, so RGB pixels arrive unchanged after preparation. ## Recurring request and reply Each WebSocket message is binary: a big-endian uint32 byte count, that many bytes of UTF-8 JSON header, then the binary payload. WebSocket compression is off, because the images are already PNG. An `infer` header is: ```json theme={null} { "type": "infer", "request_id": "episode-1-request-42", "observation": { "state": [0.1, -0.2], "state_sample_time_ns": 100000001, "images": [ {"name": "overhead", "capture_time_ns": 99999999, "byte_length": 12345} ] }, "continuation": {"prediction_id": "episode-1-request-41", "from_row": 10}, "last_dispatched": {"prediction_id": "episode-1-request-41", "row": 9} } ``` The payload is the complete PNG files, one after another, in the agreed camera order. Each decodes to an RGB uint8 array. Timestamps are integer nanoseconds on the robot's monotonic clock, so don't compare them with the desktop's clock. The robot checks camera count, order and shape, PNG format, byte lengths, finite state values and every message field. ### `continuation` `continuation` names the prediction the robot is executing and the first row it hasn't run yet. The queued targets are always an unchanged suffix of that prediction. It is `null` at the start and after a reset. If your cache doesn't have that prediction, or the suffix is past its end, reject the request rather than conditioning on a different plan. The robot never blends or edits queued targets, which is what keeps this reference exact. Filtering and low-level control happen after the targets. ### `last_dispatched` When `dispatch_feedback` is on, every `infer` header contains `last_dispatched`. Its value is `null` or an object with `prediction_id` and a zero-based `row`. It names the last published row whose send on the robot completed in the current reset generation. When `dispatch_feedback` is off, leave the field out. `last_dispatched` is not: * a hardware acknowledgement, * a measured pose or proof that the arm tracked the target, * the setpoint after trajectory filtering or IK. It names the exact row your endpoint sent, before the robot's filtering. The client records both references when it makes the request, using the latest completed send. A send still in progress or a failed send is never reported. A send from before a reset never fills in the reference afterwards. `null` means there is no completed send in the current reset generation, including during recovery. It doesn't mean no command was sent, or that the robot has stopped. The two references can name different plans. For example, after it sends `X[12]`, the client may adopt a late plan `Y` whose next row is `Y[3]`. Before it sends that row, an observation reports `continuation={prediction_id: "Y", from_row: 3}` and `last_dispatched={prediction_id: "X", row: 12}`. `Y[2]` was skipped, so `continuation.from_row - 1` doesn't name the previous command. If your endpoint needs this history, keep both plans. ### `delay_steps` By default the robot sends no latency estimate. An adaptive endpoint can opt into the optional top-level integer `delay_steps`. It is input for conditioning, not a request to delay adoption. The robot caps it at `actions_per_chunk`, which means a full horizon or more. Instruction text stays on the desktop. ### The `actions` reply The `actions` reply header contains: ```json theme={null} { "type": "actions", "request_id": "episode-1-request-42", "shape": [30, 3] } ``` The payload is row-major, little-endian float32 values. An optional `max_adoption_offset_steps` can tighten the session deadline for this reply. The wire carries no robot tick numbers. The robot ties row zero to the request's start time, which it saved locally. It drops rows whose time has passed or that are already committed, and starts the rest right away. ## Lifecycle and failure After connecting, call `client.reset(episode)` before the first inference. `reset` carries an integer `episode`, and `reset_ok` echoes it. Before it replies, the endpoint must clear every cached prediction and all recurrent state. Request IDs are non-empty strings, unique within an episode. A client has at most one request outstanding. On a hold, a task change or a new episode, the robot drops pending predictions right away. It then sends `reset` after any outstanding request, so a reply from before the reset can never refill the queue. Change the desktop's instruction text at this boundary too. When a reply is late or the plan runs out, the robot follows its `late_policy`: * `"blocking_refresh"` (the default) drops the current plan and dispatch reference. Once pending inference finishes, it resets the endpoint, holds, and requests a fresh plan with no continuation. It runs up to `request_interval` rows of that plan, then refreshes again the same way. It stays in this mode until the scheduler itself is reset, and doesn't go back to overlapping requests on its own. * `"abort"` ends the session. An error reply has `type: "error"` and a `message`. The endpoint must reject malformed requests, unknown `continuation` or `last_dispatched` references, and invalid model output. The client closes the connection on an error reply, a malformed response or a timeout. After a transport failure, open a new connection and reset it, so a late reply can't be taken for a newer request. The client doesn't reconnect or resume motion on its own. ## Robot control loop Select the interface with `axol run-policy --policy_type custom --server_host HOST --server_port 8765 --task TASK`. The normal robot and camera settings still apply. `task` labels the recording. The robot doesn't send it to the endpoint, which chooses its own instruction. The robot captures observations and talks to the endpoint outside the control loop, so encoding and network waits never delay a motor command. It keeps one request outstanding and one adopted plan, with no queue of future plans. A row that is being sent can't be replaced. A request saves the next dispatch tick as its start. If that start is `o` and the next free tick when the reply arrives is `k`, the robot adopts the reply from row `max(0, k - o)`. Row zero is never shifted to the reply's arrival time. At the start there is no plan, so the robot holds and the first reply starts at row zero. Image preparation, encoding and transport all count against the request's adoption deadline. A reused camera frame keeps its original capture time, and the robot checks freshness before inference. If the control loop misses a deadline, the robot drops the plan instead of sending a burst of missed targets. For example, at 30 Hz with a 30-row horizon and a request every 10 rows: | Event | Next command / request context | | - | - | | Plan A has dispatched rows 0 through 9 | Next queued row is A\[10] | | Request B begins | `continuation=(A,10)`, `last_dispatched=(A,9)` | | Inference runs for three control ticks | Robot dispatches A\[10], A\[11], A\[12] | | B arrives within its adoption deadline | Skip B\[0:3]; next target is B\[3] | Each plan's identifier is the `request_id` of the request it answered. The example assumes every send has completed before the next request. A send still in progress is not yet reported in `last_dispatched`. Custom policies skip LeRobot's chunk alignment and temporal ensembling. Their targets still go through joint limits, Cartesian IK when configured, the configured trajectory filter, the realtime controller and the configured contact safeguards. `robot_config.action_space` selects `joint` or `cartesian` actions without changing the observation layout. If you leave it out, the action layout follows `observe_cartesian`. ## Supporting different policy families Because the robot executes one unchanged suffix, `(prediction_id, from_row)` fully describes the queued targets. An endpoint that keeps the plans it published can rebuild that suffix without the robot sending the action matrix back each time. Keep both plans when `continuation` and `last_dispatched` name different IDs. Convert relative actions to absolute targets in the agreed layout before you publish them. Preprocessing, normalization and recurrent state stay on the endpoint. * **Real-time chunking.** Condition the next prediction on the remaining suffix, with a fixed latency budget or the optional `delay_steps`. The robot keeps running the old plan during inference, then skips the rows of the new plan whose time has passed. It doesn't need to know whether you used hard prefix conditioning, inpainting or another method. * **Temporal ensembling.** Keep overlapping raw predictions on the endpoint, compute the weighted targets, and publish the result. References name the published targets, not a raw model chunk. The robot never stores weights or re-ensembles a reply. `request_interval=1` allows a request on every control tick, but a per-tick ensemble also needs inference fast enough to keep up. The interface defines how plans are executed and reported. It doesn't make arbitrary replies smooth. Your endpoint must produce targets that join up at plan boundaries and follow the agreed layout and timing. The robot's filters and limits act on the motor commands after the targets, and `last_dispatched` doesn't report their output. Timestamped state is the physical feedback. Smooth motion across plans and plan history after a recovery are not guaranteed. In `"blocking_refresh"` mode the reset clears that history. ## DAgger ownership and recording `collect-dagger --policy_type custom --hold_to_intervene true` uses the same messages and scheduler. One control loop sends both the policy's and the operator's commands. * Holding either grip cancels pending policy work and gives the operator that arm. The other arm holds. * If the operator's link drops while grips are held, the operator keeps control and the arm holds its last command. * With `shadow_inference=true`, observations and inference continue during operator control, but the robot discards the replies. * Releasing both grips starts a new generation. The robot resets the endpoint after any outstanding reply, and holds the operator's last command until a fresh plan arrives. A joint-space handover after IK starts from that held command, with limited velocity and acceleration. * Grabbing a grip again cancels that handover too. A late prediction from before an intervention can never take control back. Recording continues in the same dataset episode, with a per-row intervention label and capture fences where control changes hands. * `record_joint_actions=true` records the resolved joint commands, whatever the policy's action layout. * `home_on_start=true` homes the arms before the first episode. * `start_from_current_pose=true` keeps the pose set during scene reset for later episodes. * Pressing `q` in the terminal, idle or mid-episode, parks the arms through rest and zero before it turns off the motors. Contact stops, faults and interrupted cleanup keep the arms supported. # almond_axol.robot Source: https://docs.almond.bot/api/robot Hardware controllers for Axol and Jelly, simulation, configuration, and gravity compensation. `Axol` controls both arms. On entry it opens the CAN bus of each arm, enables all 16 motors, and calibrates each gripper's open stop. While Axol is enabled, the 240 Hz control loop runs in the Rust realtime core (`axol-rt`), which owns the CAN buses. Python computes the model terms and streams `motion_control` targets to the core. `Sim` has the same interface and renders the robot in a browser with viser. It requires the `sim` extra. ```python theme={null} from almond_axol.robot import Axol, AxolConfig, ArmConfig, JointConfig, FrictionParams, Jelly, JellyConfig, Sim ``` ## `Axol` ```python theme={null} Axol( config: AxolConfig | None = None, # None → the robot's shared settings left_channel: str | None = SHARED, # SHARED → the robot.left_channel setting right_channel: str | None = SHARED, # SHARED → the robot.right_channel setting left_joints: Iterable[Joint] | None = None, right_joints: Iterable[Joint] | None = None, ) ``` Pass `left_channel=None` or `right_channel=None` to run one arm only. Both arms start up in parallel in `__aenter__`. For a partial bench arm, pass `left_joints` or `right_joints` with the motors that are on its bus, for example `{Joint.WRIST_2, Joint.WRIST_3, Joint.GRIPPER}` for a wrist assembly. Missing joints are never created or enabled. Every `(8,)` array keeps its full shape: missing joints read `0.0`, and commands to them are ignored. Every CLI flow uses this class, including `axol teleop`, `axol gravity-comp`, `axol waypoints` and the control panel. Code written against `Axol` runs the same controller the robot ships with. ### Shared settings `Axol()` with no arguments runs with the same configuration as the [control panel](/guides/control-panel#settings) and `axol teleop`. It builds `config` from the shared settings file, `~/.almond/settings.json`, on top of the calibrated defaults. The CAN channels come from `robot.left_channel` and `robot.right_channel` in the same file. The file's `axol` section has the same fields and nesting as `AxolConfig`. Stiffness, per-joint gains, link masses and centres of mass, gripper limits and `has_gripper` saved there apply to SDK sessions too. For example, SDK gravity compensation uses the same gravity model as the panel. `shared_axol_config(load_store())` returns that `AxolConfig`, and the [Settings File](/guides/control-panel-settings) page shows the layout. Every argument overrides its setting: * `Axol(config=AxolConfig())` runs the calibrated defaults and ignores the file's `axol` section. * `Axol(right_channel=None)` disables the right arm whatever the file says. The same rule applies to `Mantis` (`mantis.left_channel`, `mantis.right_channel`), [`Jelly`](#jelly) (`jelly.*`) and [`VRTeleop`](/api/teleop) (`teleop.*`, `kinematics.*`, `vr_server.*`). The helpers are in `almond_axol.settings`: ```python theme={null} from almond_axol.settings import load_store, shared_axol_config, shared_config, shared_overlay from almond_axol.robot import AxolConfig from almond_axol.teleop.config import VRTeleopConfig store = load_store() # ~/.almond/settings.json (or load_store(path)) config = shared_axol_config(store) # AxolConfig as the panel would run it teleop = shared_config(VRTeleopConfig, "teleop", "teleop", store=store) overlay = shared_overlay("gravity-comp", store=store) # nested dict of every value that applies to an op ``` ```python theme={null} import asyncio import numpy as np from almond_axol.robot import Axol async def main(): async with Axol() as axol: # non-blocking cached reads (fed by the core's 240 Hz telemetry) print("left positions (rad):", axol.left.positions) print("left torques (Nm):", axol.left.torques) # primary control: impedance for arm joints, position-force for gripper q = np.zeros(8, dtype=np.float32) q[7] = 1.0 # open gripper await axol.motion_control(left=q, right=q) asyncio.run(main()) ``` ### Lifecycle methods | Method | Description | | - | - | | `connect()` | Open the CAN buses without actuating anything. The read APIs (`get_holding()`, `get_positions()`, ...) then work, so you can inspect a robot in an unknown state. | | `enable(hold=True)` | Bring every motor up. Joints that are already holding keep holding (see [Reconnecting to a live robot](#reconnecting-to-a-live-robot)). | | `disable()` | Disable all motors and close the CAN buses. After a core `fault` or `limp`, the motors stay holding or limp instead (see [Faults and limp](#faults-and-limp)). | | `disconnect()` | Close the CAN buses without changing motor torque. The robot keeps holding, so a later process can reconnect. | | `start_telemetry(hz, torque=False)` | Start a background polling loop on all motors. Does nothing while enabled, because the core already streams position, velocity and torque. | | `wait_for_telemetry(timeout=5.0)` | Wait until every motor has reported a position. Call it after `start_telemetry` and before the first cached `positions` read. | | `stop_telemetry()` | Stop background polling. | | `clear_errors()` | Clear latched error flags on all motors. | | `set_control_mode(mode)` | Set the `ControlMode` of all motors. **MyActuator motors reboot to switch modes, with torque off for about 2 s**, so never call it while the arms hold a load. | `enable()` gives cold joints the full bring-up, including the gripper calibration. Then: * With `hold=True` (the default), the realtime core takes the buses and the arms actively hold their measured pose, with gravity feedforward and damping. * With `hold=False`, newly enabled joints stay enabled but limp, and Python keeps the buses with no core running. Use this when your code manages control modes itself. Damiao motors switch control modes with a register write and don't reboot. > [!NOTE] > > **Who owns the bus.** The realtime core owns the CAN buses from `enable()` until `disable()` or `disconnect()`. During that time: > > * `get_positions()`, `get_velocities()`, `get_torques()`, `left.positions`, `left.torques` and `torque_residuals()` keep working. They read caches that the core's telemetry fills, and send nothing on the bus. > * Register-level calls raise `MotorError`: `connect()`, `get_temperatures()`, `get_holding()`, `get_gains()`, `clear_errors()`, `set_control_mode()` and every `set_*` method that writes to the motors except `motion_control`. Call them before `enable()` or after `disable()`. > * `motion_control()` and `gravity_compensate()` work only while the robot is enabled. ### Reconnecting to a live robot If a controlling process exits or crashes while the robot is torqued on, the motors keep holding their last commanded pose. Your startup code doesn't need to know whether that happened, because `enable()` checks each motor: * A joint that is **already holding** is attached with reads only and is never reset. A reset reboots a MyActuator motor and drops the arm for about 2 s. * A holding gripper keeps its grasp. Its end-stop calibration is restored from the last full bring-up instead of running the sweep again, which would close and open the jaws. * A **cold** joint gets the full bring-up. * On a mixed robot, for example one whose last session died during `enable()`, only the cold joints are brought up. * With `hold=True` (the default), `enable()` ends by commanding the measured pose once, with the configured gains and gravity feedforward. The arm is already there, so nothing moves. An enabled robot is always actively holding. ```python theme={null} import asyncio from almond_axol.robot import Axol async def main(): axol = Axol() await axol.connect() # open buses; nothing actuated held_l, held_r = await axol.get_holding() # optional: inspect first await axol.enable() # holding joints kept holding # Resume from the *measured* pose — after a reconnect the arms are # wherever the previous session left them, and the max_step_rad safety # check is seeded against that pose, so a stale or default target is # rejected instead of yanking the arms. left, right = await axol.get_positions() await axol.motion_control(left=left, right=right) # ... ramp toward your desired target from here ... await axol.disconnect() # exit, leaving torque as-is asyncio.run(main()) ``` Notes: * `connect()` is optional, because `enable()` opens the buses itself. Call it to inspect state first (`get_holding()`, positions, temperatures). A process that must never move the robot can call `connect()`, check `get_holding()`, and continue only when every joint is already holding. * For other control modes, call `enable(hold=False)`, pick a mode with `set_control_mode()`, and drive the arms with `set_positions_velocity()` or `set_velocity()`. No core runs in this case, so `motion_control()` is unavailable until a later `enable()`. * Reconnecting works for the impedance workflow only. A session that died in another control mode is not reattached: call `disable()`, then `enable()`. * To force a fresh bring-up of a live robot (gripper calibration, motor reset), call `disable()` and then `enable()`. * `enable()` raises `MotorError` if a gripper is holding but has no valid saved calibration. Measuring it again would close and open the jaws and drop what it holds. Empty the gripper, then call `disable()` and `enable()`. * `enable()` also raises `MotorError` if an arm joint's encoder reading doesn't fit a zero set at its calibration end stop. This means the zero was never set or is stale. The check runs before anything moves, and `connect()` and the read APIs still work. Run `axol motor.set-zero-pos --guided` to set the zero (see [`motor.set-zero-pos`](/cli/motor-set-zero-pos)). * `disconnect()` closes the buses and leaves torque on, so a later process can reconnect. Call `disable()` only when you want to turn torque off, with the arms in a safe pose. ### Faults and limp | Attribute | Meaning | | - | - | | `fault` | The core's latched `fault: ...` message (for example a dead bus or a protocol error), or `None`. The core has stopped streaming and the motors hold their last command. | | `limp` | Why the core went limp (`limp: ...`, for example a motor silent for a second or lost control timing), or `None`. Every arm joint runs at kp = 0 with gravity feedforward for the rest of the session. | After a fault, `disable()` leaves the motors holding. While the core is limp, `motion_control` streams gravity compensation instead of tracking, so the operator can guide the arms to rest by hand and stop. Faults never drop the arms. A disabled arm would fall, so a holding or limp arm waits for the operator instead. ### State reads Each returns `(left_array, right_array)` where the absent arm is `None`. | Method | Units | | - | - | | `get_positions()` | rad (gripper: `[0, 1]` over the calibrated stroke, `1.0` = at the open stop) | | `get_velocities()` | rad/s | | `get_torques()` | Nm (Damiao) / A (MyActuator) | | `get_temperatures()` | °C | | `get_voltages()` | V | | `get_error_codes()` | `list[MotorStatus]` | | `get_holding()` | `list[bool]`: whether each motor is enabled and holding. Read-only, and works right after `connect()`. | | `get_gains()` | `list[MotorGains]` | ### State writes | Method | Description | | - | - | | `motion_control(left, right)` | The main control method: impedance control for the arm joints and position-force control for the gripper. | | `gravity_compensate(kd, free_joints, gripper_targets)` | Run one gravity-compensation cycle. The arms go limp and can be guided by hand, held up by feedforward. | | `set_positions_velocity(left, right, max_speed)` | Motor built-in position controller | | `set_velocity(left, right)` | Motor built-in speed controller | | `set_gains(left, right)` | Write PID gains. They are saved to the motor's flash. | | `set_zero_position(left, right)` | Save the current shaft position as the encoder zero. Set it at a mechanical end stop, not the rest pose. | | `set_acceleration(left, right)` | Set per-joint acceleration ramp (rad/s²) | | `set_payload(side, mass, com=(0, 0, 0))` | Tell the gravity model what a gripper is holding (see [Payloads](#payloads)). It changes model state only, so it works whether or not the robot is enabled. | | `payload(side)` | The payload currently set on `"left"` or `"right"`, as `(mass_kg, com_m)`. | The gripper target in `motion_control` is in `[0, 1]` over the calibrated stroke, so `1` is always the open stop found at enable. Python computes the limits, gravity and pose-dependent feedforward terms, and the core runs the trajectory at 240 Hz. Individual arms are accessible via `axol.left` and `axol.right` (`AxolArm`), which expose the same methods operating on a single arm. > [!NOTE] > > The Mantis rig (`almond_axol.robot.Mantis`) works the same way: `Mantis(config, left_channel, right_channel, *, defer_gripper_enable)`, with the same lifecycle. `motion_control` sends the gripper element of each target to the hardware. ## `Jelly` `Jelly` controls the Jelly mobile base and its telescoping lift. `JellyConfig` holds the wheel, lift, heading-hold and command-safety settings. `detect_jelly` narrows a config to the Jelly hardware that is attached: the wheel bus `can_alm_axol_b` and the lift bus. It returns `None` when neither is attached. `axol teleop` and data collection detect Jelly the same way, so you never enable it by hand. ```python theme={null} from almond_axol.robot import Jelly, JellyConfig, detect_jelly jelly = Jelly() # jelly.* from the shared settings file jelly = Jelly(JellyConfig(max_speed=5.0)) # explicit config overrides it cfg = detect_jelly(JellyConfig()) # only the attached wheels / lift if cfg is not None: jelly = Jelly(cfg) ``` ### Battery Jelly estimates its charge from the 24 V rail that its lift controller measures (the `GET_POWER` telemetry). The estimate uses the resting voltage curve of its two 24 V 50 Ah LiFePO4 packs, wired in parallel (8S, 100 Ah). While Jelly is enabled with its lift, `jelly.battery` updates about once a second. It is `None`: * before the first reading * when no pack is connected and the board runs from USB * on firmware that doesn't answer `GET_POWER` `read_battery()` takes a single reading without enabling anything. It never sends a motion command. ```python theme={null} import asyncio from almond_axol.robot import read_battery, read_power async def main(): battery = await read_battery() # None if the lift board is silent if battery is not None: print(f"{battery.percent:.0f}% ({battery.voltage:.2f} V)") print(battery.charging, battery.under_load, battery.remaining_ah) power = await read_power() # raw telemetry: rail volts, leg amps if power is not None: print(power.supply_volts, power.leg_currents) asyncio.run(main()) ``` `jelly.battery` and `read_battery()` return a `BatteryStatus`: | Field | Description | | - | - | | `percent` | State of charge from 0 to 100, from the LiFePO4 resting voltage curve. Jelly never fully rests, so in the middle of the curve it can read well below the packs' own BMS. | | `voltage` | Pack voltage, smoothed while resting. | | `charging` | `True` when the rail is above any resting voltage (27.1 V, clearing below 27.05 V), which means a charger is connected. Early in a charge a low pack can stay below the threshold, so `False` doesn't rule out a charger. | | `under_load` | `True` when the only reading was taken while the lift or wheels were moving, so the estimate reads low. | `battery.remaining_ah` converts `percent` into amp-hours of the 100 Ah capacity. While `charging` is `True`, `percent` reads near full and doesn't reflect the charge. The curve is EVE's published resting voltage chart per cell (3.40 V full, 3.26 V half, 3.20 V at 20%), times eight for the 8S packs. LiFePO4 voltage barely changes in the middle of the charge, about 0.16 V across the pack from 40% to 60%, so treat `percent` as a range. The board's ADC can also be off by a few hundred millivolts. ## `Sim` `Sim` implements the same interface as `Axol`. Use it to visualise motion without hardware. Requires the `sim` extra. ```python theme={null} import asyncio import numpy as np from almond_axol.robot import Sim async def main(): async with Sim(port=8002) as sim: q = np.zeros(8, dtype=np.float32) await sim.motion_control(left=q) await asyncio.sleep(float("inf")) # keep the viser server alive asyncio.run(main()) ``` Open `http://localhost:8002` in a browser to view the robot. > [!NOTE] > > `Sim` renders whatever *you* command with `motion_control`. [`axol teleop --sim`](/cli/teleop) instead wraps a `Sim` in the full teleop stack, and with no headset connected the arms hold the rest pose. > > To drive them without a headset, for example in a test, stream [`VRFrame`](/api/vr) messages to the teleop VR WebSocket at `wss://localhost:8000/ws`. Set both `l_lock` and `r_lock` to `true` to engage tracking. The certificate is self-signed, so turn off TLS verification. ## Configuration: `AxolConfig`, `ArmConfig`, `JointConfig` Each arm joint has one `JointConfig` with its impedance gains, friction model, and the mass properties of the link it drives: ```python theme={null} from almond_axol.robot import Axol, AxolConfig, FrictionParams config = AxolConfig() config.left.elbow.kp = 200 config.left.elbow.mass = 0.6 config.left.elbow.com = (-0.025, 0.0, -0.07) config.left.elbow.friction = FrictionParams(fc=0.4, k=10.0, fv=0.05, fo=0.0) async with Axol(config=config) as axol: ... ``` To build a custom arm, use `dataclasses.replace` on the `AxolConfig` defaults. Starting from the defaults keeps each side's friction values, which are added when the config is built: ```python theme={null} from dataclasses import replace from almond_axol.robot import AxolConfig, JointConfig, FrictionParams left = replace( AxolConfig().left, shoulder_1=JointConfig( kp=35.0, kd=1.2, friction=FrictionParams(fc=0.0, k=0.0, fv=0.0, fo=0.0), mass=2.0, com=(0.065, 0.0, 0.0), ), ) ``` ### `JointConfig` fields | Field | Type | Description | | - | - | - | | `kp` | `float` (`[0, 500]`) | Impedance position stiffness. | | `kd` | `float` (`[0, 5]`) | Impedance velocity damping in the motor firmware. Values above 5 are clamped, with a warning when the arm is created. | | `friction` | `FrictionParams` | `fc`, `k`, `fv`, `fo` of the friction model `fc·tanh(0.1·k·v) + fv·v + fo` (see `compute_friction` in `robot/control.py`). | | `mass` | `float` | Mass (kg) of the URDF link this joint drives. For `wrist_3` it includes the gripper. | | `com` | `tuple[float, float, float]` | Centre of mass (m) of the same link, in its URDF link frame. Used by gravity compensation. | | `j_eff` | `float` (default `0.0`) | Effective inertia (kg·m²) for the acceleration feedforward `τ = j_eff · q̈_des`. | | `kd_host` | `float` (default `0.0`) | Velocity damping (Nm·s/rad) computed on the host and added to the feedforward: `τ = kd_host · (v_des − v_meas)`. See [Host damping](#host-damping). | | `kd_host_hz` | `float \| None` (default `None`) | Centre frequency (Hz) of the band-pass that limits `kd_host` to the joint's resonance. `None` makes the centre follow the pose. | | `kd_host_q` | `float \| None` (default `None`) | Quality factor of that band-pass (bandwidth = centre / q). `None` uses 0.8. | | `torque_limit` | `float` (default `inf`) | Cap (Nm) on the spring torque the joint can build up against an obstacle. See [Torque limit](#torque-limit). | Gravity feedforward is computed from the URDF with each joint's `mass` and `com` (see [Gravity compensation](#gravity-compensation)). ### Host damping The motor firmware's velocity estimate is too filtered to damp the shoulders' closed-loop resonance near 2 Hz, because the shoulders carry a lot of inertia. `kd_host` adds that damping on the host, from velocity differentiated from measured positions at the command rate. The elbow uses a small amount for the same reason. The wrists and `shoulder_3` use `0`, because their firmware `kd` is enough. Raise `kd_host` with care. Host damping uses a velocity that is one cycle old, so it destabilizes joints that ring above about 10 Hz. A `kd` above the firmware's 0 to 5 range is clamped and is never moved into host damping. The band-pass keeps the damping on the joint's resonance. With `kd_host_hz` at `None`, the centre follows the shoulders' impedance mode `√(kp/J(q))`, which moves from about 2.2 Hz at rest to 5.4 Hz with the arm raised to the side. Set an explicit centre for structural modes that this can't predict. The default `kd_host_q` of 0.8 is about an octave wide on each side, which suits a centre that follows the pose. When the centre sits low, that band reaches into intended motion below 1.5 Hz and slows the joint's final approach. When you set `kd_host_hz` to a measured ring frequency, a q of 2 to 3 keeps the damping on the ring. ### Torque limit The realtime core enforces `torque_limit` every tick. It never sends a position more than `torque_limit / kp` from the last measured one, so `kp · error` stays bounded however far the target runs ahead of a blocked joint. At the wrists' `kp=130`, 5 Nm is a window of about 2.2°. Gravity feedforward is not capped, because holding the arm's own weight isn't pressing. The friction, inertia and host-damping feedforwards follow the capped command, so they fall to zero while the joint is blocked. Every joint defaults to `inf`, which leaves it uncapped. Box mode caps the wrists for its session instead (`VRTeleopConfig.box_wrist_torque`, 5 Nm). To cap one joint from the CLI, pass `--axol.left.wrist_2.torque_limit 2.0`. ### Grippers `ArmConfig.gripper` is a `PositionForceConfig` with `torque_limit` (Nm) and `max_speed` (rad/s). The gripper torque is capped at 5 Nm (`almond_axol.constants.GRIPPER_MAX_TORQUE`). A `torque_limit` above it raises `ValueError` when the config loads, and every gripper command is clamped to it. The gripper joint is fixed in the model, so the gripper's mass is included in `wrist_3.mass`. `AxolConfig.gripper` (below) sets which gripper is fitted: `"parallel"`, the stock two-finger gripper, or `"parcel"`, the hinged-plate parcel gripper. It sets which way each jaw's motor turns to close (`gripper_close_direction(gripper, is_left)`). Both parallel jaws close toward positive motor angles. The parcel gripper's right motor is mounted the other way round, so it closes toward negative angles. The gripper's stroke is measured, not fixed. On every cold `enable()`, each jaw closes until it stalls on the closed stop, then opens until it stalls on the open stop, so it ends **open**. The two stops define `0` (closed) and `1` (open) for that session and are saved for reconnects. The measured stroke is then checked against the configured gripper: about 290° for the parallel gripper and 185° for the parcel gripper. If the stroke is closer to the other type's, the bring-up fails with a `MotorError` that names the right setting. A wrong type would leave the parcel gripper's right jaw closed after calibration. ### `AxolConfig` fields `AxolConfig` also exposes top-level parameters: | Field | Default | Description | | - | - | - | | `has_gripper` | `True` | Set `False` on the gripperless model. The gripper motors are never created, enabled or calibrated, and the gripper element of every `(8,)` array is ignored on write and reads `0.0`. | | `gripper` | `"parallel"` | Which gripper is fitted to both arms: `"parallel"` or `"parcel"` (see [Grippers](#grippers)). Teleop's box mode works only with `"parcel"`. | | `max_step_rad` | `0.5` | Largest change (rad) allowed in any arm joint between two `motion_control` calls. Larger commands are dropped with a warning, and `float("inf")` turns the check off. | | `left_stiffness` | `1.0` | Compliance of the **left** arm: a scalar in `[0, 1]` for every joint, or a 7-tuple with one value per joint. `1.0` runs the tuned gains, and `0` the soft, hand-guidable gains. | | `right_stiffness` | `1.0` | Same, for the **right** arm. | Notes: * With `has_gripper=False`, the array shapes don't change, and LeRobot datasets record 7 channels per arm instead of 8. * Set the gripper type with `--axol.gripper parcel` on the CLI, or with the **Gripper** setting on the control panel's **Robot** tab. * At 30 Hz, a `max_step_rad` of 0.5 is about 15 rad/s, roughly 2.5 times the teleop speed limit. ### Stiffness A 7-tuple lists the joints in the order `shoulder_1`, `shoulder_2`, `shoulder_3`, `elbow`, `wrist_1`, `wrist_2`, `wrist_3`. The gripper isn't included. Values below `1.0` only add compliance. At `0` the arm runs the soft gains, for example `kp=40` on `shoulder_1` against `kp=250` tuned. `kp` and `kd` blend geometrically (in log space), which matches how stiffness feels. The soft end keeps a consistent damping ratio, so every setting is as well damped as the tuned gains. `j_eff` doesn't change, and `kd_host` scales with `√(kp(s)/kp)`. `AxolConfig.resolved()` applies the blend to the `left` and `right` gains once, when `Axol` is created. The stiffness fields keep the values you set, so a saved config loads back unchanged. ```python theme={null} config = AxolConfig() # tuned gains (s=1, default) config = AxolConfig(left_stiffness=0.5, right_stiffness=0.5) # geometric mean: shoulder_1 kp = 100 config = AxolConfig( # per-joint, left only left_stiffness=[1.0, 1.0, 0.8, 0.8, 0.5, 0.5, 0.2], ) ``` Both arms share the `ArmConfig` defaults for gains and masses. The right arm's centres of mass are mirrored across X by `ArmConfig.mirror_to_right()`. Friction is measured separately for each arm, because the left and right motors differ (see `_LEFT_FRICTION` and `_RIGHT_FRICTION` in `almond_axol/robot/config.py`). Pass an explicit `left=` or `right=` to override either side. `shoulder_1` sets `kd_host_q=3` on both arms. This keeps its damper on the impedance mode and off a separate 12.5 to 13.6 Hz mode of the mast and forearm. Other joints leave `kd_host_q` at `None`, which uses 0.8. ## Gravity compensation `almond_axol.robot.gravity.GravityCompensator` builds a MuJoCo model from the bundled URDF. It computes each joint's gravity torque as `qfrc_bias` with zero velocity, so the Coriolis terms drop out. Each joint's load includes the weight of every link after it in the chain. Link masses don't come from the URDF file, whose exported values are placeholders. They come from each joint's `JointConfig.mass` and `JointConfig.com` in `almond_axol/robot/config.py`. The centres of mass come from CAD, and the masses are tuned against measured joint torques. If the arms sag or push back in gravity-comp mode, tune the joint's `mass` and `com` on `AxolConfig` and pass it to `Axol`: ```python theme={null} from almond_axol.robot import AxolConfig, Axol config = AxolConfig() config.left.elbow.mass = 0.6 config.left.elbow.com = (-0.025, 0.0, -0.07) async with Axol(config=config) as axol: ... ``` To hold the arms in gravity compensation interactively, use the [`gravity-comp`](/cli/gravity-comp) command. The same model also provides the arm's kinematics. `GravityCompensator.mount_jacobian(arm_q, is_left=...)` returns the pose of the gripper mount and its `(6, 7)` geometric Jacobian at any joint configuration. The gripper mount is the URDF gripper link, the frame the IK solver targets. ### Payloads The link masses describe the robot itself. Add whatever a gripper picks up at runtime with `set_payload`. The arm then holds its commanded pose instead of sagging, hand-guiding in gravity comp stays weightless, and `torque_residuals()` doesn't read the load as a contact: ```python theme={null} import asyncio from almond_axol.constants import GRIPPER_TIP_OFFSET from almond_axol.robot import Axol async def main() -> None: async with Axol() as axol: # ... close the left gripper on a 400 g part ... axol.set_payload("left", 0.4, GRIPPER_TIP_OFFSET) # ... carry it, then open the gripper ... axol.set_payload("left", 0.0) asyncio.run(main()) ``` The payload is a point mass fixed to the gripper: * `com` is in metres, in the gripper link frame that forward kinematics reports. `GRIPPER_TIP_OFFSET` is where the fingers close. * Use `"both"` for one object carried by both grippers. Each arm takes its share of the mass. * The feedforward changes on the next control cycle. Set the payload when the grasp closes and clear it when it opens, because a payload the gripper isn't carrying lifts the arm slightly. * Masses above 5 kg and centres of mass more than 0.5 m from the gripper are refused as likely unit mistakes. * The payload isn't saved. For a permanently heavier end-effector, update the calibration with [`tune.factory --mass wrist_3=`](/cli/tune-factory). * `Sim.set_payload` checks the same arguments and changes nothing, so a script runs the same way in sim. ## Squeeze lean (box mode) The force control of [box mode](/guides/vr-interface#box-mode) runs in the IK worker, not on the robot (`almond_axol.teleop.box.squeeze_lean`, see [`box_squeeze_lean`](/api/teleop#box-mode)). The robot provides the model it needs: * `GravityCompensator.mount_jacobian`, described above. * `AxolArm.kp`, each arm's impedance stiffness per joint (Nm/rad), after the stiffness blend. From these the worker gets the arm's Cartesian compliance at the mount, `J diag(1/kp) J^T`. Before every box-mode frame, teleop passes both arms' measured positions and `kp` to the worker. The worker offsets the gripper targets so that jogging the grippers past the box becomes an even squeeze through the tool's contact points. The arms stay position controlled, and the realtime core receives ordinary targets. # almond_axol.teleop Source: https://docs.almond.bot/api/teleop Connect a VR headset to the robot (or simulator) for teleoperation. Connects a VR headset to Axol, or to the simulator, for teleoperation. Each VR frame goes through four stages before it reaches `motion_control()`: 1. A lag-compensated low-pass filter on the raw poses. 2. An IK solve, in a separate process so it never blocks the asyncio event loop. 3. Exponential smoothing of the IK output. 4. A trapezoidal velocity and acceleration limit. ```python theme={null} from almond_axol.teleop import VRTeleop, VRTeleopConfig ``` ```python theme={null} import asyncio from almond_axol.robot import Axol from almond_axol.teleop import VRTeleop async def main(): async with VRTeleop(Axol()) as teleop: await teleop.run() # blocking; Ctrl+C to exit asyncio.run(main()) ``` ```python theme={null} VRTeleop( robot: RobotBase, *, config: VRTeleopConfig | None = None, # None: teleop.* shared settings kinematics_config: KinematicsConfig | None = None, # None: kinematics.* shared settings vr_server_config: VRServerConfig | None = None, # None: vr_server.* shared settings jelly: Jelly | None = None, ) ``` Each config you leave as `None` is loaded from the shared settings file, `~/.almond/settings.json`, over the built-in defaults. The [control panel](/guides/control-panel-settings) edits this file and `axol teleop` reads it, so an SDK session uses the same rest poses, multipliers, IK weights and VR port. Pass a config to override it. See [Shared settings](/api/robot#shared-settings). Use `step()` instead of `run()` to run teleoperation inside your own control loop: ```python theme={null} async with VRTeleop(axol) as teleop: while True: left_q, right_q = teleop.step() # returns latest smoothed (8,) arrays # ... custom logic ... await asyncio.sleep(1 / 120) ``` To show camera feeds in the headset, call `VRTeleop.set_video_sources()` inside the session. It forwards the sources to the VR server's WebRTC relay, which needs the GStreamer NVENC stack from [`axol gst.install`](/cli/gst-install). Each value is a connected `ZedCamera`, or any object with `width`, `height`, `fps` and `wait_next()`. See [`almond_axol.vr`](/api/vr#camera-video-to-the-headset). ```python theme={null} async with VRTeleop(axol) as teleop: teleop.set_video_sources({"overhead": cam}) await teleop.run() ``` The [`teleop`](/cli/teleop) CLI command is the command-line equivalent. Its `--cameras` flag sets up the ZED cameras for you. > [!NOTE] > > `set_video_sources()` runs the WebRTC relay in the teleop process. `VRTeleop.set_video_manager()` instead runs camera capture, encoding and WebRTC in a separate process (`almond_axol.video.video_proc.VideoRelayProcess`), so video work can't slow the control loops. The CLI uses `set_video_manager()`. Both send the same video to the headset. ## `VRTeleopConfig` fields Joint velocities and accelerations are set in rad/s and rad/s². The defaults below also give them in rev/s, the unit the control panel and headset show. ### Control loop and filtering | Field | Default | Description | | - | - | - | | `frequency` | `120` Hz | Control loop rate of `run()`. Also sets the waypoint density of return-to-rest moves. | | `ik_frequency` | `120` Hz | Rate at which VR frames are sent to the IK solver. The control loop interpolates between solutions. | | `teleop_max_vel` | `2π` rad/s (1 rev/s) | Joint velocity cap while tracking. Live setting (**Arm speed**). | | `teleop_max_accel` | `3π` rad/s² (1.5 rev/s²) | Joint acceleration cap while tracking. | | `engage_max_vel` | `0.2π` rad/s (0.1 rev/s) | Velocity cap at the first engage after a reset. It ramps up to `teleop_max_vel` over `engage_duration`. | | `engage_duration` | `1.0` s | Time for the velocity cap to ramp from `engage_max_vel` to `teleop_max_vel`. | | `ik_alpha` | `0.3` | Smoothing factor on the IK output. `1.0` turns smoothing off. | | `pose_cutoff` | `2.5` Hz | Cutoff of the low-pass filter on raw VR poses, which rejects hand tremor before IK. | | `position_multiplier` | `1.0` | Scale from hand position to end-effector position. Above `1` extends reach. Live setting (**Reach scale**). | | `rotation_multiplier` | `1.0` | Scale from hand rotation to end-effector rotation. Above `1` turns the arm further than your wrist. | | `record` | `None` | File prefix for the teleop flight recorder, which `axol diag.teleop-jitter` reads. | `record` writes each pipeline stage to its own file: `_ik.npz`, `_cmd.npz`, `_meas.npz` and `_rt.npz`. The `rt` file holds the realtime core's 240 Hz motor commands, control terms, timing and feedback. Each file keeps the most recent engage-to-disengage segment. ### Engage and reset | Field | Default | Description | | - | - | - | | `hold_to_engage` | `False` | `True` makes each grip a dead-man switch: its arm tracks only while the grip is held. Live setting (**Hold to engage**). | | `haptics` | `True` | Vibrates the controller of each engaged arm while it pushes on something, plus the ticks below when `haptic_near` is on. `False` silences both. See [Haptics](/api/vr#haptics). Live setting (**Haptics**). | | `haptic_near` | `False` | Ticks a controller, faster as its arm nears the IK's arm/body collision boundary. Live setting (**Body ticks**). | | `haptic_torque` | `6.0` Nm | Low-passed torque residual (measured minus modeled gravity) at which the rumble starts. It is strongest at 2.5 times this. `0` turns the rumble off. Hardware only. Live setting (**Haptic push**). | | `haptic_held_load` | `True` | While a gripper is commanded closed, or box mode is on, fits its arm's torque residual as a held point mass (plus the box squeeze in box mode) and leaves it out of the rumble. The fit uses the gripper mount, so it works with either gripper. Opening the gripper clears it. See `almond_axol.teleop.held_load`. Hardware only. | | `reengage` | `"clutch"` | What a grip does when it re-engages an arm: `"clutch"` or `"ramp"`. See [Re-engaging](#re-engaging). Live setting (**Re-engage**). | | `reengage_ramp_speed` | `0.15` m/s | Speed of the `"ramp"` blend. A 30 cm gap takes at least 2 s. | | `reengage_ramp_min_s` | `0.75` s | Shortest `"ramp"` blend, so a small correction is eased rather than stepped. | | `reset_speed` | `0.2π` rad/s (0.1 rev/s) | Average velocity of the joint that moves farthest during return-to-rest. The peak is 1.5 times this with the default IK solver. | | `reset_min_duration` | `1.5` s | Shortest return-to-rest move, so an arm near rest doesn't snap home. | | `rest_pose_left` / `rest_pose_right` | near zero | Return-to-rest target for each arm, shape `(7,)` in `ARM_JOINTS` order. | ### Box mode | Field | Default | Description | | - | - | - | | `gripper` | `None` | Which gripper is fitted: `"parallel"` or `"parcel"`. `None` follows the robot's `AxolConfig.gripper`. | | `box_mode` | `False` | Start in [box mode](/guides/vr-interface#box-mode). Live setting (**Box mode**). | | `box_lead_hand` | `"right"` | Which controller leads the pair when box mode turns on. The other grip can take over the lead. Live setting. | | `box_grasp` | `"straight"` | Starting grasp. `"straight"` points the fingers forward, and `"flush"` turns each gripper inward by `box_flush_deg`. Live setting (**Box grasp**). | | `box_flush_deg` | `39`° | How far the `"flush"` grasp turns each gripper inward, about the front edge of the parcel plate. Live setting (**Angled yaw**). | | `box_face_left` / `box_face_right` | `"auto"` | Which side of each gripper (`"+x"` or `"-x"`) faces the box. `"auto"` picks the side that needs the smaller wrist turn. Live settings (**Left face**, **Right face**). | | `box_grip_tilt` | `0`° | Fixed inward yaw trim of each gripper. Positive turns the fingertips toward the box, negative splays them out. | | `box_width_speed` | `0.08` m/s | Rate at which the right thumbstick's forward and back changes the grip width at full deflection. | | `box_width_min` / `box_width_max` | `0` / `0.70` m | Limits on the grip width, measured between the contact faces. The minimum is raised where needed so the gripper bodies never touch. The parcel gripper's faces can close all the way together. | | `box_align_duration` | `1.5` s | Time to blend the grippers into the parallel pair when box mode engages or the grasp changes. | | `box_elbow_out` | `0`° | How far out the elbows are held, from `0` (tucked beside the body) to `90` (level). Live setting (**Elbows out**). | | `box_elbow_weight` | `10` | IK weight that holds the elbows at `box_elbow_out`. `0` turns it off, and `box_elbow_out` then does nothing. | | `box_wrist_torque` | `5` Nm | Cap on the spring torque of `wrist_2` and `wrist_3` in box mode, which keeps the wrist motors from overheating. `0` turns it off. | | `box_squeeze_force` | `0` N (off) | Cap on how hard each arm clamps the box. Live setting (**Squeeze force**). | | `box_squeeze_lean` | `1` | Scale on the squeeze lean, which angles each gripper into the box as the clamp builds. `0` turns it off. Live setting (**Squeeze lean**). | | `box_squeeze_trim` | `5`° | Most inward yaw the squeeze trim may add while the grippers press. `0` turns it off. Live setting (**Squeeze trim**). | | `box_squeeze_torque` | `0` Nm (off) | Hard cap on the spring torque of `shoulder_2` and `shoulder_3` in box mode. Live setting (**Squeeze cap**). | Box mode needs the [parcel gripper](/guides/vr-interface#box-tool). Set the gripper on the robot with `--axol.gripper`, not with this config. A `gripper` value that disagrees with the robot's is overridden with a warning, and with no robot to follow (`Sim`), `None` means `"parallel"`. With the parallel gripper: * every `box_*` live setting is hidden, * `box_mode` starts off, with a warning, * `VRTeleopCore.set_box_mode(True)` raises `ValueError`. In box mode one grip drives both arms by position and rotation. The pair follows the hand's movement, and the hand's yaw, pitch and roll since the engage turn the pair about its center, scaled by `rotation_multiplier`. Engaging into box mode starts the pair level. A re-snap inside box mode, such as a lead handover, a re-lead after a freeze or a grasp switch, keeps a tipped pair's tilt while both grippers still sit in its frame. The thumbsticks drive [Jelly](/guides/vr-interface#jelly) as usual throughout box mode, led or frozen. While a grip leads: * The right thumbstick's forward and back changes the grip width. Forward is wider. Jelly doesn't read this axis. * A quick tap of either thumbstick click toggles between the two grasps. A tap is released within 0.3 s, with the other stick up. * A click held longer than that runs Jelly's lift, from then until release. `VRTeleopCore.box_stick_frame()` splits the clicks into taps and holds, and hands Jelly a copy of the frame with the clicks cleared until a hold is recognised. A tap queues `set_live("box_grasp", "toggle")`. Box mode switches from the headset's **Box** button, both thumbstick clicks together, the control panel, or `VRTeleopCore.set_box_mode()`. The switch engages right away: into box mode led by `box_lead_hand`, or out of it with both arms. If no VR frame arrives within a second of the switch, or a return to rest ends box mode, nothing engages. #### The squeeze When you jog the grip width past the box, the arms' joint springs turn the extra distance into clamp force, about 6 N per centimetre. These settings shape the clamp: * **Squeeze force** (`box_squeeze_force`) caps the clamp force per arm, at any pose. Try `8` N. With it off, nothing limits the clamp. Past about 39 N a side, `wrist_2` saturates at the default `box_wrist_torque` and the tip can unload onto the facet. * **Squeeze lean** (`box_squeeze_lean`) yaws each gripper inward about 1.3° per centimetre of clamp depth, so the tip and root of the gripper press evenly. Raise it if the tip lifts as you squeeze. Lower it if the face near the wrist lifts. * **Squeeze trim** (`box_squeeze_trim`) adds inward yaw from the measured gripper angle until each face sits parallel to the box. It corrects for backlash and flex that the lean doesn't model, and acts only once the pair has held still for 0.3 s. * **Squeeze cap** (`box_squeeze_torque`) is a hard torque cap on the two shoulder joints. It also slows any move toward the other arm, so the pair can skew. Leave it at `0` unless you need it. The squeeze settings and `box_wrist_torque` work on hardware only. The IK worker reports the clamp force and trims in `IKWorker.pair_status()` as `squeeze`, `trim` (mean) and `trims` (`[left, right]`). While the grippers press, the teleop log prints a `box clamp:` line once a second. ### Mantis | Field | Default | Description | | - | - | - | | `absolute_mode` | `False` | Mantis mapping. Fits one fixed world-to-robot-base transform at the two-control engage gesture, then maps poses 1:1 in that frame. | | `base_height` | `None` | Robot base height in the tracker's world. `None` derives it from the two held start poses. | | `tcp_transform_left` / `tcp_transform_right` | `None` | Tracker-to-gripper transform `[x, y, z, qx, qy, qz, qw]`, in metres. | | `tracker_key` | `None` | Quest controller transform key, `quest::grip`. Lighthouse trackers ignore it. | | `quest_controller_profile` / `quest_pose_space` | `None` | Expected Quest controller profile and pose space, normally derived from `tracker_key`. On a mismatch, that side stops tracking until you recover it. | | `urdf_viewer_world_aligned` | `None` | Whether the headset shows the robot overlay in the tracker's world. `None` means true for Quest and false for Lighthouse. | A TCP transform must have seven finite numbers, a translation of at most 1 metre, and a nonzero quaternion. Production Mantis collection also requires it to match the active tracker's entry in `~/.almond/mantis/tcp_transform.json`, or a verified factory constant. Lighthouse trackers take their left and right bindings (`survive:`) from the tracker config instead of `tracker_key`. Set `urdf_viewer_world_aligned` to true for a Lighthouse tracker only after you have registered its origin and heading to the Quest's world. ## Engage behavior * From rest, press both grips together to engage both arms. * Once engaged, a grip click toggles its arm between tracking and frozen. A frozen arm holds its pose and grasp while the other keeps tracking. * With `hold_to_engage`, an arm tracks only while its grip is held, from rest too. Releasing the grip freezes that arm. If tracking stops while a grip is held, release it once before it engages again. * The reset button moves both arms back to the rest pose. The move avoids self-collision when `KinematicsConfig.self_collision` is on, and otherwise stays within joint limits. * In box mode, turning box mode on engages the pair, led by `box_lead_hand`. From a frozen pair, a single grip engages both arms again, and that controller leads. ### Re-engaging When a grip re-engages an arm after a freeze, a disengage, or someone moving the arm by hand, `reengage` decides which side moves: * `"clutch"`: the arm stays put, and the controller's current pose becomes the new origin. * `"ramp"`: the arm keeps the controller-to-arm mapping from its previous engage and blends to where that mapping puts the controller. The blend is paced by `reengage_ramp_speed`, takes at least `reengage_ramp_min_s`, and follows a moving hand. The arm never moves on the engage frame itself. A return to rest or a DAgger sync drops the mapping (`IKWorker.reset()`, `clear_engage()`), so the next engage starts fresh in either mode. Engages inside box mode ignore `reengage`. Leaving box mode with `"ramp"` blends both arms back to the mapping from before box mode. ## Live settings Some settings can change while a session runs, from the headset or the control panel: `box_mode`, the other box-mode settings marked live above, `reengage`, `hold_to_engage`, `haptics`, `haptic_near`, `haptic_torque`, `position_multiplier`, `teleop_max_vel`, and the gripper torque limit on hardware. `almond_axol.teleop.live.LiveSettings` validates each request and passes it to `VRTeleopCore.set_live(key, value)`. Changes apply on the IK thread before the next frame, or while the session is idle, so the control panel can change them with no headset connected. See [Live session settings](/api/vr#live-session-settings) for the full list and the wire protocol. # almond_axol.vr Source: https://docs.almond.bot/api/vr Secure WebSocket server that receives VRFrame messages from the VR app. Secure WebSocket server (WSS) that receives `VRFrame` JSON messages from the VR app. On first use it generates a self-signed TLS certificate in `~/.almond/vr/certs/`. You can use this module on its own to read raw VR data without full teleoperation, for example in a custom control loop or for data collection. ```python theme={null} from almond_axol.vr import VRServer, VRServerConfig ``` ```python theme={null} import asyncio from almond_axol.vr import VRServer, VRServerConfig async def main(): async with VRServer(VRServerConfig(port=8000)) as vr: while True: frame = vr.get_frame() if frame is not None: print(frame.l_ee, frame.r_ee) await asyncio.sleep(0.01) asyncio.run(main()) ``` Or use a callback instead of polling: ```python theme={null} def on_frame(frame): print(frame.l_grip, frame.r_grip) async with VRServer() as vr: vr.set_on_frame(on_frame) await asyncio.sleep(float("inf")) ``` ## `VRFrame` fields ### Controller input | Field | Type | Description | | - | - | - | | `l_ee` / `r_ee` | `VRPose` | 6-DOF end-effector pose (position and quaternion). | | `l_elbow` / `r_elbow` | `VRPosition` | 3D elbow positions. | | `l_grip` / `r_grip` | `float [0, 1]` | Gripper commands. `0` is closed and `1` is open. | | `l_lock` / `r_lock` | `bool` | Grip button states. See [Engage behavior](/api/teleop#engage-behavior). | | `l_tracked` / `r_tracked` | `bool` | Whether the headset can see the controller. `False` frames are estimated, so the pose smoother skips them and holds the last good pose. Defaults to `True`. | | `reset` | `bool` | A rising edge starts a return to rest. | | `state` | `VRState` | `TELEOP`, `DATA_COLLECTION` or `RECORDING`, set by the headset. `SAVING` and `ERROR` are only pushed by the server. | | `l_stick_x` / `l_stick_y` | `float [-1, 1]` | Left thumbstick (right is `+1`, forward is `-1`). Drives [Jelly](/guides/vr-interface#jelly)'s translation when one is configured. | | `r_stick_x` | `float [-1, 1]` | Right thumbstick x (right is `+1`). Turns Jelly. | | `r_stick_y` | `float [-1, 1]` | Right thumbstick y (forward is `-1`). Runs Jelly's lift: forward raises it and back lowers it. In [box mode](/guides/vr-interface#box-mode) it sets the grip width while a grip leads. | | `l_stick_click` / `r_stick_click` | `bool` | Thumbstick press. Used in box mode. See the notes below. | Each push of the right thumbstick either turns Jelly or runs the lift. The direction you push first decides which, until the stick returns to center. In box mode, the thumbsticks drive Jelly as usual, led or frozen. The right thumbstick's forward and back sets the grip width, so the clicks run the lift: hold the right click to raise it and the left click to lower it. While a grip leads the pair, a quick tap of either thumbstick click toggles the grasp (`box_grasp`). A tap is released within about 0.3 s, with the other stick up. A longer hold runs the lift. Pressing both thumbsticks together, within about 0.35 s, toggles box mode. The headset sends that toggle as a `set` message, described under [Live session settings](#live-session-settings). The stick, click and `l_tracked` / `r_tracked` fields have neutral defaults, so a client that leaves them out still works. ### Timing and pose source | Field | Type | Description | | - | - | - | | `t` | `float \| None` | Client capture time in ms (`performance.now()`), used by the pose interpolator. With `None`, the newest frame wins. | | `seq` | `int \| None` | Frame counter set by the producer. With `pose_source_id`, it drops duplicate copies of a frame that arrive over different transports. | | `t_host` | `float \| None` | When the poses were captured, on the host's `perf_counter` clock. The server fills it in from `t`. Mantis recordings align dataset rows to it. | | `pose_source_id` | `str \| None` | Stable ID of the producer, shared across its transports and reconnects. | | `pose_source_kind` | `"webxr" \| "tracker" \| None` | `webxr` for a Quest, `tracker` for a Lighthouse bridge. | | `l_pose_profile` / `r_pose_profile` | `str \| None` | WebXR input profile of each Quest controller, such as `oculus-touch-v3`. Quest calibration is stored per profile. | | `l_pose_space` / `r_pose_space` | `"grip" \| "target-ray" \| None` | Which WebXR pose each Quest controller reports. Production Mantis needs the calibrated `grip` pose. | ### Mantis episode control | Field | Type | Description | | - | - | - | | `l_trigger_live` / `r_trigger_live` | `bool` | Whether each Mantis trigger node is still sending input. When it stops, the take fails its quality check. Defaults to `True`. | | `episode_outcome` | `VREpisodeOutcome \| None` | One-frame `success` or `failure` signal from a trigger gesture or the rig's side button. The outcome is logged but not saved in the dataset. | | `episode_end_t_host` | `float \| None` | Host time at which a saved episode should end. The tracker bridge sets it to the start of the end gesture or button press, so the trigger clicks are trimmed from the take. | | `lock_release_id` | `int \| None` | Handshake ID for tracker bridges. The teleop core echoes it once it has handled a grip release. | ### Set by the server The headset never sets these. The teleop core adds them to the frame it forwards to the IK worker. | Field | Type | Description | | - | - | - | | `box_leader` | `"left" \| "right" \| None` | Which controller leads the pair in box mode. | | `reengage` | `"clutch" \| "ramp" \| None` | The session's [re-engage behavior](/api/teleop#re-engaging). | ### Pose transports and USB/Wi-Fi fallback The headset can stream poses over up to three transports at once: * the network WebSocket, * a USB `adb reverse` tunnel ([Quest over USB](/guides/quest-over-usb)), * a WebRTC data channel ([remote teleop](/guides/remote-teleop)). Every copy carries the same `pose_source_id` and `seq`, and the server handles each frame once, from whichever link delivers it first. If the cable drops, the Wi-Fi copy takes over with no reconnect. A late copy never rewinds the controls. The server forgets a producer's sequence when its last connection closes and on `disable()`, so a reloaded client starts fresh. Only one producer controls the robot at a time. Other clients stay connected and still receive video, HUD state and the robot model, but the server ignores their frames and HUD controls. * **Managed Quest Mantis** sets `VRServerConfig.pose_source_kind="webxr"`. * **Managed Lighthouse Mantis** sets it to `"tracker"`, and gives the bridge and server a one-run `expected_pose_source_id`. * **Without a pose source policy**, the first producer takes control. A tracker bridge can take over from a Quest. Once a tracker has control, the server doesn't fall back to a connected Quest if the bridge stops. A Lighthouse world isn't registered to the Quest's floor, so the headset hides the 3D robot overlay by default in those sessions. The WebRTC data channel (`almond_axol.vr.control_channel`) uses the same ICE and TURN path as the camera video, so an operator outside your tailnet can drive through a relay. Set the TURN server with `AXOL_TURN_URL`, `AXOL_TURN_USERNAME` and `AXOL_TURN_PASSWORD`. On a LAN or plain tailnet, leave them unset. If the data channel fails or drops, the headset requests it again after a delay. ## Server to headset feedback The server pushes JSON messages to the headset over the same socket. | Message | When | Effect | | - | - | - | | `{"type": "state", "value": "saving"}` | While an episode is saved | Blocks the recording controls. | | `{"type": "state", "value": "error"}` | On an error | Shows an error indicator. | | `{"type": "state", "value": "data_collection"}` | After saving | Turns the recording controls back on. | | `{"type": "mode", "value": "teleop" \| "data_collection"}` | On connect | Locks the HUD to one mode. `teleop` hides the recording controls. | | `{"type": "pose_source_kind", "value": ...}` | On connect | In a tracker-owned session, makes a Quest's recording controls view-only. | | `{"type": "episode", "value": N}` | At each episode start | Shows **Episode N** on the HUD. | | `{"type": "tracking", "value": true \| false}` | When tracking engages or disengages | The headset lets you move and resize camera screens only while tracking is off. | | `{"type": "joints", "value": {...}}` | About 20 times a second | Arm joint state for the HUD. | | `{"type": "haptics", "value": {...}}` | About 30 times a second while a controller vibrates, then once with all zeros | Vibrates the controllers. See [Haptics](#haptics). | Send any of these with `VRServer.broadcast_text()`. `AxolVRTeleop.send_feedback_state(state)` sends the `state` message for any `VRState`. `VRServer.set_mode()` sets the mode message. [`axol teleop`](/cli/teleop) sends `teleop`, and [`axol collect-data`](/cli/collect-data) sends `data_collection`. `AxolVRTeleop.send_feedback_episode(episode)` stores the episode number with `VRServer.set_episode()` and broadcasts it. Plain teleop never sets an episode, so the HUD hides it. The server sends the mode, pose source kind and episode to each client when it connects, so a headset that joins mid-session is up to date. The `joints` message has this shape: ```json theme={null} { "type": "joints", "value": { "q": {"": 0.0}, "l_grip": 0.0, "r_grip": 0.0, "engaged": false, "pair": {"aligned": false, "width": 0.3, "tilt": 0.0, "grasp": "straight"} } } ``` * `q` holds measured joint positions in radians when the robot reports them, and commanded targets otherwise. `l_grip` and `r_grip` run from `0` to `1`. * `pair` is the gripper pair geometry from `IKWorker.pair_status()`, or `null`. * `aligned` is true when the grippers already form a box-mode pair. The **Box** button then reads *(aligned)*, since switching to [box mode](/guides/vr-interface#box-mode) needs no blend. * `width` is the grip width in metres, between the contact faces. * `tilt` is the pair's inward tilt in degrees, and `grasp` is `"flush"` or `"straight"`. ### Haptics `VRTeleopCore.maybe_broadcast_haptics()` sends each controller's vibration levels. Both teleop adapters call it from the control loop. ```json theme={null} { "type": "haptics", "value": { "left": {"near": 0.0, "force": 0.0}, "right": {"near": 0.6, "force": 0.0} } } ``` * Each level runs from `0` to `1`, and only an engaged arm has non-zero levels. In box mode the leading controller gets the stronger of the two arms, and the other controller gets zeros. * `near` is how close the arm is to the IK's arm/body collision boundary, from the solver's `collision_proximity()`. It is `0` unless `haptic_near` is on. It is `1` where the IK holds the arm off the body instead of following the target. A pose as clear as the rest pose reads `0`. * `force` is how far the arm's largest torque residual (measured minus modeled gravity, low-passed over about 80 ms, less a held object's weight) is past `haptic_torque`. It reaches `1` at 2.5 times `haptic_torque`. A joint under a box-mode torque cap starts at 80% of its cap if that is lower, and reaches `1` at the cap. It is always `0` in sim. * `useAxolHaptics(wsRef)` in `@almond/axol-vr-client` plays them: `near` as ticks that speed up, and `force` as throbs that get stronger and faster with it, up to a steady rumble at `1`. The throbs take over from the ticks. It stops if the messages stop for 300 ms. The server also serves the robot model under `/urdf/` (`axol.urdf` and `meshes/*.stl`). ### Live session settings Some settings can change during a session from any client: the headset HUD, the control panel or the SDK. They are defined in `almond_axol.teleop.live.LiveSettings` and use three messages on the same socket. * **Client to server:** `{"type": "set", "key": "", "value": }`. The callback set with `VRServer.set_on_setting()` handles it. The value is checked for type, range and choices, and a rejected request is logged and not echoed. A boolean key also accepts `"value": "toggle"`, which flips the server's current value. * **Client to server:** `{"type": "session-config-request"}`. The server re-sends that client the session config it sends on connect: `mode`, `settings`, `pose_source_kind`, `pose_mode`, `tracking`, `episode` and `hud`. Send it once your message listeners are ready, so you don't miss the copy sent on connect. * **Server to clients:** `{"type": "settings", "value": {"schema": [...], "values": {"": ...}}}`. Sent on connect, on `session-config-request`, and after every `set`, so all clients show the server's state. Each `schema` entry has `key`, `label`, `type` (`"boolean"`, `"select"` or `"number"`), `help`, `options`, `min`, `max`, `step` and `unit`. Both UIs build their controls from it. | Key | Label | Type | Effect | | - | - | - | - | | `box_mode` | **Box mode** | boolean | Turns box mode on or off through `VRTeleopCore.set_box_mode()`. | | `box_lead_hand` | **Box lead hand** | `"right"` / `"left"` | Which controller leads when box mode turns on. | | `box_grasp` | **Box grasp** | `"straight"` / `"flush"` | Fingers straight forward, or turned inward onto the box. A live pair blends to the new grasp. | | `box_flush_deg` | **Angled yaw** | number, ° | How far the `flush` grasp turns each gripper inward. Applies at the next engage or grasp switch. | | `box_face_left` / `box_face_right` | **Left face** / **Right face** | `"auto"` / `"+x"` / `"-x"` | Which side of each gripper faces the box. Applies at the next engage. | | `box_elbow_out` | **Elbows out** | number, ° | How far out the elbows are held in box mode. | | `box_squeeze_force` | **Squeeze force** | number, N | Cap on each arm's clamp force. Hardware only. | | `box_squeeze_lean` | **Squeeze lean** | number, × | Scale on the inward lean as the clamp builds. Hardware only. | | `box_squeeze_trim` | **Squeeze trim** | number, ° | Most extra inward yaw the trim may add. Hardware only. | | `box_squeeze_torque` | **Squeeze cap** | number, Nm | Hard shoulder torque cap in box mode. Hardware only. | | `reengage` | **Re-engage** | `"clutch"` / `"ramp"` | Calls `VRTeleopCore.set_reengage()`. Applies at the next grip press. | | `hold_to_engage` | **Hold to engage** | boolean | Grips act as per-arm dead-man switches instead of toggles. | | `haptics` | **Haptics** | boolean | Turns the [controller haptics](#haptics) on or off. | | `haptic_near` | **Body ticks** | boolean | Adds the ticks near the body (`near`). Off by default. | | `haptic_torque` | **Haptic push** | number, Nm | Torque residual at which the rumble starts. Hardware only, so it is hidden in sim. | | `gripper_torque` | **Grip force** | number, Nm | Torque limit of both grippers. Hardware only, so it is hidden in sim. | | `position_multiplier` | **Reach scale** | number, × | Scale from hand motion to arm motion. | | `teleop_max_vel` | **Arm speed** | number, rev/s | Joint velocity cap while tracking. | See [`VRTeleopConfig` fields](/api/teleop#box-mode) for what each box-mode setting does. The `box_*` keys exist only when the robot has the parcel gripper (`VRTeleopConfig.gripper == "parcel"`). Otherwise they are left out of `schema` and `values`, and a `set` of one is rejected. Clients show box mode only when `box_mode` is in `values`. `VRTeleopCore.set_live()` queues each change and applies it on the IK thread before the next frame, or while the session is idle. Settings that the IK worker reads are passed on to it as `("set", key, value)` messages. The server also relays HUD state between clients. The active Quest publishes its save or discard confirmation and the recording countdown as `{"type": "hud", "value": {...}}`. The server forwards the latest value to every other client, re-sends it to a client that joins mid-dialog, and clears it when the publisher disconnects. Viewers and Quests in tracker-owned sessions can't publish HUD state. The control panel uses this relay to show the headset's popups. ## Camera video to the headset The server can stream camera frames to the headset over WebRTC. Register a source per camera with `set_video_sources()`: ```python theme={null} vr.set_video_sources({ "overhead": overhead_cam, "left_arm": left_cam, "right_arm": right_cam, }) ``` A source can be: * a pre-encoded camera from the GPU pipeline (`gst_zed`), with `subscribe()` and `alive`. Its H.264 frames go straight to the headset with no encoding in Python. * a connected `ZedCamera` or stereo eye, which the relay adapts. * any object with fixed `width`, `height` and `fps`, and `wait_next(after_ts, timeout_ms)`. Pass `None` or `{}` to turn video off. [`axol teleop --cameras`](/cli/teleop) and [`collect-data`](/cli/collect-data) set this up for you. Signaling uses the existing `/ws` channel, so no extra ports are needed. The headset sends `webrtc-request`, the server replies with a `webrtc-offer` that has one video track per camera, and the headset answers with `webrtc-answer`. * A stereo overhead camera streams both eyes side by side in one track, `overhead_sbs`, which the VR app shows per eye. Without GStreamer, the SDK fallback sends two tracks, `overhead_left` and `overhead_right`. * A stereo wrist camera streams one feed under its slot name, like a mono camera. * Dataset recording still stores both eyes of a stereo overhead camera as two observation keys. ### Pipeline Teleop and data collection share one camera path that stays on the GPU (`almond_axol.video.gst_zed`). The zed-gstreamer sources (`zedxonesrc` for mono, `zedsrc` for stereo) capture into GPU memory, and one GStreamer pipeline splits each frame into up to three branches: * **Headset:** 30 fps, encoded by NVENC (`nvv4l2h264enc`). aiortc forwards the H.264 packets to the headset without re-encoding. * **Dataset:** paced to the recording fps, downscaled and NVENC-encoded. Each frame keeps its exposure timestamp, so the recorder can pair it with the nearest robot state without copying or re-encoding the frame. * **Raw:** converted to RGBA for policies and for the fallback path. Its exposure timestamps are also on the `time.perf_counter` clock. Camera capture, encoding and WebRTC run in a separate process (`almond_axol.video.video_proc.VideoRelayProcess`), registered with `set_video_manager()`. Teleop builds only the headset branch. Data collection adds the dataset branch and a recorder process that owns the `LeRobotDataset`. During collection, the recorder pairs each frame set with the robot state sampled nearest the median camera exposure. It discards the episode instead of saving a mismatched row if any of these happen: * a timestamp is missing, * a frame is stale or repeated, * the cameras and robot state are too far apart in time, * the predictive video stream breaks. If shared-memory frame transport isn't available, collection falls back to raw frames. If the patched ZED plugin can't be verified, it falls back to the ZED SDK. This path needs the GPU camera stack that the host installer sets up: * GStreamer and PyGObject from [`axol gst.install`](/cli/gst-install). * The patched zed-gstreamer plugins from [`axol gst.build-zed`](/cli/gst-build-zed). The NVENC elements come with the Jetson L4T BSP. * NVENC and VIC clocks pinned to their maximum. [`axol provision`](/cli/provision) does this (see [`jetson.setup`](/cli/jetson-setup)), and the installer's systemd unit reapplies it at boot. Without it, encode latency per frame roughly triples. ## `VRServerConfig` fields | Field | Default | Description | | - | - | - | | `port` | `8000` | WSS listen port. | | `certfile` | auto | Path to the TLS certificate. `None` uses the generated certificate. | | `keyfile` | auto | Path to the TLS private key. | | `pose_source_kind` | `None` | Which kind of producer may control the robot: `"webxr"` (Quest Mantis) or `"tracker"` (Lighthouse). Other clients stay connected as viewers. | | `expected_pose_source_id` | `None` | The one producer ID allowed to control the robot. Managed Lighthouse sessions set it to a one-run token. | | `interp_enabled` | `True` | Turns on the playout buffer, which uses the headset timestamp `t` to smooth uneven frame arrival. | | `interp_min_delay_s` | `0.0` | Shortest playout delay, in seconds. | | `interp_max_delay_s` | `0.15` | Longest playout delay, in seconds. The buffer adds delay only while frames arrive in bursts. | | `interp_smooth_window_s` | `0.12` | Width of the smoothing window around the playout point. It adds half its width in latency. `0` turns it off. | | `interp_outlier_k` | `4.0` | Outlier threshold for rejecting tracking glitches, in robust standard deviations. Lower rejects more. `0` or less turns it off. | | `interp_max_lag_s` | `0.5` | Frames later than this are not played, but their grip and reset buttons still count. After a network stall the arms hold, then follow the current pose. `0` or less turns it off. | > [!WARNING] > > Before opening the VR app, accept the self-signed certificate by navigating to `https://.local:8000` in the VR browser and proceeding past the security warning. # almond_axol.zed Source: https://docs.almond.bot/api/zed Enumerate locally connected ZED cameras and manage the ZED X daemon. Helpers for the ZED cameras attached to the host computer over GMSL. They require `pyzed`, which you install with [`axol zed.install`](/cli/zed-install). The LeRobot wrappers in [`almond_axol.lerobot.camera`](/api/lerobot#zedcamera) open the cameras themselves. ```python theme={null} from almond_axol.zed import ZedDevice, list_zed_devices, restart_zed_daemon, stereo_serials ``` ## `list_zed_devices()` Lists the ZED cameras the SDK can see, both mono (ZED-X One, `sl.CameraOne`) and stereo (ZED X, `sl.Camera`). Returns a list of `ZedDevice` dicts sorted by serial number: ```python theme={null} from almond_axol.zed import list_zed_devices for dev in list_zed_devices(): print(dev["serial"], dev["model"], dev["kind"]) # 41234567 ZED XM mono # 41234568 ZED XM mono # 41234569 ZED X stereo ``` | Key | Type | Description | | - | - | - | | `serial` | `int` | Camera serial number, the value you pass to `ZedCameraConfig(serial=...)` | | `model` | `str` | SDK model name (e.g. `ZED XM`, `ZED X`) | | `kind` | `str` | `"mono"` (ZED-X One) or `"stereo"` (ZED X) | ## `stereo_serials()` Returns the serial numbers of the connected **stereo** (ZED X) cameras as a `set[int]`. Teleop and the [control panel](/guides/control-panel#cameras) use it to detect stereo cameras from their serial, so the operator doesn't have to mark them: ```python theme={null} from almond_axol.zed import stereo_serials if 41234569 in stereo_serials(): ... # open it as a stereo ZED X (both eyes) ``` If listing fails, for example because `pyzed` is missing or the daemon is down, it returns an empty set. Callers then treat every camera as mono. ## `restart_zed_daemon()` Restarts the `zed_x_daemon` systemd service and waits about 5 s while it scans the GMSL links again. The daemon looks for cameras only when it starts, so the SDK can't see a camera plugged in **after boot** until the daemon restarts. When in doubt, call this before opening cameras, or press **Restart camera service** on [the Axol or Mantis Cameras tab](/guides/control-panel#cameras). ```python theme={null} from almond_axol.zed import restart_zed_daemon restart_zed_daemon() # raises RuntimeError if systemctl fails ``` When not running as root, it runs `systemctl restart zed_x_daemon` through passwordless `sudo`. It raises `RuntimeError` if that fails, for example on a headless session without sudo rights. # can.driver Source: https://docs.almond.bot/cli/can-driver Install a gs_usb kernel driver that works with the Axol Hub. Builds and installs the `gs_usb` USB CAN kernel driver for the running kernel. You need it on NVIDIA Jetson and ZED Box computers, whose kernels ship without USB CAN drivers. Without it the Axol Hub shows up on USB, but no `can*` network interfaces appear. ```bash theme={null} axol can.driver ``` > [!NOTE] > > [`can.setup`](/cli/can-setup) runs this check for you, so you rarely need to run it yourself. ## What it does * If the kernel's own driver supports every adapter that is plugged in, it keeps that driver. Linux 6.13 and newer, and many maintained 6.2+ distribution kernels, fall in this group. * Otherwise it builds Almond's driver from source and installs it under `/lib/modules/$(uname -r)/updates/`. The driver then loads on every boot. * If the install or load fails, it restores the previous driver. Almond's driver is the Linux 5.15 `gs_usb` driver with the fixes the Axol Hub needs: it tells the left and right arm channels apart, finds the hub's USB endpoints, and fixes receive-path crashes. See `almond_axol/cli/can/gs_usb/README.md` for the full list. Building needs the kernel headers and `build-essential`. Both ship with JetPack. ## After a kernel update The driver is built for the exact running kernel. Rebooting into the same kernel needs no action. After a JetPack or other kernel update changes `uname -r`, run `axol can.driver` or `axol can.setup` once under the new kernel to rebuild it. ## Secure Boot On a computer that enforces module signatures, `can.driver` refuses to install an unsigned driver and leaves the current one in place. Sign the module with an enrolled key, or use a newer kernel whose built-in driver supports your adapters. # can.enable Source: https://docs.almond.bot/cli/can-enable Bring the CAN interfaces up by hand. Brings up the CAN interfaces that [`can.setup`](/cli/can-setup) configured. You rarely need it, because the interfaces come up on every boot and whenever an adapter is plugged back in. Use it after you take the interfaces down yourself, or if they didn't come back after a replug. Run [`can.setup`](/cli/can-setup) first. ```bash theme={null} axol can.enable # every configured Axol/Mantis interface axol can.enable --channels can0 # one non-hub adapter axol can.enable --channels can0 can1 # two adapters / channels ``` With no flags, `can.enable` brings up every interface `can.setup` configured: the arms, Mantis, and [Jelly](/guides/vr-interface#jelly)'s wheel and lift buses. It skips any adapter that is unplugged. [`axol teleop`](/cli/teleop) also brings up Jelly's interfaces when it starts. ## Adapters other than the Axol Hub Pass `--channels` with one interface for a single arm, or two for both. `can.enable` sets each one to 1 Mbit/s and brings it up. Interfaces that are already up are left alone. This form doesn't need `can.setup`. # can.setup Source: https://docs.almond.bot/cli/can-setup Detect and configure the CAN adapters for Axol, Jelly and Mantis. Run `can.setup` once on a new computer, and again whenever you add or move a CAN adapter. It finds each attached adapter, gives it a fixed interface name and brings it up. ## Before you run it * Plug every CAN adapter into the computer. * Power on Axol, Jelly and Mantis. `can.setup` identifies each adapter by the devices that answer on it, so an unpowered device can't be identified. * Stop any operation that is using the robot. `can.setup` resets every attached CAN link. ## Run it ```bash theme={null} axol can.setup ``` `can.setup` asks for `sudo` when it needs it. It does the following: 1. Installs the `gs_usb` kernel driver if the kernel lacks it. See [`can.driver`](/cli/can-driver). 2. Identifies each adapter and pins it to its interface name by USB serial number. 3. Writes udev rules, a startup script and a hotplug service, so the interfaces come up on every boot and whenever an adapter is plugged back in. 4. Resets each link to 1 Mbit/s and brings it up. 5. Downloads this Axol's [factory calibration](/cli/tune-factory) into `~/.almond/factory_calibration.json`. If the computer is offline, it keeps the copy it already has. Every bus is optional. `can.setup` configures whatever it finds. | Interface | Device | Adapter | | - | - | - | | `can_alm_axol_l` | Left arm | Axol Hub, channel 0 | | `can_alm_axol_r` | Right arm | Axol Hub, channel 1 | | `can_alm_axol_b` | Jelly wheel motors, and the lift when it shares this bus | Single-channel adapter | | `can_alm_axol_c` | Jelly lift controller on a separate bus | Single-channel adapter | | `can_mantis_l` | Left Mantis gripper | Mantis Hub, channel 0 | | `can_mantis_r` | Right Mantis gripper | Mantis Hub, channel 1 | The Mantis Hub is the same dual-channel board as the Axol Hub. Axol and Mantis can be set up together in one run, and setting up one never removes the other. The Jetson's built-in CAN controller is left alone. ## Jelly lift wiring Jelly's lift controller can be wired in either of two ways: * **On a separate adapter.** `can.setup` names that adapter `can_alm_axol_c`. * **On the wheel bus.** The lift shares `can_alm_axol_b` with the four wheel motors, and there is no `can_alm_axol_c`. `can.setup` detects which wiring you have. [`axol teleop`](/cli/teleop), [`lift.home`](/cli/lift-home), [`lift.goto`](/cli/lift-goto) and [`diag.lift-cycle`](/cli/diag-lift-cycle) use `can_alm_axol_c` when it exists and `can_alm_axol_b` otherwise. If you move the lift onto the wheel bus, run `axol can.setup` again. You don't need `can.setup` to drive Jelly, because [`axol teleop`](/cli/teleop) brings Jelly's interface up itself. Running it gives the adapter a name that stays the same across reboots. The [control panel](/guides/control-panel#axol-and-mantis) also pins a powered Jelly's adapters when it detects them. ## How adapters are identified | Device | What `can.setup` looks for | | - | - | | Axol arm | A shoulder motor at ID `0x001` | | Mantis | Trigger frames on ID `0x009` | | Jelly wheels | Motors at IDs `0x01` to `0x04` | | Jelly lift | A reply to a status request on `0x421` | If an adapter that was set up before stays silent, it keeps its previous name. If a dual-channel hub is silent, `can.setup` asks whether it is Axol or Mantis, or whether to skip it. ## If something goes wrong * **Secure Boot blocks the driver.** `can.setup` stops before it changes the driver. Sign and enroll the module, or use a newer kernel whose built-in `gs_usb` driver supports your adapters. See [`can.driver`](/cli/can-driver). * **`TX queue stalled` after an emergency stop.** Unplug the Axol Hub and plug it back in before you run anything that moves the arms. * **The hub drops off USB on a Raspberry Pi 5** (`disabled by hub (EMI?)` in `dmesg`). `can.setup` already turns on the Pi 5 USB noise filter. If it keeps happening, add a ferrite choke or shielding to the hub's USB cable, or put a small powered USB hub between the Pi and the Axol Hub. ## Recovery after an emergency stop When motor power is cut mid-motion, the commands that were in flight stay queued. If they were sent when power returns, the arm would jump to the pose it was commanded to when power died. Axol clears those commands and holds the arm still until the bus answers again. Before any arm bring-up enables a motor, it also checks the queue and refuses to enable if old commands remain. To clear the queue from a manual `axol serve` or `axol teleop`, the computer needs the permissions that [`axol provision`](/cli/provision) installs. Without them the old commands stay queued until you unplug and replug the hub. Every arm bring-up updates the Axol Hub to the firmware that ships with `axol`. See [`hub.flash`](/cli/hub-flash). # collect-dagger Source: https://docs.almond.bot/cli/collect-dagger DAgger data collection: a trained policy drives while the operator intervenes from VR, and both are recorded. Runs a trained policy on the robot while the operator watches in VR and steps in to correct it. The whole session is recorded to a [LeRobot](https://github.com/huggingface/lerobot)-format dataset, both the policy's motion and the operator's corrections. This is the [DAgger](https://arxiv.org/abs/1011.0686) loop: you record demonstrations where the policy struggles, so retraining fixes those failures. Local policies run inference on the robot, one action per control tick. [Remote policies](#remote-policies-through-the-custom-policy-interface) run on a desktop. Cameras and recording work as in [`collect-data`](/cli/collect-data). > [!WARNING] > > Load only policy checkpoints and resumed datasets that you created or > obtained from a trusted source. Loading them is not sandboxed. With a local policy, the VR grip buttons control interventions during an episode: * While the policy drives, **either grip alone** freezes it. The robot holds its pose and recording pauses. * **Both grips** hand control to you. Teleop engages at the robot's current pose and recording resumes. * **Either grip alone** hands control back to the policy. Nothing is recorded while frozen, so the dataset goes straight from the policy's motion into your correction. Remote policies use [hold-to-intervene controls](#remote-policies-through-the-custom-policy-interface). In both modes, rows you drive are tagged with LeRobot's per-frame `intervention` flag. Episodes start and end as in `collect-data`: * Press the **record** button to start an episode. The policy starts driving and recording begins. * Press **record** again to save. * Press **record** with **reset** held to discard and record again. On the terminal, `s` saves, `r` discards, and `q` discards and quits. `--episode_time_s` saves the episode if nothing is pressed in time. With a local policy and `--subtasks`, type a number from `1` to `N` to switch the policy's instruction without ending the episode. > [!TIP] > > For the end-to-end workflow, from a trained checkpoint to recorded corrections, see the [DAgger Collection guide](/operations/dagger). This command is configured through draccus. Local inference uses `--policy_path`, `--policy_type` and `--device`. `--policy_type custom` selects the [custom policy interface](/api/policy-plan). The recording side matches [`collect-data`](/cli/collect-data): the nested `robot_config` and `teleop_config` set cameras, per-joint gains, IK and the VR server. See [Command configuration](/cli/configuration) for the syntax and [DAgger Collection Config Parameters](/operations/dagger-config) for every setting. | Flag | Description | | - | - | | `--policy_path PATH_OR_REPO` | Local checkpoint path or HuggingFace repo ID. Required for local policies, unused for `custom`. | | `--policy_type {act,smolvla,diffusion,tdmpc,vqbet,pi0,pi05,groot,custom}` | Local policy architecture, or `custom` for a remote endpoint (required) | | `--task TEXT` | Natural language task description recorded with the dataset (required) | | `--repo_id /` | Dataset repo ID to record to (required). Point it at an existing dataset to resume it, as in [`collect-data`](/cli/collect-data). | | `--subtasks '["step one", "step two"]'` | Local policies only: ordered per-step instructions, as one inline list. The dataset's task string stays `--task`. Default: none | | `--episode_time_s INT` | Longest episode in seconds before it saves (default: 600). `0` removes the limit. | | `--fps INT` | Policy and recording frame rate (default: 30). Must match the policy's training rate, and can't exceed the camera rate. | | `--teleop_hz INT` | Motor command rate while you drive (default: 120). The policy and frozen states always run at `--fps`. | | `--policy_fps INT` | Rate of camera frames for the policy's observations (default: 20). The dataset still records every frame at `--fps`. | | `--policy_max_vel FLOAT` | Local policies only: per-joint velocity limit (rad/s) on the policy's arm actions (default: 6.2832, 2π). `0` turns it off. | | `--policy_max_accel FLOAT` | Local policies only: per-joint acceleration limit (rad/s²) on the policy's arm actions (default: 21.9911, 7π) | | `--device STR` | PyTorch device for local inference (default: `cuda`). Use `cpu` with the hosted Jetson install, which has CPU-only PyTorch. | | `--dataset_resolution {SVGA,HD1080,HD1200}` | Resolution of the dataset video and of the policy's images (default: `SVGA`, 960×600). A resumed dataset keeps its original resolution. | | `--vcodec STR` | Dataset video codec (default: `h264` on Jetson, `auto` elsewhere). Same as [`collect-data`](/cli/collect-data). | | `--root PATH` | Local dataset root (default: `$HF_LEROBOT_HOME`) | | `--push_to_hub true` | Push the dataset to HuggingFace Hub when done. Log in first. See [Upload to the HuggingFace Hub](/operations/data-collection#upload-to-the-huggingface-hub). | | `--robot_config.cameras DICT` | Camera slots and serial numbers, as in [`collect-data`](/cli/collect-data): `--robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}"`. Assign the cameras the policy was trained on. At least one must record. | | `--robot_config.axol_config.left_stiffness S` | Left arm stiffness in `[0, 1]` (default: 1). Match the value used to collect the policy's data. Use `right_stiffness` for the right arm. See [`AxolConfig.left_stiffness`](/api/robot). | | `--teleop_config.vr_teleop_config.reset_torque_threshold FLOAT` | Contact limit (Nm) for every return to rest (default: 6.0). `0` turns it off. | | `--teleop_config.vr_teleop_config.reset_gravity_comp_kd FLOAT` | Damping (Nm·s/rad) while the arms hang limp after a contact stop (default: 0.25). Same as [`gravity-comp`](/cli/gravity-comp) `--kd`. | | `--rerun_ip IP` | IP of a Rerun viewer on your computer, for live visualization | | `--rerun_port INT` | Rerun viewer port (default: 9876). Used only with `--rerun_ip`. | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | If a return to rest hits something, the arms stop and go limp in a gravity-compensation hold. Free them by hand, then press the VR **reset** button, or continue at the prompt, to return to rest from where they are. This works as in [`teleop`](/cli/teleop#contact-stops). The video relay must start for this command. If it can't, install the GStreamer stack with [`gst.install`](/cli/gst-install) and [`gst.build-zed`](/cli/gst-build-zed). ```bash theme={null} axol collect-dagger --policy_path myorg/pick-place-policy --policy_type act \ --task "Pick the red cube and place it in the bin" --repo_id myorg/pick-place-dagger \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" axol collect-dagger --policy_path ./checkpoints/epoch_100 --policy_type smolvla \ --task "Stack the blocks" --repo_id myorg/stack-dagger \ --subtasks '["Grasp the top block", "Place it on the stack"]' \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" ``` ## Local-policy intervention flow The grip buttons move control between the policy and the operator during an episode. | From | Grip action | To | Recording | | - | - | - | - | | **Policy** driving | Either grip alone | **Frozen**, robot holds pose | Paused | | **Frozen** | Both grips | **Teleop**, operator drives | Resumes (rows tagged `intervention`) | | **Teleop** | Either grip alone | **Policy** driving | Keeps running | * When you take over, teleop engages at the robot's measured pose, so the arm doesn't jump. * The grippers follow the controller triggers as soon as you take over. Set the triggers before you squeeze the grips. For example, hold a trigger down to keep a part gripped. * When you hand back, the policy restarts its plan from the corrected pose. * If the headset link drops while you drive, tracking disengages and control goes back to the policy. Between episodes the grips work as plain teleop, and nothing is recorded. Squeeze both to engage and one to disengage, so you can reset the scene with the arms. The VR **reset** button sends the arms to rest. Inside an episode the reset button is disabled, and episodes end from the record button. ## Remote policies through the custom policy interface `--policy_type custom` runs inference on a desktop through the custom policy interface. It requires `--hold_to_intervene true`: * Hold either grip to drive that arm. The other arm holds its pose. * Release both grips to hand control back to the policy. * If the headset connection drops while you hold a grip, you keep control and the arm holds its position until you release. The freeze and toggle controls above apply to local policies only. For example, on the robot, with your endpoint address and camera serial: ```bash theme={null} axol collect-dagger --policy_type custom \ --server_host 192.0.2.10 --server_port 8765 \ --task "Pick the cube" --repo_id myorg/remote-policy-corrections \ --hold_to_intervene true --record_joint_actions true \ --home_on_start true --start_from_current_pose true \ --robot_config.cameras "{overhead: {serial: 41234567}}" ``` The endpoint must accept the robot's state, action and camera layout. No checkpoint path is needed. `--task` labels the dataset and isn't sent to the endpoint, and the endpoint picks the instruction. Remote mode rejects `--subtasks`. Set DAgger's own `server_host` and `hold_to_intervene`. The control panel shows these fields too. Run-policy's inference settings don't select the DAgger endpoint. | Flag | Description | | - | - | | `--server_host HOST` / `--server_port INT` | Address and port of your policy endpoint (defaults: `127.0.0.1` / `8765`) | | `--hold_to_intervene true` | Hold a grip to drive that arm. Required for remote policies. | | `--shadow_inference BOOL` | Keep requesting predictions while you drive (default: `true`). They never move the motors. | | `--handover_duration_s FLOAT` | Time to blend from your last command into the policy's plan when you hand back (default: `0.2667` s) | | `--record_joint_actions true` | Record joint commands even when the policy sends Cartesian targets. Images and measured state keep their schema. | | `--start_from_current_pose true` | Skip the startup home and the home after idle teleop. Episodes start where you left the arms. | | `--home_on_start true` | With `--start_from_current_pose`, still home once at startup. | When you hand back, the robot holds your last command until the desktop returns a fresh plan from the corrected pose. It then blends into that plan. Each switch between policy and operator stays in the same dataset episode, and the rows are labelled correctly at the switch. The startup move must finish before the first VR Record prompt opens. Whenever the session homes on start (the default, or with `--home_on_start true`), it first checks that `shoulder_1`, `shoulder_2` and `elbow` are within 25° of zero, and the first home goes through zero. See [Starting needs the arms near zero](/operations/teleop). A session with `--start_from_current_pose` and without `--home_on_start` can start anywhere. ## Stopping a session With a local policy, ending the session parks the arms as in `collect-data`. They go to rest, then to zero holding the grasp, then the motors turn off. Zero applies with `--teleop_config.vr_teleop_config.park_to_zero` (on by default; the control panel's **Park to zero on stop**). The moves are limited to 6 s and 10 s. With a remote policy: * Press `q` once to park through rest and zero, then turn off the motors. It needs no Enter and discards an episode in progress. It works at the idle VR Record prompt or during an episode. * An idle `q` never starts the policy. * During an episode, `s` + Enter saves and `r` + Enter discards. * End-of-input, `Ctrl+C`, a fault, declining a contact retry or a failed park all stop without parking. The motors keep holding the arms' position. * Arms already limp after a contact stop stay limp and don't park. ## DAgger annotation Every dataset `collect-dagger` creates has LeRobot's per-frame `intervention` feature. It is `True` on rows you drove and `False` on the policy's rows, the same annotation LeRobot's DAgger rollout uses. Training can use it to weight or filter the corrections. You can resume only a dataset that already has the `intervention` feature, which means one recorded by this command. Any other dataset is rejected. # collect-data Source: https://docs.almond.bot/cli/collect-data Record teleoperation episodes to a LeRobot-format dataset. Records teleoperation episodes from the VR controllers and the ZED cameras attached to the robot, and saves them to a [LeRobot](https://github.com/huggingface/lerobot)-format dataset. It runs until you press `Ctrl+C`. > [!TIP] > > For the end-to-end workflow, see the [Data Collection guide](/operations/data-collection). This command is configured through draccus. The robot and teleop settings live in the nested `robot_config` and `teleop_config` configs: cameras, per-joint gains, IK and the VR server. Set them with dotted flags or a whole-config file (see [Command configuration](/cli/configuration)). The table below lists the common flags. Every nested field is listed with its default in [Data Collection Config Parameters](/operations/data-collection-config). | Flag | Description | | - | - | | `--repo_id /` | HuggingFace dataset repo ID (required) | | `--task TEXT` | Natural language task description (required) | | `--fps INT` | Dataset frame rate (default: 30). It can't be higher than the camera capture rate. The headset stream is separate. | | `--dataset_resolution {SVGA,HD1080,HD1200}` | Resolution of the dataset video (default: `SVGA`, 960×600). The headset still gets full resolution. A resumed dataset keeps its original resolution. | | `--vcodec STR` | Dataset video codec (default: `h264` on Jetson, `auto` elsewhere). Accepts any LeRobot codec, e.g. `auto`, `h264` or `libsvtav1`. | | `--teleop_hz INT` | Motor command rate in Hz, separate from `--fps` for smooth control (default: 120) | | `--mantis true` | Record with Mantis instead of Axol. See [Recording with Mantis](#recording-with-mantis). | | `--mantis_source {quest,lighthouse}` | Mantis pose source. Default: the **Tracking** choice saved in **Mantis settings**, or `lighthouse` if none is saved. | | `--teleop_config.vr_teleop_config.reset_torque_threshold FLOAT` | Contact limit (Nm) for every return to rest (default: 6.0). `0` turns it off. See [After each episode](#after-each-episode). | | `--teleop_config.vr_teleop_config.reset_gravity_comp_kd FLOAT` | Damping (Nm·s/rad) while the arms hang limp after a contact stop (default: 0.25). Same as [`gravity-comp`](/cli/gravity-comp) `--kd`. | | `--teleop_config.vr_teleop_config.teleop_torque_threshold FLOAT` | Contact limit (Nm) while you drive the arms during a take (default: `0`, off). The control panel suggests `16.0`. | | `--teleop_config.vr_teleop_config.haptics BOOL`, `--teleop_config.vr_teleop_config.haptic_near BOOL`, `--teleop_config.vr_teleop_config.haptic_torque FLOAT`, `--teleop_config.vr_teleop_config.haptic_held_load BOOL` | [Controller haptics](/operations/teleop#controller-haptics) on or off (default: `true`), the ticks near the body (default: `false`), the torque (Nm) at which the rumble starts (default: `6.0`), and whether a held object's weight is kept out of the rumble (default: `true`). | | `--root PATH` | Local dataset root (default: `$HF_LEROBOT_HOME`) | | `--record_jelly true` | Also record Jelly's lift height and wheel positions (default: `false`). Needs Axol on Jelly. See [Record Jelly](/operations/data-collection#record-jelly). | | `--push_to_hub true` | Push to HuggingFace Hub when done. Log in first. See [Upload to the HuggingFace Hub](/operations/data-collection#upload-to-the-huggingface-hub). | | `--robot_config.cameras DICT` | Camera slots (`overhead`, `left_arm`, `right_arm`) and each ZED camera's serial number, as one inline value: `--robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}"`. At least one camera must record. | | ↳ `record` / `stream` (per camera) | `record` (default `true`) writes the camera to the dataset. `stream` (default `true`) sends it to the headset. A camera with both off is dropped. | | ↳ `stereo` (auto-detected) | Stereo ZED X cameras are detected from their serial number. See [Stereo cameras](#stereo-cameras). | | ↳ `eyes` / `stream_eyes` (per stereo camera) | `eyes` picks which eyes are recorded (`both`, `left` or `right`). `stream_eyes` picks which are streamed to the headset (default `null`, same as `eyes`). | | `--robot_config.video_backend {auto,gst,sdk}` | Camera capture backend (default: `auto`). `auto` uses the GStreamer pipeline (`gst`) when it's installed, and the ZED SDK (`sdk`) otherwise. | | `--robot_config.axol_config..gripper.torque_limit FLOAT` | Max torque (Nm) for a gripper (default: 0.5, at most 5). `` is `left` or `right`. | | `--robot_config.axol_config.left_stiffness S` | Left arm stiffness, from `0` (hand-guidable) to `1` (default, the tuned production gains). A scalar or one value per joint. Use `right_stiffness` for the right arm. See [`AxolConfig.left_stiffness`](/api/robot). | | `--teleop_config.vr_teleop_config.position_multiplier FLOAT` | Scale hand position by this factor (default: `1.0`). At `2.0` the arm moves twice as far as your hand. | | `--teleop_config.vr_teleop_config.rotation_multiplier FLOAT` | Scale hand rotation by this factor (default: `1.0`). At `2.0` the gripper turns twice as far as your wrist. | | `--rerun_ip IP` | IP of a Rerun viewer on your computer, for live visualization | | `--rerun_port INT` | Rerun viewer port (default: 9876). Used only with `--rerun_ip`. | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | On the Jetson, `h264` is encoded in hardware at a capped bitrate (about 3 Mbps at SVGA and 30 fps). Every camera's video stays about the same size, even from a noisy sensor. ```bash theme={null} axol collect-data --repo_id myorg/pick-place --task "Pick the red cube and place it in the bin" \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" axol collect-data --repo_id myorg/pick-place --task "Pick the red cube" --fps 30 \ --robot_config.cameras "{overhead: {serial: 41234567, stereo: true}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" \ --robot_config.axol_config.left_stiffness 1.0 --robot_config.axol_config.right_stiffness 1.0 ``` ### Stereo cameras Stereo ZED X cameras are detected from their serial number, both on the CLI and in the [control panel](/guides/control-panel#cameras): * A stereo **overhead** camera records both eyes, as `overhead_left` and `overhead_right`. * A stereo **wrist** camera (`left_arm` or `right_arm`) records its left eye under the slot name, like a mono camera. Setting `stereo: true` by hand turns off detection and uses `eyes` instead. The default `both` records `X_left` and `X_right`. `left` or `right` records one eye under the slot name `X`. To force a single-eye wrist camera, pass `eyes: left` too. To stream both eyes to the headset for depth while recording only one, set `eyes` and `stream_eyes` separately: ```bash theme={null} axol collect-data --repo_id myorg/pick-place --task "Pick the red cube" \ --robot_config.cameras "{overhead: {serial: 41234567, eyes: left, stream_eyes: both}}" ``` ## Headset camera views During collection the camera feeds also stream to the headset, as in teleop. The operator sees the overhead and both wrist views at once and can move and resize them. See the [VR Interface guide](/guides/vr-interface#camera-views). Each camera is captured once and feeds two outputs: * The headset gets full resolution at 30 fps. * The dataset gets `--fps`, scaled down to `--dataset_resolution`. If the installed GStreamer camera plugin doesn't support exposure timestamps, collection opens the cameras through the ZED SDK instead. The video runs in a separate process, so it doesn't slow the control loop. ## VR controller controls Axol and Quest-source Mantis episodes are driven from the Quest controllers. The session is locked to **data collection** mode. For the full controller layout and step-by-step flow, see the [Data Collection guide](/operations/data-collection#quest-controller-layout). | Button | Action | | - | - | | **A** | Start a take after a 3-second countdown. While recording, press **A** to ask **Save episode?**, then **A** again to save or **X** to keep recording. The headset shows `Saving` until the write completes. | | **X** | During the countdown, cancel it. Otherwise, reset the arms to the rest pose, including from a contact hold. While recording, press **X** to ask **Discard episode?**, then **X** again to discard or **A** to keep recording. | With a Lighthouse Mantis source, the rig triggers control the takes: * **Start:** squeeze both triggers together and release them. The rigs engage at their current pose and recording starts. * **Save:** while recording, fully squeeze and release either trigger three times quickly. The saved take ends where the first squeeze began, so the clicks aren't recorded. * **Discard:** squeeze four times quickly. A triple press waits a moment in case a fourth press follows. A triple press while idle is ignored. Quest Mantis uses **A** instead. The side button on either rig is a one-handed alternative. A short press starts a take, or saves it while recording. Hold it for 1 second to discard the take. When you launch collection from the [control panel](/guides/control-panel#episode-controls), it also shows buttons to start, save and discard a take and to end a contact hold. You can run a session with the headset off. The controllers stay live, and whichever input arrives first ends the take. ## After each episode On Axol, the arms return to the rest pose after each episode. A torque watchdog guards the move: * If a joint pushes against something, such as a gripper caught on the scene or a person holding an arm, the move stops. The arms go limp in a gravity-compensation hold so you can guide them clear. The episode keeps saving in the background. * Press **X** when the arms are clear. They return to rest from where they are. * You can't start recording while the arms are limp. Reset first. With `--teleop_config.vr_teleop_config.teleop_torque_threshold` set, the watchdog also guards the arms while you drive them. A stop mid-take discards the episode and drops the arms limp. Press **X** to return to rest and record again. Mantis has no arms to return. It turns off both gripper motors between takes, and you must engage the rigs again before the next recording. ## Recording with Mantis `--mantis true` records with the Mantis rigs: tracked devices mounted on grippers, plus head and wrist cameras. * The grippers use the Mantis CAN channels saved in **Mantis settings** (default `can_mantis_l` and `can_mantis_r`). * The head stereo camera uses the `overhead` slot and can record both eyes along with both wrists. * At startup both grippers open fully once to calibrate, then release. * The gripper motors are off between takes. Starting a recording turns them on, and every save, discard, stop or error turns them off again. * Engage at the agreed start pose. That fixes the robot base for the session. Rows use the Cartesian end-effector schema. * Each row's pose, gripper position and grip command are matched to the tracker's capture time. The pose source works like this: * **Quest** waits for the headset's WebXR session and uses **A** for episode control. * **Lighthouse** starts and stops its tracker reader automatically, from the CLI and the control panel. Don't launch a second `tracker.bridge`. * Recording can't start until the tracker sends two fresh poses and the triggers report in. ## Starting and stopping **Starting needs the arms near zero.** On Axol, collect-data refuses to start while `shoulder_1`, `shoulder_2` or `elbow` is more than 25° from zero, the arms' natural resting pose. It names each joint that is out. Move them back by hand, for example under [`axol gravity-comp`](/cli/gravity-comp), and start again. The first move then goes through zero on its way to the rest pose. See [Starting needs the arms near zero](/operations/teleop). **Stopping parks the arms.** When you end a session with `Ctrl+C` or **Stop** in the control panel: 1. The arms return to the rest pose. 2. With `--teleop_config.vr_teleop_config.park_to_zero` (the default), they continue to the all-zero pose, hanging straight down, holding their grasp. 3. The motors turn off. The return to rest has 6 s and the move to zero has 10 s. If a move runs out of time or hits something, the motors turn off where the arms are. A second `Ctrl+C` stops the park, and the motors still turn off. Set `park_to_zero` to `false` to stop at the rest pose. The park is skipped on Mantis, when a contact hold has left the arms limp, when the IK process has stopped, or when the CAN bus has stopped reporting positions. ## Saving and resuming Each episode is written to disk completely as soon as it saves. If the process is killed, you lose at most the episode being recorded, and `Ctrl+C` stops quickly. On the Jetson, an episode is discarded rather than saved if its camera timestamps are missing, frames are dropped, or the cameras and arm state are too far out of step. If a dataset already exists at `--root`, collection resumes it. On resume, collect-data checks that the saved episodes are complete and numbered without gaps. If an earlier session was killed while saving: * It cuts the dataset back to the last complete episode. * It deletes the leftover files and logs what it removed. * It resumes recording after the last complete episode. If no complete episode survives, it refuses to start and asks you to delete the dataset. If a session ends before any episode is saved, the empty dataset folder is removed. # Command configuration Source: https://docs.almond.bot/cli/configuration Set any field of the robot operation commands from flags, a config file or the shared settings file. Nine commands expose their **entire configuration** through [draccus](https://github.com/dlwh/draccus): [`teleop`](/cli/teleop), [`gravity-comp`](/cli/gravity-comp), [`waypoints`](/cli/waypoints), [`jog`](/cli/jog), [`collect-data`](/cli/collect-data), [`collect-dagger`](/cli/collect-dagger), [`replay-dataset`](/cli/replay-dataset), [`run-policy`](/cli/run-policy) and [`inference-server`](/cli/inference-server). You can set every field of their config from the command line or load the whole config from a file. This page covers the **syntax**. Each operation mode has a **Config Parameters** page listing every field with its default: [Teleoperation](/operations/teleop-config), [Gravity Compensation](/operations/gravity-comp-config), [Data Collection](/operations/data-collection-config), [Replay Dataset](/operations/replay-dataset-config), [Run Policy](/operations/run-policy-config), and [DAgger Collection](/operations/dagger-config). `waypoints`, `jog` and `inference-server` list their flags on their own CLI pages. The other commands (`can.*`, `motor.*`, `zed.*`, `gst.*`, `jetson.setup`, `provision`, `tune.*` and `serve`) use plain flags, and nothing on this page applies to them. ## Three ways to set any field > [card] Dotted CLI overrides > > Override any nested field with `--dotted.path VALUE`, e.g. `--axol.left.elbow.kp 60`. > [card] Whole-config file > > Load a complete JSON/YAML config with `--config_path run.json`, then layer CLI overrides on top. > [card] [Shared settings file](/guides/control-panel-settings) > > Save a value once in the control panel (`~/.almond/settings.json`), and the panel, the CLI and the SDK all use it by default. ### The shared settings file The robot has **one** settings file, `~/.almond/settings.json` (`$ALMOND_HOME/settings.json`), edited by the [control panel](/guides/control-panel#settings). Every command on this page and the [SDK constructors](/api/robot#shared-settings) read it **by default**. A value you save once, such as arm stiffness, a joint gain, a gripper limit or a CAN adapter, applies the same way from the browser, the terminal or Python. The file uses the **same field names as a `--config_path` file**. Its `axol`, `teleop`, `kinematics`, `jelly` and `vr_server` sections match the config sections of the same name. A few more sections hold operation settings, such as `robot` for the CAN channels, `gravity`, `recording` and `inference`. Each command reads the sections it uses. See the [Settings File](/guides/control-panel-settings) page for the layout. ```json theme={null} { "version": 2, "axol": { "left_stiffness": 0.8, "left": { "elbow": { "kp": 60 } } }, "teleop": { "frequency": 240 }, "robot": { "left_channel": "can0", "right_channel": "null" } } ``` Two flags control it on every draccus command: | Flag | Effect | | - | - | | `--settings_path PATH` | Read another settings file (the same file the control panel's **Export** writes) instead of `~/.almond/settings.json`. | | `--no_settings` | Ignore the settings file; run the built-in (calibrated) defaults plus whatever you pass explicitly. | ```bash theme={null} axol teleop # panel settings apply axol gravity-comp --kd 1.0 # panel settings, kd overridden axol teleop --settings_path bench.json # a different robot's settings axol teleop --no_settings --axol.left_stiffness 0.8 # built-in defaults only ``` If `~/.almond/settings.json` is missing, the command uses the built-in defaults. If the file exists but can't be read, the command refuses to start. That covers corrupt JSON, a permission problem or a symlink in its path. Fix the file, or pass `--no_settings` to run without it. The SDK constructors (`Axol()`, `Mantis()`, `Jelly()`, `VRTeleop()`) raise an error in the same case. Only `axol serve` starts with an unreadable file, so you can repair it from the control panel. ### Dotted overrides Each command has a config dataclass. For example, `TeleopCmdConfig` contains the full [`AxolConfig`](/api/robot). Reach nested fields with dots: ```bash theme={null} axol teleop --axol.left_stiffness 0.8 axol teleop --axol.left.elbow.kp 60 --axol.right.gripper.torque_limit 0.7 axol teleop --axol.has_gripper false # gripperless SKU axol collect-data --repo_id myorg/pick --task "pick" \ --robot_config.axol_config.left_stiffness 0.8 \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" ``` Any field you don't override keeps its default. Overriding `--axol.left.elbow.kp` leaves every other per-joint gain at its tuned default. ### Config files ```bash theme={null} axol teleop --config_path my_teleop.json axol run-policy --config_path rollout.yaml --device cpu # file, then override ``` Values are applied in this order, and later ones win: 1. Built-in defaults 2. The shared settings file 3. The `--config_path` file 4. CLI flags Operations launched from the [control panel](/guides/control-panel#settings) use the same order. A CLI run and a panel run agree on every value that neither overrides. ### Same knob, different path Each command places the shared configs at a different dotted path. Arm stiffness is `axol.left_stiffness` on `teleop` but `robot_config.axol_config.left_stiffness` on `collect-data`. Each mode's Config Parameters page uses the right prefix for that command. > [!NOTE] > > On a calibrated robot the defaults include that robot's measurements. They are applied in this order, and later ones win: > > 1. The built-in values. > 2. The factory calibration downloaded by [`calibration.pull`](/cli/tune-factory#calibration-pull), in `~/.almond/factory_calibration.json`. > 3. Gains, friction, masses and centres of mass saved on this computer by [`tune.pid --save`](/cli/tune-pid), [`tune.friction --save`](/cli/tune-friction) or [`tune.gravity --save`](/cli/tune-gravity), in `~/.almond/calibration.json`. > > Config files and CLI flags still override them like any other default. ## Field-name conventions | Convention | Form | Example | | - | - | - | | Field names use **underscores**, not dashes | `--field_name` | `--log_level DEBUG`, `--teleop_hz 120` | | Nested fields are **dot-separated** | `--a.b.c` | `--axol.left.gripper.torque_limit 0.7` | | `None` is written `null` | `--field null` | `--left_channel null` (disable the left arm) | | Lists use bracket syntax | `[a,b,c]` | `--free_joints [SHOULDER_1,WRIST_3]` | | Dict fields take **one inline YAML/JSON value**. Dotted paths can't reach inside a dict. | `--field "{k: v}"` | `--cameras "{overhead: 41234567}"` (teleop), `--robot_config.cameras "{overhead: {serial: 41234567}}"` (collect-data, run-policy) | | Booleans take an explicit value | `--flag true` | `--push_to_hub true` | | Shared settings selectors (every draccus command) | `--settings_path PATH`, `--no_settings` | `--no_settings` (built-in defaults only) | > [!NOTE] > > Booleans need a value: `--push_to_hub true`, not a bare `--push_to_hub`. The one exception is `teleop`'s `--sim`, where a bare `--sim` works as well as `--sim true`. ## Validation Choice fields such as `--log_level`, `--policy_type` and `--aggregate_fn` are checked against their allowed values. A missing required field or a wrong type gives a usage error, not a traceback. `axol --help` lists only the **common** fields: top-level options, stiffness and gripper limits. The nested per-joint gains are hidden, but you can still set them with their dotted paths, such as `--axol.left.elbow.kp`. Each mode's Config Parameters page, such as [Teleoperation](/operations/teleop-config), lists every field. # diag.lift-cycle Source: https://docs.almond.bot/cli/diag-lift-cycle Raise the arms for clearance, then cycle Jelly's telescoping lift down and up. Tests Jelly's telescoping lift with Axol mounted. The command: 1. Enables the seven arm joints on each selected side and moves both `shoulder_1` joints to the 90° clearance pose. 2. Runs the number of full **down, then up** cycles you ask for, while the arms hold the clearance pose. 3. Checks that the lift is fully up and stopped. 4. Moves `shoulder_1` back to 0° while the other arm joints hold where they are, checks the arm pose and lift state, then disables the arm joints. It doesn't return the whole arm to its rest pose. It never enables, calibrates, moves or disables the grippers. The arms run on the same controller as [`teleop`](/cli/teleop). ```bash theme={null} axol diag.lift-cycle --cycles 3 axol diag.lift-cycle --cycles 5 --lift-channel can0 axol diag.lift-cycle --cycles 2 --speed 300 axol diag.lift-cycle --cycles 1 --no-right --left-channel can0 ``` | Flag | Description | | - | - | | `--cycles N` | Number of down-and-up cycles. In a terminal, leave it out and the command asks. | | `--speed N` | Lift speed limit in encoder counts/s: `0` for full speed, or 250 to 65535. Lower values are rejected so each move finishes within the lift's 60-second safety timeout. | | `--lift-channel IFACE` | Lift CAN interface. Default: the chest bus `can_alm_axol_c` if it exists, otherwise the wheel bus `can_alm_axol_b`, as set up by [`can.setup`](/cli/can-setup). | | `--left-channel IFACE` / `--right-channel IFACE` | Arm CAN interfaces | | `--no-left` / `--no-right` | Leave out one arm, when only one is installed or connected. At least one arm is required to reach the clearance pose. | The wheel motors don't need power. The command opens only the selected arm buses and the lift's bus, and never moves the wheels. > [!NOTE] > > The lift must be homed first. Run [`axol lift.home`](/cli/lift-home). Both commands find the lift's bus the same way. > [!NOTE] > > Install Jelly Legs firmware v0.8 or newer before cycling. Any failed check stops the sequence: > > * When the first move starts, the command stops if an older firmware is running. > * While the lift moves, it checks that `shoulder_1` stays clear and the other arm joints hold. > * During the final `shoulder_1` return, it checks that the lift is still homed, stopped and fully up. > [!WARNING] > > Clear people and objects from the arms, lift columns and Jelly before you start. The command moves the arms and drives the lift through its full range. > > Press Ctrl-C, or **Stop** in the diagnostics dashboard, to stop the lift right away. If anything fails, the arms stay enabled at their last pose. Check the lift and arms before you move them again. You can also run this from the control panel's [diagnostics dashboard](/guides/diagnostics-dashboard) under **Diagnostics → Lift cycle**, where the number of cycles is a required field. # diag.offline Source: https://docs.almond.bot/cli/diag-offline Analyze a teleop recording offline to find whether jitter comes from wifi, filtering or IK. Analyzes a teleop recording (`axol teleop --teleop.record PREFIX`) offline, with no hardware. Each suite checks one stage of the teleop pipeline, so you can tell where jitter comes from. | Suite | Question | What it reports | | - | - | - | | `wifi` | Is the network connection jittery? | Time between VR frames (median, p95, p99, max), gaps over 100 ms, and bursts of frames. Gaps with steady IK timing point at the network, and with uneven IK timing at a busy computer. | | `filtering` | What do the pose filters let through? | 3–15 Hz motion at each stage, from raw VR pose to the end-effector target, with the share passed through and the delay each stage adds. If a lot reaches the target, tune the filters, not the motors. | | `kinematics` | Does IK add motion the hand didn't make? | Target versus achieved end-effector pose, solve time per tick, per-joint drift (°/min) without end-effector motion, and per-joint jitter with its main frequency. | | Flag | Description | | - | - | | `suite` | `wifi`, `filtering` or `kinematics` (required) | | `prefix` | Recording prefix used with `--teleop.record`, looked up in `~/.almond/recordings/` (default: the newest recording there) | | `--save-run` | Save the analysis under `~/.almond/diagnostics/tuning/` for the diagnostics dashboard | | `--label TEXT` | Note stored on the saved run | ```bash theme={null} axol teleop --teleop.record rec1 # record a session first axol diag.offline wifi rec1 axol diag.offline filtering rec1 --save-run axol diag.offline kinematics --save-run # newest recording ``` The `kinematics` suite feeds the dashboard's **IK** tuning tab: target versus achieved pose charts, the solve-time trace and the per-joint drift scores. See also [`diag.teleop-jitter`](/cli/diag-teleop-jitter), which breaks one recording down by stage and frequency band, and [`tune.motion`](/cli/tune-motion), which runs the tests on the robot. # diag.rom-disable Source: https://docs.almond.bot/cli/diag-rom-disable Open the grippers left clamped by the range-of-motion test and power down. Releases the items gripped by [`diag.rom-enable`](/cli/diag-rom-enable) and disables the robot. The command connects to the motors without recalibrating them, because a normal enable would open the grippers at once and drop the items. It opens one gripper at a time so you can catch each item, then disables all motors. The arms don't move. They hold the pose the test left them in until the final disable. After a Mantis gripper test, pass `--target mantis`. The command then addresses only ID 8 on each selected Mantis bus. ```bash theme={null} axol diag.rom-disable axol diag.rom-disable --web-prompts # dashboard-driven "Continue" before each gripper opens axol diag.rom-disable --no-right --left-channel can0 # one arm on a non-hub CAN adapter axol diag.rom-disable --target mantis # both Mantis grippers ``` | Flag | Description | | - | - | | `--target axol\|mantis` | Pass the same target the `diag.rom-enable` run used | | `--no-left` / `--no-right` | Leave out one arm | | `--left-channel IFACE` / `--right-channel IFACE` | CAN interface for each side (default: set by `--target`). Pass the same channels the `diag.rom-enable` run used. | | `--web-prompts` | Show a **Continue** button in the dashboard before each gripper opens, instead of a terminal prompt. The dashboard sets this for you. | # diag.rom-enable Source: https://docs.almond.bot/cli/diag-rom-enable Run a two-hour range-of-motion soak test that sweeps every joint. Enables the motors, moves to home, then sweeps every joint through its range of motion for two hours. `wrist_2` and `wrist_3` stop 5° short of each limit, so their motors are never driven into the ends of travel. Every other joint sweeps to its full limit. On a full-robot run, the command first asks you to clamp each gripper onto an item, and the grippers hold it for the whole test. When the test finishes, or when you press Ctrl-C, the robot returns home with the item still gripped and the motors still enabled. Run [`diag.rom-disable`](/cli/diag-rom-disable) afterwards to release the item and power down. The arms run on the same controller as [`teleop`](/cli/teleop), so the test exercises the controller Axol ships with. Joint positions and torques are saved to a CSV under `~/.almond/diagnostics/captures` five times a second. You can chart the run in the [diagnostics dashboard](/guides/diagnostics-dashboard)'s run history. With `--target mantis`, the test cycles only the two Mantis grippers, ID 8 on `can_mantis_l` and `can_mantis_r`. The arm-joint and grip steps don't apply. ```bash theme={null} axol diag.rom-enable axol diag.rom-enable --no-right # left arm only axol diag.rom-enable --joints wrist_1,wrist_2,wrist_3 # sweep only these joints axol diag.rom-enable --web-prompts # dashboard-driven prompts axol diag.rom-enable --no-capture # skip the telemetry CSV axol diag.rom-enable --payload-kg 3 # each gripper holds a 3 kg item axol diag.rom-enable --no-right --left-channel can0 # one arm on a non-hub CAN adapter axol diag.rom-enable --target mantis # both Mantis grippers ``` | Flag | Description | | - | - | | `--joints LIST` | Comma-separated joints to sweep. Every other joint holds home. | | `--payload-kg KG` | Mass of the item each gripper holds (default: 2). See below. | | `--target axol\|mantis` | What to test (default: `axol`) | | `--no-left` / `--no-right` | Leave out one arm | | `--left-channel IFACE` / `--right-channel IFACE` | CAN interface for each side (default: set by `--target`). With a single-channel adapter, combine an override with `--no-left` or `--no-right`. | | `--web-prompts` | Show each hands-on gripper step as a **Continue** button in the dashboard instead of a terminal prompt. The dashboard sets this for you. | | `--no-capture` | Don't save the telemetry CSV | ## Testing part of an arm With `--joints`, the command first checks which motors answer on each bus. * Every selected joint must answer, or the run fails and names the missing joint. * A joint you didn't select that doesn't answer is treated as absent and left out. This lets a partly built arm on the bench run, for example `--joints wrist_2,wrist_3,gripper`. * Every motor that answers is enabled and held, and the skipped joints are printed at the start. Make sure they really aren't attached, because an unpowered motor looks the same as a missing one. A full-robot run still needs every motor. A run with `--joints` skips the grip step. If the gripper is selected, it opens and closes with nothing in it. When arm joints are missing, the arm isn't on the robot, so the command drives it with soft gains and turns off gravity, friction, inertia and host damping. These are all set up for a full arm mounted on the robot, and the normal gains vibrate on a wrist clamped to a bench. The command prints `Partial arm — bench gains` when this applies. A fully built arm with only some joints selected keeps the normal gains, and so does a mounted arm whose gripper doesn't answer. ## Payload On a full-robot run, `--payload-kg` is the mass of the item each gripper holds. It is added to the gravity model as each gripper closes, so the arms carry the item without sagging. An item heavier than the setting makes the shoulders sag and buzz when the arm is held out. Set it to the item's real mass, or `0` for none. The dashboard shows it as **Payload kg per gripper**. Runs with `--joints` hold no item and ignore it. # diag.teleop-jitter Source: https://docs.almond.bot/cli/diag-teleop-jitter Find which stage of the teleop pipeline adds jitter, from a teleop recording. Analyzes a teleop recording and shows where in the pipeline jitter enters. First record a session by passing `--teleop.record` with a file prefix. Recording has almost no cost, and nothing is recorded without the flag. ```bash theme={null} axol teleop --teleop.record /tmp/jit # engage, reproduce the jitter, then disengage to write the files axol diag.teleop-jitter /tmp/jit ``` The recording is four time-aligned files: `_ik`, `_cmd`, `_meas` and `_rt`. Together they cover every stage, from the raw VR pose through the filters, the IK output and the smoothed target, to the motor command and the measured joints. The recording holds the most recent engaged stretch. It starts when you engage, and engaging again starts a new one. The analyzer uses the longest engaged stretch in the files. ## Reading the output The analyzer splits every signal into three frequency bands: | Band | Meaning | | - | - | | Below 3 Hz | Intentional motion | | 3–15 Hz | The **JITTER** column: the band the arm's structure responds to | | Above 15 Hz | Noise the mechanics filter out | It prints a table for each stage, and splits the motor torque into its parts. Walk each joint down its stages and find the first stage where the JITTER column jumps well above the stage before it: | Jump at | Points to | | - | - | | `raw -> filt` | VR tracking noise or the pose filter | | `filt -> ik_q` | The IK solver, for example joints drifting without moving the hand | | `tgt -> ema -> out` | The smoothing stages | | `out -> meas` | The arm ringing: a control or damping problem | | Flag | Description | | - | - | | `prefix` | The `--teleop.record` prefix used for the recording | | `--joints NAME ...` | Show only these joints | | `--full` | Analyze the whole recording, not only the longest engaged stretch | ```bash theme={null} axol diag.teleop-jitter /tmp/jit --joints elbow wrist_2 # restrict the tables axol diag.teleop-jitter /tmp/jit --full # ignore engage gating ``` # diag.zed-cable Source: https://docs.almond.bot/cli/diag-zed-cable Check a ZED camera cable by capturing and checking frames. Checks a ZED camera's GMSL cable end to end. The command restarts the ZED X service, opens the camera and captures frames for 5 seconds. It checks that: * each frame has the right resolution, real image detail and normal brightness * frames keep arriving, without long pauses or repeated frames It exits with an error on any failure. Dropped, garbled or frozen frames point at a bad cable. Run it with exactly one ZED camera connected, either a ZED X One (mono) or a ZED X (stereo). The command detects which one. Pass `--kind mono` or `--kind stereo` to choose. It doesn't touch the arms, so you can run it while the diagnostics dashboard shows live motor data. ```bash theme={null} axol diag.zed-cable axol diag.zed-cable --kind stereo # force the stereo (ZED X) pipeline axol diag.zed-cable --output logs/cable_frame.png # also save the last frame as PNG ``` You can also run it from the [diagnostics dashboard](/guides/diagnostics-dashboard). # gravity-comp Source: https://docs.almond.bot/cli/gravity-comp Hold both arms in gravity-compensation mode so you can move them by hand. Holds both arms in gravity-compensation mode so you can move them by hand. * Each *free* joint has no position stiffness, light damping (`--kd`) and a torque that cancels the modelled gravity. * Joints not in the free set hold their current position with their configured `kp` and `kd`, and are still gravity-compensated. * The grippers hold their current positions softly. This command is configured through draccus (see [Command configuration](/cli/configuration)). The per-joint gains, masses and stiffness are on the nested `axol` config, such as `--axol.left_stiffness` or `--axol.left.elbow.mass`. They are listed in full in [Gravity Compensation Config Parameters](/operations/gravity-comp-config). | Flag | Description | | - | - | | `--left_channel ` / `--right_channel ` | CAN channel per arm; `null` disables that arm. | | `--free_joints [J1,J2,...]` | Joints to leave free, e.g. `[WRIST_3]` or `[SHOULDER_1,ELBOW]`. The other arm joints hold in place. Default `null`: all 7 joints free. | | `--record PREFIX` | Record the arm joint positions and torques to `PREFIX_gc.npz`, to build a reference motion with [`motion.build`](/cli/motion-build). Unset records nothing. | | `--kd FLOAT` | Damping on free joints (Nm·s/rad). Higher feels less floppy and slows any slow drift. Default 0.5 | | `--rate_hz FLOAT` | Control loop rate in Hz (default: 250) | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | ```bash theme={null} axol gravity-comp # all 7 joints free, both arms axol gravity-comp --right_channel null # left arm only, all joints free axol gravity-comp --kd 1.0 # heavier damping axol gravity-comp --free_joints [WRIST_3] # only WRIST_3 free; everything else held rigid axol gravity-comp --right_channel null --free_joints [SHOULDER_1,WRIST_3] # one-arm, two-joint isolation axol gravity-comp --record demo1 # hand-guide a motion, then: axol motion.build ``` Use `--free_joints` to test gravity compensation one joint at a time. Only the named joints move freely, and the rest of the arm holds its pose. With `--record`, a bare name is saved in `~/.almond/recordings/`. The file keeps the last 5 minutes or so and is written when the session ends. > [!TIP] > > If the arm sags or pushes back, tune the per-joint `mass` and `com` fields on `AxolConfig`. See [Gravity compensation](/api/robot#gravity-compensation). # gst.build-zed Source: https://docs.almond.bot/cli/gst-build-zed Build the patched ZED GStreamer camera plugins on a Jetson. Builds and installs Almond's patched version of the Stereolabs ZED GStreamer plugins (`zedxonesrc` for mono cameras, `zedsrc` for stereo). The fast camera pipeline for [`teleop --cameras`](/cli/teleop) and [`collect-data`](/cli/collect-data) uses them. [`gst.install`](/cli/gst-install) installs GStreamer itself, and this command adds the ZED camera plugins. ```bash theme={null} axol gst.build-zed ``` The [one-command install](/installation) and [`axol provision`](/cli/provision) run it for you, right after [`gst.install`](/cli/gst-install). It is safe to run again. It skips the build when the installed plugins are already current. ## Why the patched plugins * **A fresh Jetson has no ZED GStreamer plugins.** Without them, Axol falls back to the slower ZED SDK camera path. * **Accurate timestamps.** The stock plugins stamp each frame when the computer receives it, which is later than when the sensor captured it. The patched plugins use the capture time, so each recorded image lines up with the joint positions from the same moment. This matches what policies see at inference time. * **Newer JetPack.** The patched plugins also build `zedxonesrc` on JetPack 7 (L4T newer than 36), where the stock build leaves it out. ## Requirements * An NVIDIA Jetson * The ZED SDK at `/usr/local/zed` * Root, to install packages and the plugins. Run as root, or it asks for your `sudo` password once. `gst.build-zed` installs the compiler and other packages it needs before it builds. On a computer that isn't a Jetson, or that has no ZED SDK, it skips the build and Axol uses the ZED SDK camera path. If the installed plugins are later replaced or overridden, Axol falls back to the ZED SDK camera path until you run `gst.build-zed` again. ## After a ZED SDK upgrade The plugins are built against a specific ZED SDK version. After you install a new SDK, GStreamer still lists the plugins but can't load them (`undefined symbol: _ZN2sl9CameraOne8isOpenedEv…`). Teleop and `collect-data` log a warning that names this command, and use the ZED SDK camera path instead. To restore the fast path, run `axol gst.build-zed` or [`axol provision`](/cli/provision). Both detect the new SDK and rebuild. Also run [`zed.install`](/cli/zed-install), so `pyzed` matches the new SDK. # gst.install Source: https://docs.almond.bot/cli/gst-install Install GStreamer and PyGObject for the ZED camera pipeline on a Jetson. Installs GStreamer and **PyGObject**, which the ZED camera pipeline for [`teleop --cameras`](/cli/teleop) and [`collect-data`](/cli/collect-data) needs. That pipeline captures and encodes the cameras on the Jetson's GPU and hardware video encoder. ```bash theme={null} axol gst.install ``` The [one-command install](/installation) and [`axol provision`](/cli/provision) run it for you. The ZED camera plugins themselves come from [`gst.build-zed`](/cli/gst-build-zed), which runs right after this command. ## What it does 1. Installs the GStreamer packages with `apt`: `gstreamer1.0-tools`, `gstreamer1.0-plugins-base`, `gstreamer1.0-plugins-bad`, `gir1.2-gstreamer-1.0`, `gir1.2-gst-plugins-base-1.0`, `libgirepository1.0-dev`, `gobject-introspection`, `libcairo2-dev` and `pkg-config`. 2. Builds **PyGObject** (`pygobject>=3.50,<3.52`) into the `axol` environment. PyGObject has to be built against the system libraries, so it can't be a normal dependency. 3. Checks that PyGObject imports and that the GStreamer elements Axol needs are present, including the Jetson's hardware encoder (`nvvidconv`, `nvv4l2h264enc`). It fails if any are missing. The hardware encoder elements ship with the Jetson system image and can't be installed with `apt`. On a first install, the ZED camera plugins are reported as missing in an informational note, because `gst.build-zed` hasn't run yet. Video to the headset still uses **aiortc**, a normal Python dependency. This command doesn't install GStreamer's WebRTC support. > [!NOTE] > > `gst.install` runs only on a Jetson. It skips computers without `apt-get` and computers where everything is already installed. On other computers, and on a Jetson where this setup isn't available, Axol uses the ZED SDK camera path, which has higher latency. > [!NOTE] > > Rebuilding the `axol` environment, such as during a release upgrade, removes PyGObject. Run `axol provision` afterward to put it back. # hub.flash Source: https://docs.almond.bot/cli/hub-flash Install the bundled firmware on the Axol Hub and Mantis Hub. Installs the firmware that ships with `axol` (`almond_axol/hub/axol_hub.uf2`) on the Axol Hub or the Mantis Hub. Both hubs are the same board and run the same firmware. The hub restarts into its bootloader, takes the new image and comes back as a CAN adapter. Both of its buses go quiet for a few seconds while it restarts. Flashing needs root. Run the command as your normal user: it finds the hubs and asks its questions first, then asks for your `sudo` password. | Flag | Description | | - | - | | `--port PORT` | USB port of the hub to flash, such as `1-3`, as printed by [`hub.info`](/cli/hub-info). Also flashes a hub in its bootloader without asking. Default: every outdated hub, plus any bootloader you confirm at the prompt | | `--force` | Flash even when the hub already runs the bundled version | ```bash theme={null} axol hub.flash axol hub.flash --port 1-3 axol hub.flash --force ``` > [!NOTE] > > You rarely need this command for the Axol Hub. Every operation that connects the arms, such as teleop, data collection, policy runs and control panel operations, checks the hub's firmware and updates an outdated hub before it opens a bus. If the update can't get root, the operation runs on the old firmware and logs an error that names `axol hub.flash`. Set `AXOL_HUB_FLASH=0` to turn off the automatic update. > > The Mantis Hub is not updated automatically. Plug it in and run `axol hub.flash`. > [!WARNING] > > If `hub.flash` says the hub's firmware is too old to update over USB, flash it once by hand: > > 1. Unplug the hub. > 2. Flip the **BOOTSEL** switch next to the hub's USB port. > 3. Plug the hub back in. It starts in its bootloader. > 4. Run `axol hub.flash`. It reports that the hub restarted into its bootloader. > 5. Flip the **BOOTSEL** switch back, then unplug the hub and plug it back in. The hub starts the new firmware. > > The hub reads the switch only when it powers on, so replug the hub after each flip. After this manual flash, updates are automatic. > > The same steps recover a hub whose LED is on but that never shows a CAN interface in `ip link show`. If a flash was interrupted and the hub is stuck in its bootloader, arm bring-up fails. Run `hub.flash` again to recover it. A bootloader doesn't identify itself, so it could belong to any RP2350 board. `hub.flash` asks before it flashes one. Without a terminal it prints the `--port` command instead. Pass `--port` to flash it without asking. The hub firmware drops queued motor commands when a bus stops responding. A command sent right before an emergency stop can't reach the motors when power returns. The firmware also reports when nothing on a bus acknowledges frames, which is how Axol detects that motor power was cut. See [`can.setup`](/cli/can-setup#recovery-after-an-emergency-stop). # hub.info Source: https://docs.almond.bot/cli/hub-info Show the firmware version and last reset of the Axol Hub and Mantis Hub. Lists every Axol Hub and Mantis Hub on USB. For each hub it prints: * the USB serial number and port, such as `1-3`, which [`hub.flash --port`](/cli/hub-flash) takes * the firmware version, and whether it is **current** or **outdated** compared with the firmware that ships with `axol` * with `sudo`, the last reset cause (power-on, brown-out, watchdog) and the uptime ```bash theme={null} axol hub.info sudo axol hub.info ``` The reset cause tells you whether the hub restarted when an arm bus dropped out. It needs hub firmware 1.00 or newer. On older firmware it prints `last reset unavailable`. `hub.info` finds hubs on USB, so it also lists a hub whose CAN interfaces never came up. A hub in its bootloader is listed with the `hub.flash --port` command that recovers it. If no running hub is attached, it prints `No Axol hub found on USB.` and exits with an error. If the hub's LED is on but it isn't listed, it may have no working firmware. Follow the manual flash steps in [`axol hub.flash`](/cli/hub-flash). They use the **BOOTSEL** switch next to the hub's USB port. # ik.warm Source: https://docs.almond.bot/cli/ik-warm Precompile this robot's IK so the next session starts without waiting for it. The first time the IK solver runs for a robot model, or after an update changes it, the solver is compiled. That takes about a minute on a Jetson, while teleop or data collection waits to become ready. Later starts reuse the compiled solver, saved under `~/.almond/jax-cache/exports`, and take about 5 s on a Jetson. `ik.warm` does that first start ahead of time. It sets up the IK solver the same way a session on this robot would: * **The robot model:** `kinematics.robot_model` if you set one. Otherwise Axol on Jelly when Jelly is attached and on, or else the mount saved on the **Robot** settings tab. * **The gripper:** the fitted gripper, for the parcel model on Jelly. * **The rest:** the shared IK settings. It then runs the solver's startup, including planning the move to the rest pose. Nothing moves and no hardware is opened. ```bash theme={null} axol ik.warm ``` It runs automatically as one of the last steps of [`provision`](/cli/provision), which every install and update runs, so a robot comes back from an update ready to go. Run it by hand after pulling a development checkout, or after changing the robot model, to take the compile out of the next session's start. A model picked only for a sim run still compiles on its first use. Set `ALMOND_IK_EXPORTS=0` to rebuild the solver on every start instead of reusing the saved one. # inference-server Source: https://docs.almond.bot/cli/inference-server Serve policy inference on a separate, more powerful machine for run-policy. Runs LeRobot's async-inference policy server, so [`run-policy`](/cli/run-policy) can run inference on a more powerful machine on the robot's network, such as a desktop with a GPU. The robot sends joint positions and camera frames to it over gRPC and gets actions back. `run-policy` chooses the policy (`--policy_path`, `--policy_type` and `--device`), not the server. One server can serve different policies across sessions without a restart. The server loads the policy, so the path must be reachable from the server, such as a HuggingFace Hub repo ID or a local path on the server machine. > [!WARNING] > > Use this server only on a trusted network. The connection has no encryption or authentication: > > * Any client that can reach the port can make the server download and load a policy. > * Another machine on the network can pose as the server and send the robot any actions. > > Put the inference machine and the robot on an isolated network or a VPN. Firewall the port so only the robot can connect, and never expose it on shared Wi-Fi or the internet. Load only policy checkpoints you trust. ```bash theme={null} axol inference-server # listen on 0.0.0.0:8765 axol inference-server --host 192.168.1.99 # explicit LAN interface axol inference-server --host 192.168.1.99 --port 9000 ``` Then, on the robot: ```bash theme={null} axol run-policy --server_host --policy_path myorg/pick-place-policy \ --policy_type act --task "Pick the red cube" ... ``` | Flag | Description | | - | - | | `--host HOST` | Interface to listen on. Default `0.0.0.0`, the whole network. Use `127.0.0.1` for this machine only. | | `--port INT` | gRPC port (default: 8765). Must match `run-policy`'s `--server_port`. | | `--fps INT` | Action rate (default: 30). Must match `run-policy`'s `--fps`. | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. See [Command configuration](/cli/configuration). | > [!NOTE] > > Requires the `lerobot` extra, and a CUDA build of PyTorch on the server for GPU inference. Without `--server_host`, `run-policy` starts a policy server on the robot. You need this command only when inference runs on another machine. # jetson.setup Source: https://docs.almond.bot/cli/jetson-setup Set the Jetson power mode, clocks and scheduling that Axol's control and camera loops need. Sets up a Jetson for Axol's real-time control and camera loops. These settings reset at every reboot. You don't need to run it yourself. [`axol provision`](/cli/provision) applies it as its last step. The [one-command install](/installation)'s `axol.service` applies it at every boot with `axol provision --boot`. `axol jetson.setup` is another name for `axol provision --boot`. ```bash theme={null} axol jetson.setup ``` It needs root. Run it as root, or it asks for your `sudo` password once. If it can't get root, it logs the manual command and continues. On a computer that isn't a Jetson it does nothing. ## What it sets | Setting | Why | | - | - | | **Power mode** | Selects **MAXN SUPER** when the Jetson offers it, otherwise **MAXN**. This raises the clock limits for the settings below. | | **Video encoder, VIC and GPU clocks** | Keeps the camera relay's H.264 encoding and the ZED SDK's processing fast. With default clocks, encoding each frame takes about three times as long. | | **CPU governor** | Keeps the CPU at full speed, so the IK solver isn't slowed down. | | **CAN interrupt** | Moves the USB interrupt for the CAN adapters onto a CAN core, away from the camera threads. Without it, camera load can delay motor replies until the arms fault. | | **Camera daemon** | Runs `nvargus-daemon`, which every ZED X frame passes through, at real-time priority on the camera cores only. | If it can't move the CAN interrupt, it logs a warning with the manual `echo N | sudo tee /proc/irq//smp_affinity_list` command. It also warns if `irqbalance` is running, because that service can undo the change. ## Supported Jetsons * **Orin NX 16GB** (ZED Box) * **AGX Orin** (32GB, 64GB and Industrial) * **Thor T5000** ## Power mode changes that need a reboot Some power mode changes take effect only after a reboot. `jetson.setup` never reboots by itself, so it can't interrupt an install or a robot session. It saves the new mode, and the Jetson applies it at the next boot. When [`axol provision`](/cli/provision#reboots) makes the change, it reboots at the end of its run. > [!WARNING] > > NVIDIA calls MAXN and MAXN SUPER experimental, unconstrained modes. It doesn't recommend sustained heavy work in them unless the module was flashed with the matching `-maxn` configuration and its more conservative thermal settings. Make sure the robot has enough power and cooling, and watch for thermal throttling during long local inference or training. `jetson.setup` doesn't change the board's thermal settings. > [!NOTE] > > The control loop also needs the real-time scheduling permission that [`axol provision`](/cli/provision#real-time-scheduling) installs for your login. Without it, the control loop won't start from a manual `axol serve` or `axol teleop`. # jog Source: https://docs.almond.bot/cli/jog Move the grippers, the lift and Jelly from the control panel's Jog screen. Jog Axol from the [control panel](/guides/control-panel#jog). The arms hold their pose until you plan and execute a move, or hold a jog button. The lift and Jelly move only while you hold their controls. When the run stops, the arms move to the rest pose before the motors turn off. Start and stop Jog from the control panel. The panel connects the Jog screen to the run, so a run started from a terminal has no screen to drive it. The flags below set the run's speeds and arms. With `--sim`, nothing touches the hardware. The lift and Jelly are simulated with the same speeds and ramps as the real ones. This command is configured through draccus (see [Command configuration](/cli/configuration)). Arm gains and stiffness are on the nested `axol` config, the same settings gravity compensation uses. The lift and Jelly use the shared `jelly` settings, the same as teleop. | Flag | Description | | - | - | | `--sim BOOL` | Jog a simulated Axol instead of the robot. Default `false` | | `--arm_speed FLOAT` | Average speed (rad/s) of the joint that moves furthest in a planned move. Default 0.6 | | `--min_duration FLOAT` | Shortest planned move, in seconds. Default 1.0 | | `--gripper_speed FLOAT` | Gripper jog speed (m/s) at full speed. Default 0.06 | | `--gripper_turn_speed FLOAT` | Gripper jog turn rate (rad/s) at full speed. Default 0.5 | | `--joint_speed FLOAT` | Fastest any arm joint turns while you jog a gripper (rad/s). Default 1.0 | | `--left_channel ` / `--right_channel ` | CAN channel per arm; `null` disables that arm. | | `--rate_hz FLOAT` | Control loop rate in Hz (default: 125) | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | # lift.goto Source: https://docs.almond.bot/cli/lift-goto Move Jelly's telescoping lift to a target height. Moves Jelly's telescoping lift to a height, given as a percentage of its homed travel. The default, **75%**, is the install height: high enough to slide Axol onto its Jelly mount. ```bash theme={null} axol lift.goto # 75%, the install height axol lift.goto --percent 30 axol lift.goto --percent 100 --speed 300 ``` The lift slows down as it reaches the target and keeps both legs level. The command reports the final height when the move ends. Press Ctrl-C, or **Stop** in the control panel, to stop the move right away. `--speed` limits the speed in encoder counts/s. Full speed is about 650. > [!NOTE] > > The lift must be homed. Run [`lift.home`](/cli/lift-home) once first. The lift board keeps its calibration across power cycles. You can also run this command from the control panel's [diagnostics dashboard](/guides/diagnostics-dashboard) under **Diagnostics → Raise lift (install height)**. # lift.home Source: https://docs.almond.bot/cli/lift-home Calibrate (home) Jelly's telescoping lift once, before you move it. Calibrates Jelly's telescoping lift. The legs drive up to the top stop, then down to the bottom stop. When homing succeeds, the lift board sets the bottom as zero, sets soft limits a little inside the stops, and saves them. [`lift.goto`](/cli/lift-goto) and the teleop height display use this calibration. ```bash theme={null} axol lift.home # legs together (default, legs on the robot) axol lift.home --independent # each leg to its own stops (loose legs only) ``` There are two modes: * **Together** (default): for legs bolted to the base, with or without Axol on top. The legs move as one, and when the first leg reaches a stop, both stop, so the frame is never twisted. Any height difference the legs start with is kept. * **Independent** (`--independent`, or the **Independent** toggle in the dashboard dialog): for loose legs, for example before mounting or after you replace a leg. Each leg runs to its own stops and is zeroed at its own bottom, so legs that start at different heights end up level. > [!WARNING] > > Never home independently with the legs mounted. After the first leg reaches its stop, the other keeps pushing against the frame until its stall protection cuts it off. Lift firmware older than v0.9 ignores the mode and always homes each leg independently. Homing takes 1 to 2 minutes and touches both end stops on purpose. Progress prints as it runs. Press Ctrl-C, or **Stop** in the control panel, to stop safely. An interrupted homing goes back to the previous calibration, so the lift is never left half-homed. > [!NOTE] > > You normally home the lift only once, not on every boot. The legs can't move without power, so the saved position stays valid across power cycles. Home again only if the columns were turned by hand or the lift lost power during a move. > [!NOTE] > > The lift's CAN bus must be set up with [`can.setup`](/cli/can-setup), and the lift board must have power. The command uses the chest bus `can_alm_axol_c` if it exists, otherwise the wheel bus `can_alm_axol_b`. Pass `--channel` to use a different interface. You can also run this command from the control panel's [diagnostics dashboard](/guides/diagnostics-dashboard) under **Diagnostics → Home the lift**. # lift.update Source: https://docs.almond.bot/cli/lift-update Update the lift board's firmware over CAN. Installs new Jelly Legs firmware on the lift board over its CAN bus. You don't need a USB cable or to open the chest. ```bash theme={null} axol lift.update # show the running firmware axol lift.update --firmware build/firmware.bin # install a build axol lift.update --firmware firmware.bin --force # reinstall the same build ``` Use the build's `firmware.bin` file, not the `.uf2` or `.elf`. The update takes about a minute: 1. The new firmware is copied to the board while the current firmware keeps running. The board accepts it only if the whole file arrived, its checksum matches, and it is Jelly Legs firmware. Anything else is rejected and nothing changes. 2. The board restarts into the new firmware on trial, with lift motion locked. 3. When the new firmware reports the expected build, the command confirms it and the update becomes permanent. If the new firmware is never confirmed, the board goes back to the previous firmware within 15 s. This covers a crash, a hang, a power loss or a stopped command. The lift keeps its saved height and homing across the update. * Press Ctrl-C, or **Stop** in the control panel, during the transfer to cancel it. Nothing is installed. * If the board already runs that build, the command says so and does nothing. Pass `--force` to install it again. * The lift must be idle. The command waits up to 10 s for a move or a pending position save to finish, and saving needs the 24 V supply on. > [!WARNING] > > The board must already run lift firmware 0.9 or newer, installed once over USB with its partition table. See the Jelly Legs firmware README in the circuits-py repo. Older firmware doesn't answer this command and must be updated over USB. Flashing the board over SWD erases the partition table, so it then needs the USB install again before it can update over CAN. > [!NOTE] > > You can also update from the control panel's [diagnostics dashboard](/guides/diagnostics-dashboard) under **Diagnostics → Helpers → Update lift firmware**. Choose the `firmware.bin` on your computer, and the dialog uploads it and shows its version and build date. Then press **Run** to install it. > > The command uses the lift bus set up by [`can.setup`](/cli/can-setup). Pass `--channel` to use a different interface. # mantis.update Source: https://docs.almond.bot/cli/mantis-update Update the Mantis rigs' firmware over CAN. Installs new firmware on both Mantis rigs over their CAN buses. You don't need a USB cable or to open a rig. ```bash theme={null} axol mantis.update # show the running firmware axol mantis.update --firmware build/firmware.bin # install on both rigs axol mantis.update --firmware firmware.bin --side left axol mantis.update --firmware firmware.bin --force # reinstall the same build ``` Use the build's `firmware.bin` file, not the `.uf2` or `.elf`. Each rig takes a few seconds, left first, then right: 1. The new firmware is copied to the rig while the current firmware keeps running. The rig accepts it only if the whole file arrived, its checksum matches, and it is Mantis firmware. Anything else is rejected and nothing changes. 2. The rig restarts into the new firmware on trial. 3. When the new firmware reports the expected build, the command confirms it and the update becomes permanent. If the new firmware is never confirmed, the rig goes back to the previous firmware within 15 s. This covers a crash, a hang, a power loss or a stopped command. * Keep both triggers released. Each rig learns its trigger's released position when it restarts. * Don't run it during teleoperation or data collection. The trigger stops sending readings while the rig restarts. * Press Ctrl-C, or **Stop** in the control panel, during the transfer to cancel it. Nothing is installed on that rig. * If a rig already runs that build, the command says so and skips it. Pass `--force` to install it again. * If one rig fails, the command still updates the other, then reports the failure. > [!WARNING] > > Each rig must already run Mantis firmware 0.2 or newer, installed once over USB with its partition table. See the Mantis firmware README in the circuits-py repo. Older firmware doesn't answer this command and must be updated over USB. Flashing a rig over SWD erases the partition table, so it then needs the USB install again before it can update over CAN. > [!NOTE] > > You can also update from the control panel's [diagnostics dashboard](/guides/diagnostics-dashboard) under **Diagnostics → Helpers → Update Mantis firmware**, with Mantis selected. Choose the `firmware.bin` on your computer, and the dialog uploads it and shows its version and build date. Then press **Run** to install it. > > The command uses the left and right buses in **Mantis settings → CAN** (`can_mantis_l` and `can_mantis_r` by default). Pass `--channel` to update one rig on a different interface. # migrate-dataset Source: https://docs.almond.bot/cli/migrate-dataset Fix the end-effector poses in older Cartesian and Mantis datasets, in place. `axol migrate-dataset` rewrites the Cartesian end-effector poses of a local LeRobot dataset in place. It has two migrations. Pass one of these flags: | Flag | Applies to | | - | - | | `--from-version ` | Cartesian datasets recorded by axol v0.1.31 or earlier (URDF root yaw). | | `--mantis-tcp-rotation` | Mantis datasets recorded by axol 0.2.4 or earlier (Vive tracker-to-gripper rotation). | Both migrations: * Update every data parquet file and recompute the dataset statistics. * Record what they did in `meta/axol.json`, so they can't run twice. * Back up every file they replace under `meta/migrations//`. If a migration fails, those files are restored. A later run finishes recovering an interrupted migration before it retries. Videos, gripper values, timestamps and joint-space data are never changed. ## URDF frame `--from-version`. Since v0.1.32 the robot's world frame has +x forward, +y left and +z up, a 90° turn from the frame older Cartesian datasets use. The migration applies that turn to the position and orientation of both end effectors in `action` and `observation.state`. ```bash theme={null} # Inspect the dataset and report the scope without changing it axol migrate-dataset --repo_id ilanri/checkers-demo-bimanual \ --from-version v0.1.29 --dry-run # Migrate it in place axol migrate-dataset --repo_id ilanri/checkers-demo-bimanual \ --from-version v0.1.29 # A dataset outside $HF_LEROBOT_HOME can be addressed directly axol migrate-dataset --repo_id /data/checkers-demo-bimanual \ --from-version v0.1.29 ``` Only run this on Cartesian data recorded with axol v0.1.31 or earlier. A joint-space dataset doesn't need it and is rejected. Older datasets don't record which axol version made them. Check when and how the dataset was recorded, then pass that version with `--from-version`. The command rejects v0.1.32 and newer. Current Cartesian datasets record their pose frame in `meta/axol.json`, and a dataset that has it is refused. ## Mantis tracker-gripper rotation `--mantis-tcp-rotation`. Mantis collection converts every tracker pose to a gripper pose before recording it. In axol 0.2.4 and earlier, that conversion used the wrong rotation (`Rx(+90°)` instead of `Ry(180°)`) for the Vive mount. Recorded orientations are pitched about 90° off, and Axol can't replay the dataset: the arms barely move. This migration swaps in the correct rotation in every recorded pose. Positions don't change. ```bash theme={null} axol migrate-dataset --repo_id CooperLiConduit/isolate-5 --mantis-tcp-rotation --dry-run axol migrate-dataset --repo_id CooperLiConduit/isolate-5 --mantis-tcp-rotation ``` Add `--swap-sides` when the trackers were bound to the opposite rigs, so the tracker `tracker.identify` labelled *left* was on the rig in the right hand. In that case the dataset's `left_ee.*` columns hold the right hand's rig, and every pose is turned 180°. `--swap-sides` swaps the left and right pose columns and turns every pose 180° about the midpoint between the grippers at rest. Gripper columns stay as recorded, because they follow the CAN channel, not the tracker. ```bash theme={null} axol migrate-dataset --repo_id CooperLiConduit/isolate-5 --mantis-tcp-rotation --swap-sides ``` Signs of a swapped session: * The hand the operator moved in the video is the *other* side in the dataset. * After the rotation fix alone, both engage orientations are about 180° from the rest pose. Axol 0.2.5 and later refuse to engage with swapped trackers, so only older datasets need this. Eligibility is checked before anything is written: * `robot_type` must be `axol_mantis`; robot-recorded datasets never went through the tracker transform. * `meta/axol.json` must exist and be in the v0.1.32+ pose frame (run `--from-version` first otherwise). * `meta/axol.json` must **not** already have a `mantis_tcp_transform` record. Datasets recorded with 0.2.5 or later have one, as do migrated datasets, so they are refused. That includes datasets recorded with measured per-unit transforms (`"id": "measured"`). This migration only undoes the factory Vive rotation. Don't run it on a pre-0.2.5 dataset recorded with an override in `~/.almond/mantis/tcp_transform.json` or with a Quest source. Those never used the wrong rotation. Don't run it on a dataset that mixes Mantis and robot episodes either, since it changes every row. After migration, `meta/axol.json` records `mantis_tcp_transform.id` as `vive-flat-back-ry180-v0.2.5`, so the migration can't run twice. That transform's offset differs from the current factory value (see [Tracker 3.0 factory value](/cli/tracker#tracker-30-factory-value)). `collect-data --mantis` refuses to add episodes to a migrated dataset, so record new episodes to a new `repo_id`. ## Options | Option | Description | | - | - | | `--repo_id ` | Local repo id under `$HF_LEROBOT_HOME`, or a dataset directory path (required) | | `--root ` | Alternate root containing the repo id | | `--from-version ` | URDF-frame migration: axol version that recorded the dataset; must be older than v0.1.32 | | `--mantis-tcp-rotation` | Mantis migration: replace the wrong Rx(+90°) Vive rotation with Ry(180°) | | `--swap-sides` | With `--mantis-tcp-rotation`: the left/right trackers were bound to the opposite rigs | | `--dry-run` | Check the dataset and report the files and rows that would change, without writing | # motion.build / motion.list Source: https://docs.almond.bot/cli/motion-build Build reference motions from recorded teleop or hand-guided sessions. A reference motion is a joint trajectory for both arms, stored on the robot in `~/.almond/motions/`. Replay it with [`tune.motion`](/cli/tune-motion) as often as you like and compare the tracking results run to run. Build one from a recording here, or generate one with [`motion.chirp`](/cli/tune-tf) or `scripts/creep_motions.py`. A few motions are built in and the same on every robot: * `slow_osc`: the slow-motion acceptance test. `slow_osc_left` is its mirror. * `fast_swing`: large, fast swings. `fast_swing_left` is its mirror. * `hold`: 40 s of holding still. A file of the same name in `~/.almond/motions/` replaces a built-in. `motion.build` turns a recording into a motion. It reads either kind: * **Teleop** (`axol teleop --teleop.record PREFIX`): the commands sent to the arms (`_cmd`), trimmed to the time tracking was engaged. * **Gravity comp** (`axol gravity-comp --record PREFIX`): the measured joint positions while you guided the arms (`_gc`). The still time at the start and end is trimmed, so start and end the demonstration with the arms briefly at rest. The recording is resampled at an even rate and smoothed to remove hand tremor and network jitter. Each point is then checked with the same collision-aware solver the teleop return to rest uses. The stored motion stays within joint limits and never collides with the robot itself. | Flag | Description | | - | - | | `prefix` | Recording prefix from `--teleop.record` or `gravity-comp --record`. A bare name is looked up in `~/.almond/recordings/`. Optional: defaults to the newest recording there. | | `--name NAME` | Motion name, saved as `~/.almond/motions/.npz`. Optional: defaults to the recording's name. | | `--out PATH` | Write to an explicit path instead of `~/.almond/motions/` | | `--rate HZ` | Playback rate (default: 240, the control rate). `tune.motion` replays at this rate. | | `--cutoff HZ` | Smoothing cutoff (default: 6.0). Lower removes more tremor. | | `--time-scale X` | Stretch playback time (2.0 = half speed; default: 1.0) | | `--no-project` | Skip the collision check | | `--notes TEXT` | A note stored with the motion | ```bash theme={null} axol teleop --teleop.record rec1 # record via teleop, or ... axol gravity-comp --record rec1 # ... by hand-guiding the arms axol motion.build # newest recording, named after it axol motion.build rec1 --name reach-slow --time-scale 2.0 axol motion.list # the built-ins and ~/.almond/motions ``` Every build also saves a before-and-after comparison in `~/.almond/diagnostics/tuning/`. It shows the recording and the built motion side by side for each joint, with how much each changed and the peak velocities. Open it in the diagnostics dashboard like any other tuning run to check the motion before you replay it. # motor.dump-config Source: https://docs.almond.bot/cli/motor-dump-config Save every configuration parameter of one motor, or all motors on a bus, to a file. Reads every configuration parameter from one motor, or from every motor on the bus when you omit `--id`, and prints them. With `--out` it also saves a JSON snapshot that [`motor.restore-config`](https://docs.almond.bot/cli/motor-restore-config) can write back. It works with both MyActuator and Damiao motors and picks the motor type from the CAN ID. Run it first when a motor misbehaves, so you have a record of its configuration. | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right side (mutually exclusive, required) | | `--target {axol,mantis}` | Use that side's Axol arm or Mantis gripper bus (default: `axol`) | | `--channel IFACE` | Use this SocketCAN interface instead of the default, such as `can0` | | `--id ID` | Motor CAN ID, hex or decimal. Omit to dump IDs 1 to 8 on Axol, or ID 8 on Mantis | | `--type {myactuator,damiao}` | Motor type. Inferred from the ID if omitted | | `--out FILE` | Save a JSON snapshot for `motor.restore-config` | | `--raw` | Read every raw parameter index, including ones without a name. MyActuator only | Each parameter is printed with its value and unit. Some carry a tag: * `(read-only)`: the motor reports the value but won't accept a new one, such as firmware versions and measured winding constants. * `(protected)`: factory calibration, identity, CAN IDs and baud rate. Parameters that the motor's firmware doesn't support are left out. A `--raw` snapshot can't be restored, because its indices have no known meaning. Use it only to identify parameters. ```bash theme={null} axol motor.dump-config --l --id 0x01 # one motor axol motor.dump-config --l # every motor on the left bus axol motor.dump-config --l --out arm-left.json # save a snapshot to restore later axol motor.dump-config --l --id 0x01 --raw # sweep unnamed indices (MyActuator) axol motor.dump-config --target mantis --l --out mantis-left.json ``` > [!NOTE] > > Attach the printed output or the saved snapshot when you contact support. It shows the motor's full configuration. # motor.flash Source: https://docs.almond.bot/cli/motor-flash Install a firmware image on a MyActuator motor over CAN. Installs a firmware image on one MyActuator motor over CAN. The motor restarts into its bootloader and receives the image. You don't need the vendor's Windows software. Power the arm but leave it idle. Nothing else may talk to the motor while the flash runs. | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right arm (mutually exclusive, required) | | `--channel IFACE` | Use this SocketCAN interface instead of the arm's Axol Hub interface, such as `can0` | | `firmware` | Path to the firmware image (`.bin`, positional, required). The file name can be at most 120 bytes | | `--id ID` | CAN ID of the motor to flash, hex or decimal (required) | | `--frame-delay SECONDS` | Pause between CAN frames. Raise it if the adapter's TX queue overruns (default: `0`) | | `--yes` | Skip the confirmation prompt | ```bash theme={null} axol motor.flash --l --id 0x01 ./RMD-X6-V4.4.bin axol motor.flash --r --id 0x03 ./firmware.bin --yes ``` The flash stops if the motor rejects a block or the bootloader reports an error. The error says what went wrong: * the image isn't for this motor (firmware version mismatch) * the first packet wasn't received * a frame header error * a flash write failure > [!WARNING] > > This overwrites the motor's firmware. If a flash is interrupted, the motor stays in its bootloader and won't answer normal commands. Run this command again to recover it. The motor is not lost, so don't give up on it after a power cycle. # motor.health Source: https://docs.almond.bot/cli/motor-health Check that every motor on both arms responds. Checks all 16 Axol motors (8 per arm), or both Mantis grippers with `--target mantis`. For each motor it runs the same reads as [`motor.info`](https://docs.almond.bot/cli/motor-info), such as position, temperature, voltage and error code. It prints one line per joint, left arm first: `OK` if every read succeeds, or the error if one fails. It exits with status `1` if any motor fails to respond, so you can use it in scripts. | Flag | Description | | - | - | | `--target {axol,mantis}` | Check the Axol arms or the Mantis grippers (default: `axol`). Mantis checks only ID 8 on `can_mantis_l` and `can_mantis_r` | | `--no-left` / `--no-right` | Skip one side | | `--left-channel IFACE` / `--right-channel IFACE` | Use this SocketCAN interface for that side instead of the default | | `--joints JOINTS` | Comma-separated subset of joints to check | ```bash theme={null} axol motor.health axol motor.health --no-right --left-channel can0 # one arm on a non-hub CAN adapter axol motor.health --target mantis # both Mantis grippers ``` # motor.info Source: https://docs.almond.bot/cli/motor-info Print the status of one motor, or every motor on a bus. Prints the status of one motor, or of every motor on the bus when you omit `--id`. Use it to check that a motor answers at a given CAN ID. It shows position, velocity, torque, temperature, voltage and the status or error code. MyActuator motors also report their model and firmware version, and Damiao motors report their control mode. | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right side (mutually exclusive, required) | | `--target {axol,mantis}` | Use that side's Axol arm or Mantis gripper bus (default: `axol`) | | `--channel IFACE` | Use this SocketCAN interface instead of the default, such as `can0` | | `--id ID` | Motor CAN ID, hex or decimal. Omit to query IDs 1 to 8 on Axol, or ID 8 on Mantis | | `--type {myactuator,damiao}` | Motor type. Inferred from the ID if omitted | ```bash theme={null} axol motor.info --l # scan all 8 motors on the left bus axol motor.info --l --id 0x01 axol motor.info --r --id 6 --type damiao axol motor.info --target mantis --l # left Mantis gripper (ID 8) ``` # motor.restore-config Source: https://docs.almond.bot/cli/motor-restore-config Write a saved configuration snapshot back to motors. Writes a snapshot from [`motor.dump-config`](https://docs.almond.bot/cli/motor-dump-config) back to the motors it came from. It works with both MyActuator and Damiao motors. The command reads the snapshot from a file on the Host Computer, so it isn't on the diagnostics dashboard. | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right side (mutually exclusive, required) | | `--target {axol,mantis}` | Use that side's Axol arm or Mantis gripper bus (default: `axol`). Mantis restores only ID 8 | | `--channel IFACE` | Use this SocketCAN interface instead of the default, such as `can0` | | `snapshot` | JSON file from `motor.dump-config` (positional, required) | | `--id ID` | Restore only this motor CAN ID, hex or decimal. Omit to restore every motor in the snapshot | | `--include-protected` | Also write protected parameters: factory calibration, CAN IDs and baud rate. Dangerous | | `--yes` | Skip the confirmation prompt | The restore writes only the parameters that differ from the snapshot, and reports each one it changed. It always skips: * parameters that already hold the saved value * read-only parameters * parameters the motor's firmware doesn't support * protected parameters, unless you pass `--include-protected` A wrong protected value can leave a motor unable to run or unreachable on the bus. You can't restore a snapshot taken with `--raw`. > [!WARNING] > > Don't restore a MyActuator snapshot taken with an `axol` release older than v0.2.12. Its parameter names point at different settings. Take a fresh `motor.dump-config` snapshot instead. ```bash theme={null} axol motor.restore-config --l arm-left.json # every motor in the snapshot axol motor.restore-config --l --id 0x01 arm-left.json # just one motor axol motor.restore-config --target mantis --l mantis-left.json ``` > [!NOTE] > > To fix a motor whose settings have drifted, dump a good motor to a snapshot, then restore that snapshot onto the drifted one. # motor.set-can-id Source: https://docs.almond.bot/cli/motor-set-can-id Change a motor's CAN ID and save it to the motor. Changes a motor's CAN ID and saves it to the motor's flash. You need the motor's current ID, or the motor must be the only device on the bus. `--type` is required for this command. | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right side (mutually exclusive, required) | | `--target {axol,mantis}` | Use that side's Axol arm or Mantis gripper bus (default: `axol`) | | `--channel IFACE` | Use this SocketCAN interface instead of the default, such as `can0` | | `--current-id ID` | Current CAN ID, hex or decimal (required) | | `--new-id ID` | New CAN ID, hex or decimal (required) | | `--type {myactuator,damiao}` | Motor type (required) | ```bash theme={null} axol motor.set-can-id --l --current-id 0x01 --new-id 0x03 --type myactuator axol motor.set-can-id --target mantis --l --current-id 0x01 --new-id 0x08 --type damiao ``` # motor.set-config Source: https://docs.almond.bot/cli/motor-set-config Read or write one motor configuration parameter. Reads or writes one configuration parameter on a MyActuator or Damiao motor. With `--value`, it writes the parameter and saves it to the motor's flash. Without `--value`, it prints the current value. The motor type comes from the CAN ID. To list every parameter name, run [`motor.dump-config`](https://docs.almond.bot/cli/motor-dump-config). | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right side (mutually exclusive, required) | | `--target {axol,mantis}` | Use that side's Axol arm or Mantis gripper bus (default: `axol`) | | `--channel IFACE` | Use this SocketCAN interface instead of the default, such as `can0` | | `--id ID` | CAN ID of the motor, hex or decimal (required) | | `--param NAME` | Parameter to read or write (required) | | `--value V` | New value. Omit to read the current value | | `--type {myactuator,damiao}` | Motor type. Inferred from the ID if omitted | | `--force-protected` | Allow writing a protected parameter: factory calibration, identity, CAN ID or baud rate | | `--yes` | Skip the confirmation prompt | ```bash theme={null} axol motor.set-config --l --id 0x01 --param LOW_VOLTAGE # read the threshold axol motor.set-config --l --id 0x01 --param LOW_VOLTAGE --value -2.0 # write and persist it axol motor.set-config --r --id 0x07 --param TIMEOUT --value 1000 # Damiao CAN timeout, ms axol motor.set-config --target mantis --l --id 0x08 --param TIMEOUT # Mantis gripper ``` * Read-only parameters, such as firmware versions and measured winding constants, can't be written. * Damiao's `TIMEOUT` (loss of communication) is given in milliseconds. * `MAX_TORQUE`, `VOLTAGE_SAMPLE_RES`, `LPF_CF_FOR_CURRENT`, `LPF_CF_FOR_SPEED` and `ERROR_DETECTION_LPF_CF` exist only on MyActuator firmware `2026042402` and later. On older firmware the command reports them as unsupported. * On that firmware, `MAX_TORQUE` must be the motor's rated torque: `60` on an RMD-X6-P20-60, `50` on an RMD-X6-P20-50 and `129` on an RMD-X8. Axol sets it when it enables the arms, so you don't need to change it. If the setting can't be changed, Axol won't start the motor, and the error shows the command to run. * `CURRENT_SAMPLE_RES` (**Current sample resistor**) must match the motor: `2` on an RMD-X8 and `3` on an RMD-X6. With the wrong value the motor delivers the wrong torque but still reports the torque it was asked for. Axol won't start a motor whose value doesn't match, and the error shows the command to run. * `CHANGE_DIRECTION` (**Change Motor Direction**) is `0` or `1`. A motor whose `EXCHANGE_PHASE` is `0` needs it set to `1` to turn the same way as the rest of Axol. Changing it moves the joint's zero, so don't set it here. [Guided zeroing](/cli/motor-set-zero-pos#guided-zeroing) sets it and then zeroes the joint. * Don't change `EXCHANGE_PHASE`. It describes how the motor is built, and a wrong value stops the motor from turning. * Writing `ENABLE_2ND_ENCODER` as mode `2` or `3` also writes the matching `SECOND_ENCODER_RESOLUTION`. On firmware `2026052501` and later, the resolution stays as the motor reports it. The MyActuator parameters match the panels of the vendor's V4.0 setup software. You can also edit them in the **Parameters** tab of the [diagnostics dashboard](/guides/diagnostics-dashboard#motor-status). > [!WARNING] > > A wrong protected value can leave a motor unable to run or unreachable on the bus. Use `--force-protected` only for recovery, such as reassigning a baud rate, never for routine tuning. # motor.set-zero-pos Source: https://docs.almond.bot/cli/motor-set-zero-pos Zero a motor's encoder at a joint end stop. Sets a motor's zero to its current position and saves it to the motor's flash. Use `--guided` to zero every arm joint in turn. Power-cycle Damiao motors (`wrist_2` and `wrist_3`) afterward so the new zero takes effect. > [!WARNING] > > Each joint is zeroed at one of its mechanical **end stops**, not at the rest pose. `--guided` mode walks you to the right end stop. With `--id`, you must hold the joint at the right end stop yourself before you zero it. Axol still reports joint positions with `0` at the rest pose. | Flag | Description | | - | - | | `--l` / `--r` | Select the left or right arm (mutually exclusive, required) | | `--channel IFACE` | Use this SocketCAN interface instead of the arm's Axol Hub interface, such as `can0` | | `--id ID` | CAN ID of the motor to zero, hex or decimal (required unless `--guided`) | | `--type {myactuator,damiao}` | Motor type. Inferred from `--id` if omitted | | `--guided` | Walk through the arm joints and zero each one at an end stop | | `--joints j1,j2,…` | Joints to walk in `--guided` mode (default: all seven). The gripper has no zero, because it calibrates itself when enabled | ```bash theme={null} axol motor.set-zero-pos --l --id 0x01 # single motor axol motor.set-zero-pos --l --guided # all left-arm joints axol motor.set-zero-pos --l --guided --joints wrist_2,wrist_3 # just the wrist Damiaos ``` ## Guided zeroing 1. Hold every selected joint inside its range, away from the end stops, and press Enter once. 2. For each joint in turn, move it to the end stop the prompt names and press Enter. 3. If the joint moved the wrong way, the prompt asks you to move it to the same end stop again. Axol zeroes a joint only after it moves the expected way. If the joint is already at the end stop the prompt names and it still reads as the wrong way, its motor turns the wrong way. Skip the joint with Ctrl-C and contact Almond support. Some MyActuator motors need **Change Motor Direction** turned on to turn the same way as the rest of Axol. Guided zeroing turns it on before you move any joint, then zeroes each joint as usual. Zeroing one motor with `--id` turns it on too. Until a joint that needs it is zeroed this way, Axol won't enable the arm. Press Ctrl-C to skip a joint. `wrist_2` and `wrist_3` accept **either** end stop, because on some units one stop is placed better than the other. Move to the one you trust and press Enter. Axol detects which stop was used from the encoder reading. Don't leave these two joints right at an end stop when you connect, because that position is ambiguous. > [!WARNING] > > **Axol won't enable arms whose zeros were never set.** Before it powers any motor, every arm bring-up checks that each joint's reading is plausible for its end-stop zero. This covers [`teleop`](/cli/teleop), [`collect-data`](/cli/collect-data), [`run-policy`](/cli/run-policy), [`gravity-comp`](/cli/gravity-comp), the [control panel](/guides/control-panel) and the [diagnostics dashboard](/guides/diagnostics-dashboard). If a joint fails, the error names it. Run `axol motor.set-zero-pos --guided`, then try again. # policy.check Source: https://docs.almond.bot/cli/policy-check Exercise a custom policy endpoint without a robot. Plays the robot's side of a [custom policy](/operations/custom-policy) session against a running endpoint, such as one started with [`almond_axol.policy.serve()`](/api/policy). It needs no robot, cameras or CAN. It uses the same scheduler as [`run-policy`](/cli/run-policy) on a virtual clock: * Requests go out every `request_interval` ticks. * Each reply is adopted `delay_steps` ticks after its request, at the row that's due by then. * A reply later than `max_adoption_offset_steps` triggers recovery, as it would on the robot. Frames are mid-grey, and the simulated arm tracks its commands perfectly. ```bash theme={null} axol policy.check # endpoint on ws://127.0.0.1:8765 axol policy.check --server_host 192.168.1.99 --delay_steps 4 axol policy.check --cartesian true --cameras overhead,left_arm,right_arm ``` The report lists: * requests sent and replies adopted; * every recovery and its reason (a late reply, or a plan that ran out of rows); * the endpoint's real round-trip time, against the time between requests; * the largest per-tick jumps where one plan hands over to the next, next to the largest steps within a plan. A policy that continues the motion in progress shows switch jumps no larger than its within-plan steps. The command exits `1` if the endpoint refuses the session or fails a request, and `2` if any recovery happened. | Flag | Description | | - | - | | `--server_host HOST` | Endpoint address, or a `ws://` / `wss://` URL (default: `127.0.0.1`) | | `--server_port INT` | Endpoint port (default: 8765) | | `--ticks INT` | Control ticks to simulate (default: 300, i.e. 10 s at 30 Hz) | | `--delay_steps INT` | Simulated reply latency in ticks (default: 2) | | `--cartesian BOOL` | Send the Cartesian layout (`observe_cartesian`) instead of joint positions (default: false) | | `--cameras LIST` | Comma-separated camera names (default: `overhead`) | | `--camera_height INT` / `--camera_width INT` | Frame size (default: 360 × 640) | | `--fps INT` | Control rate (default: 30) | | `--actions_per_chunk INT` | Horizon (default: 50) | | `--request_interval INT` | Rows between requests (default: 5, as run-policy) | | `--max_adoption_offset_steps INT` | Latest row a reply may start at (default: 6, as run-policy) | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `WARNING` | From Python, `check_policy()` returns the same report as a [`CheckReport`](/api/policy#check_policy) for unit tests. # provision Source: https://docs.almond.bot/cli/provision Install the system pieces Axol needs beyond the Python package, such as axol-rt and camera drivers. Installs the parts of Axol that `uv tool install` can't manage: system packages, drivers, permissions and the `axol-rt` control core. Run it after you install or update `axol`. It is safe to run on any computer and to run again at any time. ```bash theme={null} axol provision ``` Run it from your normal login. It asks for your `sudo` password once, for the steps that need root. Without a working `sudo`, it exits with a message. ## What it installs Steps that don't apply to the computer, such as camera steps on a computer without a ZED SDK, are skipped. | Step | What it does | | - | - | | **adb** | Installs adb and the Quest udev rule for [Quest over USB](/guides/quest-over-usb). | | [`tracker.install`](/cli/tracker) | Installs libsurvive and Vive USB permissions for Mantis Lighthouse tracking. | | [`zed.driver`](/cli/zed-driver) | Updates a ZED Box's GMSL camera driver to the version the ZED SDK needs. Takes effect after a reboot. | | **Board IMU** (`gyro.install`) | Lets teleop read the carrier board's IMU without root. [Jelly](/guides/vr-interface#jelly) uses it to hold its heading. | | **CAN e-stop recovery** | Lets a manual `axol serve` or `axol teleop` reset the CAN interfaces after an emergency stop. See [`can.setup`](/cli/can-setup#recovery-after-an-emergency-stop). | | **Real-time scheduling** | Lets your login run the control loop and camera capture at real-time priority. Takes effect at your next login. See [Real-time scheduling](#real-time-scheduling). | | [`zed.install`](/cli/zed-install) | Installs the pyzed bindings for the ZED SDK. | | [`gst.install`](/cli/gst-install) | Installs GStreamer and PyGObject for the camera relay. | | [`gst.build-zed`](/cli/gst-build-zed) | Builds the patched ZED GStreamer plugins, so camera images line up with joint data. | | [`rt.install`](/cli/rt-install) | Builds and installs the `axol-rt` control core. **Required.** | | [`ik.warm`](/cli/ik-warm) | Compiles the IK solver ahead of time, so your first session doesn't wait about a minute. | | **Shared install permissions** | On a hosted install (`/opt/axol`), keeps `axol` runnable from your login after a control panel update. | | **Host tuning** | Applies the Jetson power, clock and CPU settings. See [Host tuning](#host-tuning). | On a computer without the ZED SDK at `/usr/local/zed`, the pyzed and ZED GStreamer steps are skipped. The GStreamer steps are also skipped on computers that aren't Jetsons. Everything else, including `axol-rt`, is installed on any Linux computer. ## Exit codes `provision` runs every step even when one fails, then reports what failed. | Exit code | Meaning | | - | - | | `0` | Every step succeeded or was skipped. | | `1` | `axol-rt` failed to install. Axol can't control hardware until you fix it. | | `3` | Only optional steps failed. The last line lists them (`Optional provisioning steps failed: ...`). Axol runs without them. | When `axol serve` runs `provision` during an update, it exits `0` if only optional steps failed. The update still goes ahead, and the control panel shows the missing steps as a warning. `--require-rt` is accepted for compatibility. `provision` already exits `1` when `axol-rt` fails. ```bash theme={null} axol provision --require-rt ``` ### If apt fails `provision` never interrupts `apt-get` or `dpkg`, even if `axol.service` restarts. If an install fails, the log names the package `dpkg` couldn't process. Repair it, then run `provision` again: ```bash theme={null} sudo dpkg --configure -a axol provision ``` ## Real-time scheduling The control loop needs real-time priority. Without it, `axol teleop`, `collect-data`, `collect-dagger` and `run-policy` stop with `refusing to run without real-time scheduling`, because the arms would hitch and lunge. The camera relay also logs `camera capture threads stay SCHED_OTHER`, and recordings may drop episodes under load. Set `AXOL_ALLOW_CFS_CONTROL=1` to run without real-time priority anyway. `provision` writes `/etc/security/limits.d/50-axol-rtprio.conf`, which takes effect at your next login. To check it, run `ulimit -r`. It should print `20`. > [!WARNING] > > This file applies only to a normal `ssh` login. **Tailscale SSH**, terminals opened over it, and systemd units without `LimitRTPRIO` don't get it. > > When `provision` runs in such a session, it raises the limit on your shell and the terminal above it, such as `tmux` or an IDE, so new commands and terminals from there get it. The fix lasts until those processes exit. If `provision` can't do this, it prints two ways out: > > * Reconnect over `ssh`. > * Run `sudo prlimit --pid $$ --rtprio=20:20` in that shell. > > `axol-rt` keeps real-time priority in any session, and so does anything run as root. ## Host tuning Host tuning runs last. On a Jetson (Orin NX 16GB, AGX Orin, Thor T5000), it sets: * the maximum power mode * fixed video encoder, GPU and CPU clocks * the CAN adapters' interrupt on a CAN core * real-time priority for the camera service on the camera cores See [`jetson.setup`](/cli/jetson-setup) for why each one matters. A Raspberry Pi 5 or a workstation needs no tuning. On every computer, `provision` logs which CPU cores each part of Axol uses, for example `core layout: 14 cores online: CAN 12-13, control 2, IK 3, relay 4-5, recorder 10-11, camera 0-1,5-9`. > [!NOTE] > > Host tuning resets at every reboot. `axol.service` reapplies it at each boot by running `axol provision --boot`, which runs only this step. `axol jetson.setup` does the same thing. You don't need to run it yourself: after an update, `axol provision` and a fresh login are enough. > > When the control panel updates `axol`, its provisioning skips host tuning, because the service restart at the end of the update applies it. ### Reboots Some steps take effect only after a reboot, such as a new ZED Box camera driver or a Jetson power mode change. When one of them runs, `axol provision` **reboots the computer at the end of the run**, which ends your SSH session. * A run with failed steps never reboots. The reboot stays pending, so the next successful run reboots. * If a reboot didn't fix the step that asked for it, `provision` reports the problem instead of rebooting again. * A `provision` started by `axol serve` never reboots by itself. | Flag | Effect | | - | - | | `--no-reboot` | Leave a required reboot pending and say so, so you can reboot at a safe time. | | `--apply-reboot` | Provision nothing. Reboot if an earlier `--no-reboot` run left one pending. | The hosted installer runs `provision --no-reboot`, then `provision --apply-reboot` once the service is installed. The [`axol serve`](/cli/serve) updater runs `provision --no-reboot`, then reboots instead of restarting the service, and only while no operation is running. See [Development install: Headset-video stack](/advanced/development-install#headset-video-stack) for when you'd run this by hand. # replay-dataset Source: https://docs.almond.bot/cli/replay-dataset Replay a recorded LeRobot dataset episode on the robot. Replays one episode of a [LeRobot](https://github.com/huggingface/lerobot)-format dataset on Axol. The episode's recorded `action` column is sent to the arms frame by frame, then the robot returns to its rest pose. It's the reverse of [`collect-data`](/cli/collect-data): instead of recording actions, it plays recorded ones back on the hardware. Replay drives only the arms. It uses no cameras, teleop or policy server. 1. The arms move to the rest pose along the same collision-aware path [`run-policy`](/cli/run-policy) uses. This first move goes through zero. Episodes are recorded from rest, so playback starts without a jump. 2. Each frame is sent at the dataset's recorded fps, so the motion keeps its original timing. 3. At the end the arms park: rest pose, then, with `--park_to_zero` (on by default), the all-zero pose, holding their grasp. With `--interpolate true`, the recorded actions are spread over commands at about 120 Hz for smoother motion. The episode's timing doesn't change. Replay refuses to start while `shoulder_1`, `shoulder_2` or `elbow` is more than 25° from zero, and names each joint that is out. See [Starting needs the arms near zero](/operations/teleop). Pass `--loop true` to replay the episode over and over, returning to rest between takes, until you press `Ctrl+C` or **Stop** in the [control panel](/guides/control-panel). Either way, the arms return to rest before the command exits. > [!NOTE] > > From the control panel, `--repo_id` must name a dataset under the configured dataset root. Passing a dataset folder path works only from the CLI. > [!WARNING] > > Replay only datasets you created or obtained from a trusted source. Loading a > dataset is not sandboxed. This command is configured through draccus. The robot settings (CAN channels, per-joint gains) live in the nested `robot_config`. Set them with dotted flags or a whole-config file. See [Command configuration](/cli/configuration) for the syntax and [Replay Dataset Config Parameters](/operations/replay-dataset-config) for every field with its default. | Flag | Description | | - | - | | `--repo_id ` | Dataset to replay (required). A repo ID under `--root` (e.g. `myorg/pick-place`), a HuggingFace Hub repo ID to download, or the path of a dataset folder (one containing `meta/info.json`). If it isn't found, the error lists the datasets on the machine. | | `--episode INT` | Index of the episode to replay, starting at `0` (required) | | `--fps INT` | Playback frame rate. `0` (default) uses the dataset's recorded fps. | | `--interpolate true` | Interpolate between recorded actions and command the arms at about 120 Hz. Timing doesn't change. Default: off. | | `--loop true` | Replay the episode until stopped with `Ctrl+C` or **Stop**, returning to rest between takes. Default: off. | | `--reset_torque_threshold FLOAT` | Contact limit (Nm) for every return to rest (default: 6.0). `0` turns it off. | | `--reset_gravity_comp_kd FLOAT` | Damping (Nm·s/rad) while the arms hang limp after a contact stop (default: 0.25). Same as [`gravity-comp`](/cli/gravity-comp) `--kd`. | | `--teleop_torque_threshold FLOAT` | Contact limit (Nm) during playback (default: `0`, off). The control panel suggests `16.0`. | | `--park_to_zero BOOL` | After the last take, and on **Stop** or `Ctrl+C`, move the arms from rest on to the all-zero pose before releasing the motors (default: `true`). Control panel: **Park to zero on stop**. | | `--root PATH` | Local dataset root (default: `$HF_LEROBOT_HOME`) | | `--robot_config.axol_config.left_stiffness S` | Left arm stiffness in `[0, 1]` (default: 1, the tuned production gains). Match the value used to record, so the arm tracks the actions the same way. Use `right_stiffness` for the right arm. See [`AxolConfig.left_stiffness`](/api/robot). | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | If a joint pushes hard against something during a return to rest, or during playback with `--teleop_torque_threshold` set, the arms stop and go limp in a gravity-compensation hold. Replay can't retry, so free the arms and stop the run with `Ctrl+C` or **Stop**. ```bash theme={null} axol replay-dataset --repo_id myorg/pick-place --episode 0 axol replay-dataset --repo_id myorg/pick-place --episode 0 --loop true # loop until Ctrl+C axol replay-dataset --repo_id myorg/pick-place --episode 3 --fps 30 \ --robot_config.axol_config.left_stiffness 1.0 --robot_config.axol_config.right_stiffness 1.0 ``` > [!WARNING] > > Replay drives the arms from the recorded actions without watching the scene. Only the optional `--teleop_torque_threshold` stops it if a joint hits something. Before you start, clear the workspace and set it up roughly as it was when the episode was recorded. Keep the [Stop](/cli/serve) control or `Ctrl+C` within reach. # rt.install Source: https://docs.almond.bot/cli/rt-install Build and install axol-rt, the real-time core that controls Axol's motors. Builds and installs `axol-rt`, the real-time core that controls the motors for teleop and every other command that moves the arms. Axol can't control hardware without it. [`axol provision`](/cli/provision) runs it for you. Run it yourself to rebuild: ```bash theme={null} axol rt.install ``` ## What it does 1. **Installs Rust if needed.** If `cargo` isn't on your PATH or in `~/.cargo/bin`, it installs a minimal Rust toolchain with rustup into `~/.cargo`. This doesn't need `sudo`. 2. **Gets the source code.** In a development checkout it builds `rust/axol-rt`. Otherwise it downloads the source that matches the installed `axol` version into `~/.almond/axol-rt-src`. 3. **Builds and installs the binary.** In a development checkout the binary stays in `rust/axol-rt/target/release/`. Otherwise it goes in `UV_TOOL_BIN_DIR` if that is set, or in `~/.local/bin/axol-rt`. The hosted installer puts it in `/usr/local/bin/axol-rt`. Running it again at the same version skips the build. 4. **Grants permissions.** It gives the binary permission to run at real-time priority (`CAP_SYS_NICE`) and to lock its memory (`CAP_IPC_LOCK`). This needs root, so it may ask for your `sudo` password. Without `sudo`, it prints the `sudo setcap` command to run once. Each step is skipped when its work is already done. ### Building from other source If `rt.install` can't find the right source, such as when `axol` was installed from a wheel file, set `AXOL_RT_SOURCE` to a checkout path, or to `@`. Setting it always rebuilds. ```bash theme={null} AXOL_RT_SOURCE=https://github.com/almond-bot/axol@main axol rt.install ``` ## Which binary runs Axol uses the first `axol-rt` it finds, in this order: 1. the path in `AXOL_RT_BIN` 2. the build in the current development checkout 3. `axol-rt` on your PATH ## If arming fails * **Version mismatch.** `axol` and `axol-rt` must come from the same version. If they don't, `axol-rt` refuses to start before any motor moves, and the session fails with `axol-rt … refused the configuration and exited`. Run `axol rt.install`, or run `cargo build --release` in `rust/axol-rt` in a development checkout. * **No real-time priority.** `axol-rt` won't arm the motors if it can't get real-time priority. Run `axol rt.install` again to restore its permissions. If `axol-rt` can't lock its memory, it logs a warning and runs anyway. > [!NOTE] > > When `axol provision` runs this step and it fails, `provision` finishes the other steps and then exits with code `1`. Run `axol rt.install` by itself to see the full error. # run-policy Source: https://docs.almond.bot/cli/run-policy Run a trained policy autonomously on the robot with async inference. Runs a trained policy on the robot, using the ZED cameras attached to it. * LeRobot policy types use LeRobot's async inference. A policy server starts on the robot, unless `--server_host` points to a remote [`inference-server`](/cli/inference-server). * `--policy_type custom` connects to your own endpoint through the [custom policy interface](/api/policy-plan). See [Custom policy interface](#custom-policy-interface). During a rollout, type a key on the terminal: * `s` saves the rollout and ends the episode. * `r` discards it. The arms go limp so you can move them by hand, since a failed rollout often leaves them in a bad spot. Clear them, then press **Enter** to return to rest and record again. * `q` discards it and quits. `--episode_time_s` limits each episode. When time runs out with no key pressed, you get the same prompt: **Enter** saves, `r` discards, `q` quits. > [!WARNING] > > Load only policy checkpoints and existing rollout datasets that you created > or obtained from a trusted source. Loading them is not sandboxed. > [!TIP] > > For the end-to-end workflow, including running inference on a GPU machine, see the [Run Policy guide](/operations/run-policy). This command is configured through draccus. The robot settings (cameras, per-joint gains) live in the nested `robot_config`. Set them with dotted flags or a whole-config file. See [Command configuration](/cli/configuration) for the syntax and [Run Policy Config Parameters](/operations/run-policy-config) for every field with its default. | Flag | Description | | - | - | | `--policy_type {act,smolvla,diffusion,tdmpc,vqbet,pi0,pi05,groot,custom}` | Policy type (required). LeRobot types must match `--policy_path`. `custom` selects the [custom policy interface](/api/policy-plan); see [Run Your Own Policy](/operations/custom-policy). | | `--policy_path PATH_OR_REPO` | Local checkpoint path or HuggingFace repo ID. Required for LeRobot types, unused for `custom`. | | `--task TEXT` | Natural language task description (required). With `custom` it labels the dataset and isn't sent to the endpoint. | | `--episode_time_s INT` | Longest episode in seconds (default: 120). Episodes normally end on a key press. | | `--fps INT` | Control loop rate (default: 30). Must match the rate the policy was trained on. | | `--repo_id /` | Dataset repo ID to save rollouts to (optional) | | `--root PATH` | Local dataset root (default: `$HF_LEROBOT_HOME`) | | `--push_to_hub true` | Push the rollout dataset to HuggingFace Hub when done. Log in first. See [Upload to the HuggingFace Hub](/operations/data-collection#upload-to-the-huggingface-hub). | | `--vcodec STR` | Video codec for saved rollouts (default: `h264` on Jetson, `auto` elsewhere). Used only with `--repo_id`. | | `--device STR` | PyTorch device for LeRobot inference (default: `cuda`; unused with `custom`). The hosted Jetson install has CPU-only PyTorch, so use `cpu` or remote inference. | | `--server_host HOST` | Address of a remote [`inference-server`](/cli/inference-server). Default `null` starts a policy server on the robot. With `custom`, the address of your endpoint (default `127.0.0.1`); a `ws://` or `wss://` URL also works. | | `--server_port INT` | Policy server or endpoint port (default: 8765) | | `--actions_per_chunk INT` | Most actions per inference call (default: 50) | | `--plan_config.request_interval INT` | Custom policies: request a new plan after this many actions (default: 5) | | `--plan_config.max_adoption_offset_steps INT` | Custom policies: oldest a reply can be, in control steps since its request, and still be used (default: 6). Must be less than `--actions_per_chunk`. | | `--plan_config.late_policy {abort,blocking_refresh}` | Custom policies: when a reply is too late or the plan runs out, stop (`abort`) or hold and request a fresh plan (`blocking_refresh`, the default) | | `--chunk_size_threshold FLOAT` | LeRobot policies only: request a new chunk when the queue drops to this fraction of a chunk (default: 0.9) | | `--aggregate_fn {temporal_ensemble,weighted_average,latest_only,average,conservative}` | LeRobot policies only: how overlapping action chunks are combined (default: `temporal_ensemble`, from the ACT paper) | | `--temporal_ensemble_coeff K` | LeRobot policies only: decay for `temporal_ensemble` (default: 0.01). Higher is smoother, `0` weights all chunks equally, and negative is more reactive. | | `--ensemble_blend_s FLOAT` | LeRobot policies only: fade each chunk out over its last this-many seconds (default: 0.2). `0` turns it off. | | `--align_fade_s FLOAT` | LeRobot policies only: fade in a new chunk's offset from the current motion over this many seconds (default: 1.0). `0` turns it off. | | `--exec_max_vel FLOAT` | Per-joint velocity limit (rad/s) on every command sent to the arms (default: teleop's limit) | | `--exec_max_accel FLOAT` | Per-joint acceleration limit (rad/s²) on every command (default: teleop's limit). Set either limit to `0` to turn the filter off. | | `--max_first_action_offset_rad FLOAT` | Largest allowed gap between the first action and the arm's current pose (default: 0.15 rad). `0` turns the check off. See [First-action check](#first-action-check). | | `--reset_torque_threshold FLOAT` | Contact limit (Nm) for the return to rest between episodes (default: 6.0). `0` turns it off. | | `--reset_gravity_comp_kd FLOAT` | Damping (Nm·s/rad) while the arms hang limp after a contact stop (default: 0.25). Same as [`gravity-comp`](/cli/gravity-comp) `--kd`. | | `--policy_torque_threshold FLOAT` | Contact limit (Nm) while the policy drives (default: `0`, off). The control panel suggests `16.0`. | | `--park_to_zero BOOL` | On **Stop**, `Ctrl+C` or `q`, move the arms from rest on to the all-zero pose before releasing the motors (default: `true`). Control panel: **Park to zero on stop**. | | `--robot_config.cameras DICT` | Camera slots (`overhead`, `left_arm`, `right_arm`) and each ZED camera's serial number, as one inline value: `--robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}"`. Assign the cameras the policy was trained on. At least one is required. | | ↳ `stereo` (auto-detected) | Stereo ZED X cameras are detected from their serial number, as in [`collect-data`](/cli/collect-data#stereo-cameras). Match the camera setup of the training dataset. | | `--robot_config.video_backend {auto,gst,sdk}` | Camera capture backend (default: `auto`). Use the backend the training data was recorded with. | | `--robot_config.axol_config..gripper.torque_limit FLOAT` | Max torque (Nm) for a gripper (default: 0.5, at most 5). `` is `left` or `right`. | | `--robot_config.axol_config.left_stiffness S` | Left arm stiffness in `[0, 1]` (default: 1, the tuned production gains). Match the value used to collect the data. Use `right_stiffness` for the right arm. See [`AxolConfig.left_stiffness`](/api/robot). | | `--rerun_ip IP` | IP of a Rerun viewer on your computer, for live visualization | | `--rerun_port INT` | Rerun viewer port (default: 9876). Used only with `--rerun_ip`. | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | ```bash theme={null} axol run-policy --policy_path myorg/pick-place-policy --policy_type act --task "Pick the red cube" \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" axol run-policy --policy_path ./checkpoints/epoch_100 --policy_type smolvla --task "Stack blocks" \ --device cpu \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" axol run-policy --policy_path myorg/pick-place-policy --policy_type act --task "Pick the red cube" \ --server_host 192.168.1.99 \ --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" ``` ## Cameras and observations The GStreamer and ZED SDK backends produce visibly different images. Run the policy through the backend its dataset was recorded with, or it sees images it was never trained on. The startup log names the backend in use: `Cameras: gst pipeline` or `Cameras: ZED SDK`. The GStreamer backend is used only when the plugin installed by [`gst.build-zed`](/cli/gst-build-zed) is verified. Each observation pairs the camera images with the arm state from the moment the images were exposed. If a camera goes stale, or the images and arm state are too far apart in time, the rollout stops rather than feed the policy a mismatched observation. ## Safety checks ### First-action check For joint-space policies, run-policy compares the first action of each episode with the arm's measured pose. If any arm joint is more than `--max_first_action_offset_rad` away: * Nothing is sent to the arms and the episode is discarded. * The log and the control panel name the joint and the offset. * Continue to start the next attempt. Demonstrations start from rest, so a large first offset usually means the policy sees inputs it wasn't trained on, such as a different scene or camera backend. Grippers and Cartesian actions aren't checked. Any accepted first action is still ramped in, not sent as one step. ### Contact stops If the return to rest between episodes hits something, the arms stop and go limp in a gravity-compensation hold. Free them by hand, then continue (**Enter** or the panel's **Return to rest**) to return to rest from where they are. With `--policy_torque_threshold` set, the same check runs while the policy drives. A stop ends the episode without saving and drops the arms limp. Clear them, then continue to return to rest and start the next attempt. ## Saving rollouts With `--repo_id`, each saved episode is added to a LeRobot-format dataset. Resuming and repair work as in [`collect-data`](/cli/collect-data#saving-and-resuming), and each episode is on disk as soon as it saves. Between episodes the arms return to rest along a collision-aware path. ## Starting and stopping **Starting needs the arms near zero.** Run-policy refuses to start while `shoulder_1`, `shoulder_2` or `elbow` is more than 25° from zero, the arms' natural resting pose. It names each joint that is out. Move them back by hand, for example under [`axol gravity-comp`](/cli/gravity-comp), and start again. The first move then goes through zero on its way to the rest pose. See [Starting needs the arms near zero](/operations/teleop). **Stopping parks the arms.** When you end a run with `Ctrl+C`, `q` or **Stop** in the control panel: 1. The arms return to the rest pose. 2. With **Park to zero on stop** (`--park_to_zero`, on by default), they continue to zero, holding their grasp. 3. The motors turn off. The return to rest has 6 s and the move to zero has 10 s. If a move runs out of time or hits something, the motors turn off where the arms are. A second `Ctrl+C` doesn't interrupt the park. The park is skipped when the run never moved the arms, when a contact hold has left them limp, when the IK process never started, or when the CAN bus has stopped reporting positions. ## Custom policy interface `--policy_type custom` connects to your endpoint through the custom policy interface. The robot sends compressed observations and keeps running the current plan while the endpoint computes the next one. When a new plan arrives, the robot skips the rows whose time has already passed. The endpoint must use protocol `version: 2`. Endpoints on the original protocol are refused. ```bash theme={null} axol run-policy --policy_type custom --server_host 192.0.2.10 \ --task "Pick the red cube" --actions_per_chunk 30 \ --robot_config.cameras "{overhead: {serial: 41234567}}" ``` Write the endpoint with the [`almond_axol.policy`](/api/policy) SDK (`Policy` and `serve()`), and test it without the robot using [`policy.check`](/cli/policy-check). See the [custom policy interface documentation](/api/policy-plan) for setup, timing and recovery. # serve Source: https://docs.almond.bot/cli/serve Run the Axol web control panel to drive the robot from a browser. Runs the **Axol web control panel**, a local server that lets you drive the robot from a browser instead of a terminal. From the panel you can start, watch and stop teleoperation, gravity compensation, data collection, dataset replay and policy inference. With the [one-command install](/installation), this command already runs as a system service (`axol.service`). It starts at boot and restarts automatically, and the control panel offers an update when a newer [release](https://github.com/almond-bot/axol/releases) exists. You run it by hand only on a development install: ```bash theme={null} axol serve # https://localhost:8001 (LAN-reachable) axol serve --port 9000 axol serve --open # also open a browser window on startup axol serve --host 127.0.0.1 # localhost only axol serve --no-tls # plain HTTP instead of HTTPS sudo "$(command -v axol)" serve # hardware development (CAN setup, ZED daemon) ``` Run it with `sudo` so the panel can set up CAN and restart the ZED daemon. Datasets go to `$HF_LEROBOT_HOME`, or to the panel's **Dataset root** setting. When that folder is in a user's home, each recording is owned by that user after every episode save, as with the installed service. > [!TIP] > > For a walkthrough of the control panel, from connecting to Axol and assigning cameras to running each operation, see the [Web Control Panel guide](/guides/control-panel). | Flag | Description | | - | - | | `--host HOST` | Interface to bind. Default `0.0.0.0` (reachable on the LAN); use `127.0.0.1` for localhost only. | | `--port INT` | Port to listen on. Default `8001`. | | `--open` | Open a browser window on startup. Off by default. | | `--no-tls` | Serve plain HTTP instead of HTTPS. TLS is on by default. | > [!WARNING] > > `axol serve` is a trusted-LAN control service, not a multi-user authenticated API. Keep ports 8000/8001 behind the robot network or a host firewall; do not expose them directly to the internet. ## TLS TLS is **on by default**, so HTTPS pages such as the hosted VR app at `axol.almond.bot` can reach this machine. On first run a self-signed certificate is created in `~/.almond/vr/certs/`. VR teleop uses the same certificate, so accepting it once covers both. To connect from a browser on another machine, open the printed **LAN** URL once and accept the certificate warning. Pass `--no-tls` to disable TLS entirely (plain HTTP). ## Building the web UI The server looks for the built web UI at `web/app/dist`, which exists only in a repo checkout. Without it, `axol serve` still runs and the **API is available**. Use the hosted UI at [axol.almond.bot](https://axol.almond.bot), which connects to the server directly. To serve the UI locally instead, build it once: ```bash theme={null} cd web npm install npm run build --workspace=packages/axol-vr-client npm run build --workspace=app ``` For details, see [Build the web UI](/advanced/development-install#build-the-web-ui) in the development install guide. ## What it serves | Path | Description | | - | - | | `/control` | The control panel UI (operations, connections, settings). | | `/diagnostics` | The [diagnostics dashboard](/guides/diagnostics-dashboard): live motor data, health tiles and diagnostic scripts. | | `/vr` | The [VR teleop interface](/guides/vr-interface). | | `/` | Sends headset browsers to `/vr` and everything else to `/control`. | | `/api/*` | JSON + WebSocket API used by the UI. | > [!NOTE] > > Operations launched from the panel run inside the `serve` process, the same way as the [`teleop`](/cli/teleop), [`gravity-comp`](/cli/gravity-comp), [`waypoints`](/cli/waypoints), [`jog`](/cli/jog), [`collect-data`](/cli/collect-data), [`replay-dataset`](/cli/replay-dataset) and [`run-policy`](/cli/run-policy) commands. Anything those commands need on the host is needed here too: CAN, the `lerobot`, `sim` and `tracker` extras, and ZED access. # teleop Source: https://docs.almond.bot/cli/teleop Launch a VR teleoperation session on the robot or simulator. Launches a VR teleoperation session. On start it prints the robot's hostname (`.local`) and local IP address. Enter either one in the VR app at [axol.almond.bot](https://axol.almond.bot) to connect. Teleop runs on the real robot by default. Pass `--sim` to use the browser visualizer instead. On hardware, the `axol-rt` realtime core runs the arms at 240 Hz with the default impedance controller. With `--axol.controller position` it runs at 400 Hz, and each joint uses its motor's firmware position loop (see `controller` in the [robot config](/cli/configuration)). The table below lists the common flags. Every field of the nested `axol`, `teleop`, `kinematics`, `vr_server` and `cart` configs is listed with its default in [Teleoperation Config Parameters](/operations/teleop-config). See [Command configuration](/cli/configuration) for the syntax. > [!TIP] > > For a step-by-step walkthrough, including the VR controller layout, see the [Teleoperation guide](/operations/teleop). > [!WARNING] > > **Before opening the VR app**, accept the self-signed HTTPS certificate in the VR browser. Go to `https://.local:8000` or `https://:8000` and proceed past the security warning. > [!NOTE] > > **Network tip:** If VR tracking feels jittery or packets arrive in bursts, set these on your router or access point: > > * **DTIM interval**: `1` > * **Beacon interval**: `100` ms > * **WMM APSD (U-APSD)**: disabled > > With these settings the access point stops holding packets between beacons, which delays VR traffic. | Flag | Description | | - | - | | `--sim` | Run in the browser visualizer instead of on the robot. A bare `--sim` works, as does `--sim true`. | | `--mantis` | Drive the two Mantis grippers from the rig triggers. Nothing else starts. See [Mantis grippers](#mantis-grippers). Can't be combined with `--sim`. | | `--arms BOOL` | Drive the Axol arms (default: `true`). `false` drives only [Jelly](#jelly). Control panel: **Axol arms** on the Robot tab. | | `--left_channel ` | CAN channel for the left arm; `null` disables it. Default: `CAN_LEFT`. | | `--right_channel ` | CAN channel for the right arm; `null` disables it. Default: `CAN_RIGHT`. | | `--jelly.wheels BOOL` | Drive Jelly's wheels when their CAN interface is attached (default: `true`). Control panel: **Jelly wheels**. | | `--jelly.channel ` | CAN interface for Jelly's wheels; `null` disables them. Default: `can_alm_axol_b`, set by [`can.setup`](/cli/can-setup). | | `--jelly.lift BOOL` | Run Jelly's lift when its CAN bus is attached (default: `true`). Control panel: **Jelly lift**. | | `--jelly.lift_channel ` | CAN interface for the lift. Default `null` uses `can_alm_axol_c` if it exists, otherwise the wheel bus `can_alm_axol_b`. | | `--jelly.imu BOOL` | Use the carrier board's IMU to hold Jelly's heading while driving straight (default: `false`). | | `--jelly. VALUE` | Any other Jelly setting, such as `--jelly.max_speed` or the stick response curve `--jelly.stick_expo`. The full set is the `JellyConfig` dataclass, also shown under **Advanced** in the [control panel](/guides/control-panel#settings). | | `--axol.left_stiffness S` | Left arm stiffness, from `0` (fully hand-guidable) to `1` (default, the tuned production gains). A scalar (`0.8`) or one value per joint (`[1.0,1.0,0.8,0.8,0.5,0.5,0.2]`). See [`AxolConfig.left_stiffness`](/api/robot). | | `--axol.right_stiffness S` | Same, for the right arm. | | `--axol.left.gripper.torque_limit FLOAT` | Max torque (Nm) for the left gripper (default: 0.5, at most 5). Use `right` for the right gripper. | | `--axol.gripper TYPE` | Fitted gripper: `parallel` (default, the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Control panel: **Gripper** on the Robot tab. | | `--axol... VALUE` | Override a per-joint gain, e.g. `--axol.left.elbow.kp 60`. `` is `left` or `right`, `` is `shoulder_1` to `wrist_3`, and `` is `kp`, `kd` and so on. | | `--teleop.position_multiplier FLOAT` | Scale hand position by this factor (default: `1.0`). At `2.0` the arm moves twice as far as your hand, which helps cover the arm's full reach. | | `--teleop.rotation_multiplier FLOAT` | Scale hand rotation by this factor (default: `1.0`). At `2.0` the gripper turns twice as far as your wrist. | | `--teleop.absolute_mode true` | Track hand poses 1:1 in a fixed robot frame solved at engage, instead of moving relative to the engage pose. For sim demos of the mapping only. | | `--teleop.base_height H` | With `absolute_mode`, fix the robot base height above the tracking floor, in metres. | | `--teleop.reset_torque_threshold FLOAT` | Contact limit (Nm) for every return to rest (default: 6.0). `0` turns it off. See [Contact stops](#contact-stops). | | `--teleop.reset_gravity_comp_kd FLOAT` | Damping (Nm·s/rad) while the arms hang limp after a contact stop (default: 0.25). Same as [`gravity-comp`](/cli/gravity-comp) `--kd`. | | `--teleop.teleop_torque_threshold FLOAT` | Contact limit (Nm) while you drive the arms (default: `0`, off). The control panel suggests `16.0`. | | `--teleop.hold_to_engage BOOL` | `true` makes each grip a hold-to-move switch for its arm (default: `false`, toggle). See [Engaging](#engaging). | | `--teleop.haptics BOOL` | Vibrate each engaged arm's controller when the arm pushes on something (default: `true`). See [Controller haptics](/operations/teleop#controller-haptics). | | `--teleop.haptic_near BOOL` | Also tick the controller as its arm gets close to Axol's body (default: `false`). | | `--teleop.haptic_torque FLOAT` | Unexpected joint torque (Nm) at which a controller starts to rumble (default: `6.0`). `0` turns the push vibration off. | | `--teleop.haptic_held_load BOOL` | Keep the weight of a held object from making the controller rumble (default: `true`). The squeeze in box mode still rumbles. | | `--teleop.park_to_zero BOOL` | On **Stop** or `Ctrl+C`, move the arms from rest on to the all-zero pose before releasing the motors (default: `true`). See [Stopping parks the arms](/operations/teleop). | | `--teleop.reengage {clutch,ramp}` | What an arm does when you [re-engage](/guides/vr-interface#re-engaging) it (default: `clutch`). See [Engaging](#engaging). | | `--teleop.box_mode BOOL` | Start in [box mode](/guides/vr-interface#box-mode) (default: `false`). Parcel gripper only. See [Box mode settings](#box-mode-settings). | | `--teleop.ik_alpha FLOAT`, `--teleop.pose_cutoff FLOAT` | Pose and IK smoothing filters, which trade smoothness for latency (defaults: `0.3` / `2.5`). See [Latency tuning](/operations/teleop#latency-tuning). | | `--teleop.record PREFIX` | Record the teleop pipeline to `PREFIX_{ik,cmd,meas,rt}.npz` for [`diag.teleop-jitter`](/cli/diag-teleop-jitter) or [`motion.build`](/cli/motion-build). Unset records nothing. | | `--vr_server.interp_smooth_window_s FLOAT`, `--vr_server.interp_max_delay_s FLOAT` | VR pose smoothing window (default: `0.12`, which adds about 60 ms) and jitter-buffer cap (default: `0.15`). See [Latency tuning](/operations/teleop#latency-tuning). | | `--vr_server.interp_max_lag_s FLOAT` | Skip pose frames that arrive more than this many seconds late (default: `0.5`; `0` turns it off). After a Wi-Fi stall the arms hold, then follow your current pose. | | `--cameras DICT` | Map camera slots (`overhead`, `left_arm`, `right_arm`) to ZED serial numbers to stream them to the headset. Default: `{}` (no video). See [Camera streaming](#camera-streaming-to-the-headset). | | `--camera_eyes DICT` | Which eyes of a stereo camera to stream, by slot: `both`, `left` or `right`. Default: `{}`. | | `--resolution {SVGA,HD1080,HD1200}` | Capture resolution for all cameras. Default `null`: each camera's SDK default (HD1200 on GMSL). | | `--kinematics. VALUE` | Override an IK weight or solver setting, e.g. `--kinematics.pos_weight 100`. See [`almond_axol.kinematics`](/api/kinematics) for every field. | | `--vr_server.port INT` | Port for the VR WebSocket server (default: 8000). `--vr_server.certfile` and `--vr_server.keyfile` set a TLS cert; the default `null` uses a generated cert. | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. See [Command configuration](/cli/configuration). | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | To check the real control loop rate while teleop runs, open the [Diagnostics dashboard](/guides/diagnostics-dashboard#control-loop-and-can-timing). Its CAN timing graph shows command and feedback rate, jitter, response latency and missed 240 Hz deadlines. ```bash theme={null} axol teleop # real robot axol teleop --sim # browser visualizer axol teleop --axol.left_stiffness 0.8 axol teleop --axol.left.elbow.kp 60 --axol.right.gripper.torque_limit 0.7 axol teleop --teleop.position_multiplier 2.0 # scale hand motion 2x axol teleop --teleop.rotation_multiplier 2.0 # scale hand rotation 2x axol teleop --sim --teleop.absolute_mode true # generic absolute-mapping demo only axol teleop --mantis # Mantis rigs: triggers → grippers, no tracking axol teleop --left_channel null # disable the left arm axol teleop --arms false # drive only Jelly (no arms, no hub) axol teleop --jelly.wheels false # leave attached wheels cold (lift still runs) axol teleop --cameras "{overhead: 41234567, left_arm: 41234568, right_arm: 41234569}" axol teleop --cameras "{overhead: 41234567}" # stereo overhead auto-detected, per-lens axol teleop --config_path my_teleop.json # whole-config file axol teleop --no_settings # ignore ~/.almond/settings.json (panel settings) ``` ## Engaging With the default toggle scheme (`--teleop.hold_to_engage false`): * From rest, squeeze both grips to engage. * After that, each grip toggles its arm between tracking and frozen. With `--teleop.hold_to_engage true`: * Each arm moves only while you hold its grip. Either grip alone engages its arm, including from rest. * Releasing a grip freezes that arm, pose and grasp, where it is. * After a forced disengage (a reset, a dropped link or a contact stop), release a held grip once before it engages again. `--teleop.reengage` sets what happens when an arm re-engages after a freeze, a walk-away or being moved by hand: * `clutch` (default): the arm stays put, and your controller's current pose becomes its new origin. You match the arm. * `ramp`: the arm eases out to where your controller is, using the mapping from its last engage. The arm matches you. `--teleop.reengage_ramp_speed` sets the pace (default `0.15` m/s), and `--teleop.reengage_ramp_min_s` sets the shortest ramp (default `0.75` s). You can also switch it live with the headset's **Ramp** button or the control panel's **Session settings** card. A reset clears the saved mapping. Engaging in box mode ignores this setting. Leaving box mode in `ramp` blends both arms back to the mapping from before box mode. `--teleop.absolute_mode true` doesn't select a Mantis source or its mount transform, so it is not a test of physical alignment. To check alignment, run [`collect-data --mantis`](/cli/collect-data). ## Contact stops Two torque watchdogs stop the arms when they hit something. Each compares every joint's measured torque with the gravity model. When the difference stays above the limit, the move stops and the arms go limp in a gravity-compensation hold. Both work on hardware only. * **Return to rest** (`--teleop.reset_torque_threshold`, on by default): guards the startup move and every **X** reset. Free the arms by hand, then press **X** to plan the return from where they are. * **Tracking** (`--teleop.teleop_torque_threshold`, off by default): guards the arms while you drive them. A stop disengages tracking. Press **X** to return to rest, then engage again. The same setting applies to [`collect-data`](/cli/collect-data). Raise a limit if normal moves trip it. Set it to `0` to turn the watchdog off. ## Mantis grippers `axol teleop --mantis` drives only the two handheld grippers, from the rig triggers. It doesn't start tracking, the VR server, the tracker bridge, cameras or transforms. To record tracked Mantis data, use [`collect-data --mantis`](/cli/collect-data). * The grippers use the Mantis CAN channels saved in **Mantis settings** (default `can_mantis_l` and `can_mantis_r`). * Both triggers must be reading and released before the grippers turn on. Each gripper then opens fully to find its end stop. * If the trigger stream goes stale, the run stops. ## Box mode settings [Box mode](/guides/vr-interface#box-mode) needs the parcel gripper (`--axol.gripper parcel`). With the parallel gripper, box mode and its settings don't exist, and `--teleop.box_mode` is ignored with a warning. In box mode the grippers clamp a box between their flat faces, like two hands. One grip drives both arms as a pair, by position and rotation. The other grip takes over the lead. While a grip leads, the right thumbstick's forward and back sets the grip width. The rest of the thumbsticks drive Jelly as usual, led or frozen (see [Driving with the box](/guides/vr-interface#driving-with-the-box)). To switch box mode on or off during a session, press the headset's **Box** button, click both thumbsticks together, or use the control panel's **Session settings** card. The switch engages right away. | Flag | Description | | - | - | | `--teleop.box_lead_hand` | Hand that leads when box mode turns on: `right` (default) or `left`. | | `--teleop.box_grasp` | `straight` (default, fingers point straight forward) or `flush` (each gripper turned inward onto the plate's chamfer). Tap either stick click while leading to switch. Hold the click to run the lift instead. | | `--teleop.box_flush_deg` | How far the flush grasp turns each gripper inward (default: `39`°). | | `--teleop.box_face_left` / `box_face_right` | Which side of each gripper faces the box: `auto` (default), `+x` or `-x`. | | `--teleop.box_grip_tilt` | Fixed inward yaw trim in degrees (default: `0`). A calibration value, not a live control. | | `--teleop.box_width_speed` | How fast the right thumbstick changes the width (default: `0.08` m/s). | | `--teleop.box_width_min` / `box_width_max` | Width limits between the two contact faces (defaults: `0` / `0.70` m). The gripper bodies raise the minimum where needed. The parcel gripper's faces can close all the way together. | | `--teleop.box_align_duration` | Time to blend into the pair when box mode engages (default: `1.5` s). | | `--teleop.box_elbow_out` | How far out the elbows are held, in degrees from straight down (default: `0`, tucked beside the body). Live control: **Elbows out**. | | `--teleop.box_stow_height` | How far below the shoulders **A** stows the box, in meters (default: `0.15`). | | `--teleop.box_stow_reach` | Closest the stow brings the box to the shoulders, in meters forward of them (default: `0.15`). The arms stop further out if they can't reach that close. | | `--teleop.box_stow_speed` | How fast the stow moves the box, in m/s (default: `0.12`). | | `--teleop.box_elbow_weight` | Strength of the elbow hint (default: `10`). `0` turns it off, and **Elbows out** does nothing. | | `--teleop.box_squeeze_lean` | Lean each gripper into the box as you squeeze, so the face presses evenly from root to tip (default: `1`; `0` is off). Live control: **Squeeze lean**. | | `--teleop.box_squeeze_trim` | Largest extra inward turn, in degrees, added while squeezing to square each face to the box (default: `5`; `0` is off). Live control: **Squeeze trim**. | | `--teleop.box_squeeze_force` | Clamp force cap per arm, in N (default: `0`, off). With it off, nothing limits the clamp. Live control: **Squeeze force**. | | `--teleop.box_wrist_torque` | Torque cap (Nm) on `wrist_2` and `wrist_3` in box mode (default: `5`; `0` is off). It doesn't stop the width closing. Past about 39 N a side, the tip can unload onto the facet. | | `--teleop.box_squeeze_torque` | Torque cap (Nm) on the squeezing shoulder joints, `shoulder_2` and `shoulder_3` (default: `0`, off). It also slows the arms moving toward each other. Live control: **Squeeze cap**. | The wrist and shoulder torque caps work on hardware only. ## Camera streaming to the headset With `--cameras` set, teleop opens the ZED cameras attached to the robot by serial number and streams them to the headset over WebRTC. All feeds show at once, and you can move and resize each one with the controllers. See the [VR Interface guide](/guides/vr-interface#camera-views) for the layout. * Streaming needs `pyzed` ([`zed.install`](/cli/zed-install)) and the GStreamer hardware encoder stack ([`gst.install`](/cli/gst-install)). The hosted installer sets up both. * The headset stream runs at 30 fps. Cameras can capture faster for recording or policies. * Stereo ZED X cameras are detected from their serial number. A stereo overhead camera streams both eyes and shows each eye to its own lens. A stereo wrist camera streams one eye, like a mono camera. Use `--camera_eyes` to change this. * Without the GStreamer stack, teleop falls back to the ZED SDK. * If no hardware encoder is present, the video is encoded in software. Use `--resolution SVGA` in that case. The video runs in a separate process, so it doesn't slow the control loop. [`axol provision`](/cli/provision) pins the Jetson's encoder clocks to their maximum for low latency. ## Jelly When Axol is on **Jelly** (an omni-wheel base with a telescoping lift), you can drive it from the headset thumbsticks. The left stick moves. The right stick turns left and right, and runs the lift forward and back. For the full controls see the [VR interface guide](/guides/vr-interface#jelly). Teleop finds Jelly from the attached CAN devices: * It drives the wheels when their interface (`can_alm_axol_b`) exists. * It runs the lift when its bus exists (`can_alm_axol_c`, or the shared wheel bus). If the lift bus is down at start, the lift is disabled with a warning and the wheels still drive. * [`can.setup`](/cli/can-setup) and the control panel's CAN discovery set these names. Teleop brings Jelly's CAN up on start, so you don't need [`can.enable`](/cli/can-enable). To leave attached hardware off, pass `--jelly.wheels false` or `--jelly.lift false` (the control panel's **Jelly wheels** and **Jelly lift** switches). A policy never drives Jelly. Data collection records Jelly only with [Record Jelly](/operations/data-collection#record-jelly) on. `--arms false` drives only Jelly. Teleop doesn't start the arms or open the Axol hub's CAN bus, so the arms don't need to be connected. Teleop does the same, with a warning, when the arms' CAN interfaces are missing and Jelly's are present. If the switches leave nothing to drive, teleop stops with an error that starts with `Nothing to drive.` It lists each switch and whether its hardware is attached. When a switch is off but its hardware is attached, the error names that switch and its flag. Turn it on, then start teleop again. > [!NOTE] > > This command takes its config through draccus. Field names use underscores, nested fields are separated by dots, `None` is `null`, and lists use `[a,b,c]`. See [Command configuration](/cli/configuration). # tracker.* Source: https://docs.almond.bot/cli/tracker Commands and configuration files for Mantis tracking, including Lighthouse validation and recalibration. The `axol tracker.*` commands set up and check the trackers for [Mantis Tracking](/mantis/tracking). The **Tracking** section of the control panel's **Mantis settings** runs the same commands. This page lists their flags and file formats. For the setup walkthrough, see [Mantis Tracking](/mantis/tracking). | Command | Purpose | Panel equivalent | | - | - | - | | [`tracker.bridge`](#axol-trackerbridge) | Stream tracker poses and trigger values to the VR server. | Started and stopped by a Mantis collect-data run. | | [`tracker.identify`](#axol-trackeridentify) | Bind the powered trackers to the left and right rig. | **Identify trackers** | | [`tracker.pair`](#axol-trackerpair) | Pair a VIVE Tracker 3.0 with its Watchman dongle. | **Pair tracker** | | [`tracker.install`](#axol-trackerinstall) | Install libsurvive and the Vive udev rule. | **Install Lighthouse support** | | [`tracker.lighthouse.check`](#axol-trackerlighthousecheck) | Check which base stations and trackers are reporting. | **Check base stations** | | [`tracker.lighthouse.validate`](#axol-trackerlighthousevalidate) | Check tracking quality with guided holds and a sweep. | **Validate tracking** | | [`tracker.lighthouse.calibrate`](#axol-trackerlighthousecalibrate) | Recalibrate the base stations, then validate. | **Recalibrate Lighthouse** | When you run `axol collect-data --mantis true` from the command line, it uses the tracking source, bindings and Quest calibration saved in the panel. It starts the bridge and runs the same readiness checks as the panel. * Don't start a second `tracker.bridge` next to a collection run. It can't take control of the poses. * `axol teleop --mantis` doesn't use tracking. It drives the grippers from the rig triggers over CAN. * Quest uses none of these commands. The headset is the pose source, and you choose its calibration in the panel. * Collect DAgger and Run Policy don't support Mantis. ```bash theme={null} # One-time: bind physical trackers to sides. axol tracker.identify --backend survive # One command owns both the operation and its bridge. axol collect-data --mantis true --repo_id myorg/bringup --task test \ --mantis_allow_uncalibrated true # bring-up capture only, not training data ``` ## `axol tracker.bridge` Streams each tracker's pose and each side's trigger value to the VR server as `VRFrame` messages. | Flag | Description | | - | - | | `--backend {survive,synthetic,static}` | Tracker backend. Default: the saved config, else `survive`. `synthetic` streams generated motion and `static` holds fixed poses, for tests without trackers. | | `--left KEY` / `--right KEY` | Override the saved binding: a Lighthouse serial such as `LHR-E0FCD01B`. | | `--host HOST` | VR server host, the computer running teleop or collect-data. Default: `localhost`. | | `--port INT` | VR server port. Default: 8000. | | `--hz FLOAT` | Frame rate. Default: 120. | | `--trigger-can-left IFACE` / `--trigger-can-right IFACE` | CAN interface of that side's trigger. Default: the saved config, else `can_mantis_l` / `can_mantis_r`. | How the bridge handles problems: * **A tracker loses tracking.** That side holds its last good pose and logs a warning. * **A trigger stops sending** for about 250 ms. That side holds its last grip command and logs the dropout. * **`survive-cli` crashes.** The bridge restarts it after about a second. The rigs hold still until both trackers report again. More than 3 crashes in a minute stops the bridge, and the error shows the last lines of `survive-cli`'s output. * **A tracker drops off USB.** The bridge restarts `survive-cli` every 5 seconds, for up to 60 seconds, until every tracker reports again. After tracking comes back in a collection run, the bridge waits for both trackers, then for the two-trigger start gesture, before the arms follow again. If a trigger is missing, the collection run fails its readiness check. A bridge you start yourself has keyboard controls: **Enter** engages or disengages, **r** returns to rest, and **q** quits. If a trigger is missing, it warns and keeps that gripper fully open. ### Hardware-free protocol demo To try the bridge without Mantis, run the sim and a static bridge: ```bash theme={null} axol teleop --sim --teleop.absolute_mode true # terminal 1 axol tracker.bridge --backend static # terminal 2 ``` Press **Enter** in the bridge terminal to engage. The simulated arms stay at the static poses. This tests only the connection to the VR server and IK. It is not an [acceptance check](/mantis/tracking#acceptance). The `static` and `synthetic` backends don't need `tracker.identify`. ## `axol tracker.identify` Finds the powered trackers, then asks you to move each rig in turn. The tracker that moves most is bound to that side. For Lighthouse, it first runs the same check as `tracker.lighthouse.check` and won't bind while two base stations share a channel. | Flag | Description | | - | - | | `--backend {survive,synthetic}` | Backend to use and save. Default: the saved config, else `survive`. | Saves `~/.almond/tracker/config.json`: ```json theme={null} { "backend": "survive", "left": "LHR-E0FCD01B", "right": "LHR-BDD65467", "bindings": { "survive": {"left": "LHR-E0FCD01B", "right": "LHR-BDD65467"} }, "expected_base_stations": 2, "lighthouse_quality": "standard" } ``` **Check base stations** sets `expected_base_stations` (`--expected_stations`). `lighthouse_quality` is the [Lighthouse tracking policy](#lighthouse-tracking-policy). Lighthouse trackers are bound by serial number. libsurvive's device names (`WM0`, `WM1`) can swap between runs, so Axol clears a saved binding that uses one. Run **Identify trackers** once to bind by serial. ## `axol tracker.pair` Pairs one VIVE Tracker 3.0 with its Watchman dongle. Unplug the tracker from USB and make sure it is blinking blue. Run it once for each tracker and dongle. A dongle can pair only when no tracker is connected to it. If every dongle already has a powered tracker, the command says they are already paired. To pair a different tracker to a dongle, switch off the tracker that is paired to it first. ## `axol tracker.install` Installs a tested build of [libsurvive](https://github.com/collabora/libsurvive) (commit `f1e6eddb669320f2a30760f4b42936bdb4306da0`) with Almond's fixes, plus the Vive udev rule. [`axol provision`](/cli/provision) runs it for you. Run it again to repair the install. ```bash theme={null} axol tracker.install ``` Almond's fixes are in `almond_axol/tracker/libsurvive_patches/`. They fix crashes with three or four base stations and during long sessions, deliver poses without delay, and add the [strict tracking policy](#lighthouse-tracking-policy). Under the standard policy, libsurvive tracks as it normally does. If the build is already current, `tracker.install` only refreshes the udev rule and checks the installed files. After you update Axol, stop collection, install the updated runtime, and restart the service: ```bash theme={null} axol tracker.install sudo systemctl restart axol ``` **Install Lighthouse support** in the control panel runs the same installer. If you use the [strict tracking policy](#lighthouse-tracking-policy), run **Recalibrate Lighthouse** and complete its validation before you collect. A libsurvive you build yourself, or separately installed Python bindings, won't work in its place. > [!NOTE] > > Close SteamVR if it is running, because it competes for the trackers. ## Lighthouse tracking policy `lighthouse_quality` in [`~/.almond/tracker/config.json`](#axol-trackeridentify) sets how strictly Axol checks Lighthouse tracking. In the control panel it is **Tracking policy**, under **Mantis settings**. It applies to collection, the tracker bridge, **Check base stations** and **Identify trackers** on this computer. | | `standard` (default) | `strict` | | - | - | - | | Base station calibration | libsurvive keeps refining it and saves it. A new or moved setup calibrates during **Check base stations** and **Identify trackers**. | Changes only during **Recalibrate Lighthouse**. | | Before collecting | **Validate tracking** is optional. | A passing validation from the last 12 hours is required. | | While collecting | The episode QA gate (`--qa_gate`) judges each take. | Axol watches tracking live. Any tracking fault marks the take for a retake, even with `--qa_gate false`. | Under `standard`, a passed check shows as **Last check passed 10 min ago. Calibration refined since then.**, because libsurvive keeps refining the calibration. Choose `strict` for a fixed installation whose base stations never move, where you'd rather retake than keep a slightly worse take. Choose `standard` for portable setups, rooms with two base stations, and bring-up. Change the policy only while no operation is running. ## `axol tracker.lighthouse.check` ```bash theme={null} axol tracker.lighthouse.check --expected_stations 3 ``` Hold both trackers still and in view of the base stations. The check listens for about 20 seconds. On a new computer, or after you add or re-channel a base station, it can take a minute or more for the trackers to start reporting. The check keeps listening for up to 150 seconds until both do. It prints each base station channel the trackers received, with the station serial numbers, and the trackers that are reporting. It fails, and says how to fix it, when: * two base stations share a channel * it sees fewer base stations than you expect * fewer than two trackers report Only base stations heard during the check count. If the station on a channel isn't the one that was there last time, the check says so. With two base stations, that means both are set to that channel. The result is saved to `~/.almond/tracker/lighthouse_survey.json`. The panel needs a passing check before the **Trackers** step. Under the strict policy, the check never calibrates. On a new computer, or after you add or re-channel a base station, run **Recalibrate Lighthouse** first. The base station calibration lives in libsurvive's file `~/.config/libsurvive/config.json`, or under `$XDG_CONFIG_HOME` when that is set. The service, which runs as root, uses `/root/.config/libsurvive/config.json`. ## `axol tracker.lighthouse.validate` ```bash theme={null} axol tracker.lighthouse.validate --expected_stations 3 ``` Stop collection and any other tracker command first. Then: 1. Put both identified rigs **still on the table**, with their trackers in view. 2. Follow the prompts: a **5-second hold**, a **12-second slow sweep** through the workspace (at least **10 cm and 15° per rig**), and a **5-second hold** at another position. Move only during the sweep. The check covers base station reception, how steady each tracker is when still, and smooth tracking through the workspace. It doesn't certify absolute accuracy, or that tracking will stay reliable later. Before the measurements start, the trackers can take **up to two minutes** to pick up every base station. Keep both trackers in view and let the check continue. Restarting it starts that wait over. If it times out, it says what is missing and leaves the calibration unchanged. | Flag | Description | | - | - | | `--expected_stations INT` | Number of base stations, 1 to 4. Saved for future checks. Default: the saved setting. | | `--web-prompts` | Use the control panel's prompts. The panel passes this for you. | Under the [strict policy](#lighthouse-tracking-policy), validate before the first session each day. A report expires after **12 hours**, or sooner if the setup changes. If validation fails, fix the visibility, base station or identity problem and run it again. If the report asks for recalibration, run **Recalibrate Lighthouse**, because validation alone can't clear that fault. This command never changes the calibration. ## `axol tracker.lighthouse.calibrate` ```bash theme={null} axol tracker.lighthouse.calibrate --expected_stations 3 ``` Run it after a base station or tripod moves, or when tracking seems wrong. It takes the same flags as `tracker.lighthouse.validate`. 1. Rest both rigs at **three different positions and orientations, for eight seconds each**, when prompted. Keep the tracker sensors in view. 2. Complete the same hold, sweep and hold as `tracker.lighthouse.validate`. The new calibration replaces the old one only if the validation passes. If any step fails, the procedure stops, the previous calibration stays, and the error names the failed step. With both sides already identified, a passing recalibration counts as a validation, so you don't need to validate again. If **Identify trackers** can't finish because tracking is unstable, you can recalibrate before you identify sides. It must find two trackers. When it succeeds, the panel shows **Calibration saved. Identify sides, then validate tracking.** Recording stays blocked until **Identify sides** and **Validate tracking** pass. Recalibrating changes the base station calibration, not the tracker-to-gripper transform. It doesn't change recordings you already made. Run the dynamic [acceptance checks](/mantis/tracking#acceptance) before your next collection. ## Transform file `~/.almond/mantis/tcp_transform.json` holds measured tracker-to-gripper transforms for each side, keyed by the identified device. Axol has built-in factory values for the standard Tracker 3.0 mount and for Quest 3 Touch Plus controllers (`quest:meta-quest-touch-plus:grip`). It uses a factory value when no conflicting entry is saved. A saved entry overrides the factory value. Other Quest controllers have no factory value and need an entry for both sides. ```json theme={null} { "left": { "survive:LHR-E0FCD01B": {"pos": [0.0, 0.0, 0.0], "quat": [0.0, 0.0, 0.0, 1.0]}, "quest:oculus-touch-v3:grip": {"pos": [0.0, 0.0, 0.0], "quat": [0.0, 0.0, 0.0, 1.0]} }, "right": { "survive:LHR-87654321": {"pos": [0.0, 0.0, 0.0], "quat": [0.0, 0.0, 0.0, 1.0]}, "quest:oculus-touch-v3:grip": {"pos": [0.0, 0.0, 0.0], "quat": [0.0, 0.0, 0.0, 1.0]} } } ``` The values above are placeholders, not a usable calibration. Replace each key with the identifier from `~/.almond/tracker/config.json`, or the Quest key the panel shows, and each value with your measurement. * `pos` is the gripper TCP origin in the tracker's frame, in **metres**. * `quat` is the TCP orientation in the tracker's frame, as **`[qx, qy, qz, qw]`**. It is normalized when loaded. You can also write the file with `PUT /api/tracker/calibration/`. The control panel doesn't edit it. Rules Axol applies when it loads the file: * **Quest** collection needs a `quest::grip` entry on both sides, or the built-in Quest 3 Touch Plus value. A bare `quest` key, a different controller profile, missing profile details or a `target-ray` entry is refused. * An unkeyed entry, a bare `survive` key, or an entry for a tracker you no longer use also blocks the factory value for that side until you re-key or delete it. * Production `collect-data` needs a saved device entry or a factory value on both sides. Use `--mantis_allow_uncalibrated true` only for a calibration capture that won't be used for training. ### Tracker 3.0 factory value The VIVE Tracker 3.0 sits flat on top of the rig, behind the gripper motor. It uses the rotation **`Ry(180°)`**, stored as the quaternion `[0, 1, 0, 0]`. The tracker's +z axis points along the gripper fingers (gripper −z), its +x axis along the gripper's −x, and the y axes match. Positions are given in the gripper frame, whose origin is the center of the gripper motor's mounting face: | Tracker | Tracker origin in the gripper frame | Stored value, both sides | | - | - | - | | Tracker 3.0 | `[0, −35, 47]` mm: 47 mm behind and 35 mm above the motor face | `[0, 0.035, 0.047, 0, 1, 0, 0]` | > [!WARNING] > > Datasets recorded with `axol` 0.2.4 or older store gripper orientations rotated about 90° from how the rig was held, and Axol can't replay them. Repair them with [`axol migrate-dataset --mantis-tcp-rotation`](/cli/migrate-dataset#mantis-tracker-gripper-rotation). `collect-data` won't add episodes to a dataset that hasn't been repaired. > > Datasets recorded with `axol` 0.2.5 to 0.2.16 place the tracker 92 mm in front of the gripper instead of 47 mm behind it. Their `meta/axol.json` records `vive-flat-back-ry180-v0.2.5` as the `mantis_tcp_transform` id, and `collect-data` won't add episodes to them. ### Quest factory value Quest 3 Touch Plus controllers (`quest:meta-quest-touch-plus:grip`) sit in standard cradles. Their grip origin is at `[0, −45, 62]` mm in the gripper frame, 62 mm behind and 45 mm above the motor face. The grip axes are turned 180° about the gripper's z axis, with a cradle tilt of about 10°. The left cradle mirrors the right, so the tilt mirrors too: | Side | Stored value | | - | - | | Right | `[-0.00942, -0.03804, -0.06583, 0.06655, -0.05350, 0.99629, 0.01054]` | | Left | `[0.00942, -0.03804, -0.06583, 0.06655, 0.05350, -0.99629, 0.01054]` | Other controllers need a measured entry. ### Deriving a missing constant If you have no transform for your source, such as a Quest controller other than the Touch Plus or a Tracker 3.0 on a non-standard mount: 1. Pass the [acceptance checks](/mantis/tracking#acceptance) for side, scale and recovery. 2. Record a short capture with `--mantis_allow_uncalibrated true`. 3. Work out the transform from that capture, and save it under the exact source and device key. 4. Repeat the loss and recovery check. `collect-data --mantis` stays blocked until both sides have a transform. Never use an uncalibrated capture as training data. # tune.a4 Source: https://docs.almond.bot/cli/tune-a4 Tune a joint's firmware position loop (0xA4) with a sine or constant-speed triangle. Tunes the firmware position loop of one joint. This is the controller a joint runs when its `wire_mode` is `a4` (see the [config reference](/cli/configuration)). The tool streams a sine or a constant-speed triangle to the joint with the firmware gains, speed cap and planner acceleration you choose. It scores how well the joint tracks and how smoothly it creeps, and saves the run for the diagnostics dashboard (**Tuning → Firmware loop**). You can also run it from the dashboard (`axol serve`). [`tune.pid`](/cli/tune-pid) tunes the impedance (MIT) controller instead. Under 0xA4 the motor runs its own cascade of position, speed and current loops, so the settings here are: * the firmware gains (`position_kp`, `position_ki`, `position_kd`, `speed_kp`, `speed_ki`, `current_kp`, `current_ki`) * the speed cap (`--cap`) * the position planner's acceleration (`--accel`) ## Planner acceleration Use one of two values for `--accel`. Try both and compare. | `--accel` | Behavior | | - | - | | `0` | The loop tracks the streamed target directly. | | `60000` | The protocol maximum. The planner finishes each streamed step within one tick. | Any value in between re-plans every streamed target, and the joint will not follow the wave. ## Reading the results The triangle runs every pass at one slow speed, so it shows stick-slip along the whole pass and not only at the turnarounds. Compare runs on these scores: * **Velocity ripple**: the spread of measured minus commanded velocity, divided by the commanded speed. Under 0.2 is smooth. Stick-slip reads near 0.8. * **Stuck windows**: the share of 50 ms windows in which the joint stayed put while the target moved. * **1–4 Hz error band**: tracking error in the band where stick-slip shows up. * **Lag**: how far the joint trails the target. * **>10 Hz buzz**: fast vibration. ## Safety * Gains are written to RAM unless you pass `--persist`. When the run ends, the tool writes back the values the motor had before. Pass `--keep` to leave the run's values in place. * A buzz guard stops the run on fast position motion or high current and restores the previous gains. Start each sweep from the stock values and change them in small steps. Large steps can make the joint vibrate. * In this mode the joint holds position stiffly and pushes back against contact with full motor torque. Keep the workspace clear and the E-Stop within reach. | Flag | Description | | - | - | | `--l` / `--r` | Arm side (required) | | `--channel IFACE` | SocketCAN interface override | | `--joint JOINT` | The joint to tune (required). `shoulder_1` to `wrist_1` run 0xA4, and the Damiao `wrist_2` and `wrist_3` run their position-velocity mode. | | `--mode sine\|triangle` | Wave shape (default: `triangle`) | | `--center DEG` | Center of the wave, joint-frame degrees (default: midpoint of the safe range) | | `--amp DEG` | Half-travel, degrees (default: 10) | | `--freq HZ` | Sine frequency (default: 0.3) | | `--speed DPS` | Triangle pass speed, deg/s (default: 3) | | `--duration S` | Seconds of wave (default: 12) | | `--rate HZ` | Command rate (default: 400, the rate the realtime core streams `a4` joints at). Tune at the rate you will run. | | `--cap DPS` | 0xA4 speed cap (default: 60) | | `--cap-track K` | Set the speed cap to `K` times the commanded speed, between `--cap-floor` and `--cap` (default: 0, a fixed cap). Use `1.1` to `1.2` with `--accel 60000` to keep the joint moving smoothly. | | `--cap-floor DPS` | Lowest cap `--cap-track` may set, so a stopped or reversing target can still correct (default: 1) | | `--lead-ms MS` | Send each target this many milliseconds ahead along the wave, 0 to 50 (default: 0). The run is still scored against the true wave. | | `--accel DPS/S` | Planner acceleration for the run, `0` or `60000` (see above). Written to ROM and restored afterwards unless `--keep` (default: leave the stored value). | | `--position-kp`, `--position-ki`, `--position-kd`, `--speed-kp`, `--speed-ki`, `--current-kp`, `--current-ki` | Firmware gains for the run (default: leave as is). The tool prints the motor's current values at start. | | `--pose JOINT=DEG` | Hold another joint at this joint-frame angle during the run, with the same rules as [`tune.pid`](/cli/tune-pid). Repeatable. | | `--held-gain [SIDE.]JOINT.GAIN=VALUE` | Set a held joint's firmware gain for the run, in RAM. Repeatable. | | `--dm-acc RAD_S2` | Damiao wrists only: the profiler's acceleration and deceleration for the run, restored afterwards unless `--keep` | | `--persist` | Write gains to ROM instead of RAM | | `--keep` | Leave the run's gains and planner acceleration in the motor | | `--buzz-abort DEG` | Stop past this much >10 Hz position motion, degrees RMS over 0.1 s (default: 0.3; 0 turns it off) | | `--iq-abort A` | Stop past this motor current (default: 30; 0 turns it off). Keep it well above the current the pose needs to hold the arm up. | | `--tf-probe PCT` | Measure the motor's rated current instead of running the wave (see below) | | `--no-imu` | Skip the wrist IMU. By default each run gets an `imu` shake score (see [`tune.motion`](/cli/tune-motion)). | | `--save-run` | Save the run for the diagnostics dashboard | | `--label TEXT`, `--group ID` | Note and sweep ID stored on the run | ```bash theme={null} axol tune.a4 --r --joint shoulder_1 --center -35 --amp 10 --mode triangle --speed 3 --accel 0 --save-run axol tune.a4 --r --joint shoulder_1 --accel 0 --speed-kp 0.05 --speed-ki 0.0005 --save-run --label "skp 0.05" axol tune.a4 --r --joint shoulder_1 --mode sine --freq 0.3 --accel 0 --position-kp 0.02 --save-run ``` ## Tuning in the working pose A firmware loop that is well damped with the arm hanging can oscillate with the arm extended. Use `--pose` to hold the other joints in the worst-case pose you will run. The tool samples every held joint during the wave and reports how far it drifted and how much it shook (`metrics.held` in the saved run). ## Damiao wrists `wrist_2` and `wrist_3` run the same kind of cascade, with fewer gains: `position_kp`, `position_ki`, `speed_kp` and `speed_ki`. Their position is 16-bit, and the current columns show torque in Nm. Their profiler always shapes the target. The stock profiler setting, 2 rad/s² (about 115°/s²), is too slow to follow a streamed target, so set a higher one with `--dm-acc`. ## Rated current probe `--tf-probe PCT` holds the joint at `--center` on 0x73 (position control with torque feed-forward). It then steps the feed-forward between 0, +PCT, 0 and −PCT percent of rated current, 0.25 s each, for 8 s. From the current jump at each step it prints the motor's rated current. Enter that value as `firmware.tf_rated_current_a` in the config. `5` is a gentle setting, about 1 Nm on a shoulder. The probe needs MyActuator V4.4 firmware. Run it with `--accel 0`. > [!NOTE] > > You don't have to persist a winning set from here. The robot config carries per-joint `firmware.*` gains (see the [config reference](/cli/configuration)), and the robot writes any that differ to the motor when it enables the joint. Every joint's `firmware` block is empty by default, because the arms run impedance control. To try gains in an `a4` run, use `tune.motion --gain SIDE.JOINT.firmware.FIELD=VALUE` or set them in your config. > [!WARNING] > > A joint left with planner acceleration 0 moves to any stored position target at the speed cap as soon as it wakes. `tune.a4` restores the stored acceleration unless you pass `--keep`. If you keep it, don't send that joint any other position command until you have set it back. # tune.breakaway Source: https://docs.almond.bot/cli/tune-breakaway Measure a joint's static (breakaway) friction and compare it with its sliding friction. Measures the torque at which a stationary joint starts to move, in both directions. This is the joint's static or **breakaway** friction. The tool compares it with the sliding friction `fc` that the friction model already holds. A joint stick-slips when its breakaway friction is higher than its sliding friction. While it tracks a slow target, it sticks until the position error builds enough torque to break it free, then it overshoots and sticks again. [`tune.friction`](/cli/tune-friction) can't measure this gap, because its model has no separate static term. This command measures it directly. ## How it works For each pose: 1. The arm homes and moves to the same safe clearance pose as [`tune.friction`](/cli/tune-friction). 2. The test joint moves to the pose, then drops its position spring (`kp = 0`). Only a small damping and the gravity feed-forward hold it. 3. The tool trims the gravity feed-forward until the joint stands still. 4. It ramps an extra torque up and back down. The first motion past `--move-deg` counts as the release, and the tool records the torque at that moment. The joint is then caught and returned to the pose. Each attempt ramps a little higher and the run stops at the first release, so the joint never sees more torque than it took to move it. ## Reading the results The report gives: * **F\_static**: the breakaway friction, averaged over both directions. * **`F_static / fc`**: how much higher breakaway is than sliding friction. * **Predicted stair**: `(F_static − fc) / kp`, in degrees. Compare it with the steps a slow [`tune.motion`](/cli/tune-motion) replay shows. * **`stiction_gain` ceiling**: `F_static / fc − 1`. Compensation above this makes the joint hunt around its target at rest. Start at 60 to 80% of the ceiling. | Flag | Description | | - | - | | `--l` / `--r` | Arm side (required) | | `--channel IFACE` | SocketCAN interface override for setups without the Axol hub adapter | | `--joint JOINT` | `shoulder_1`, `shoulder_2`, `shoulder_3`, `elbow`, `wrist_1`, `wrist_2`, `wrist_3` (required) | | `--poses DEG [DEG ...]` | Joint-frame poses to probe, in degrees with 0 at rest (default: 0). Joints that could reach the base are kept 5° clear of it. | | `--trials N` | Releases per direction (default: 3) | | `--ramp-s S` | Seconds for one up-and-back torque ramp (default: 4) | | `--max-torque M` | Largest ramp peak, as a multiple of the joint's `fc` (default: 3.0). At least 0.2 Nm on the wrists. | | `--move-deg DEG` | Motion that counts as a release (default: 0.06) | | `--kd KD` | Damping while the position spring is off, so a released joint creeps instead of running (default: 1.0) | | `--csv PATH` | Write every ramp sample (`t, extra_nm, pos_deg, tau_nm`) to a CSV for plotting | ```bash theme={null} axol tune.breakaway --r --joint shoulder_1 axol tune.breakaway --r --joint shoulder_2 --trials 5 --csv ~/breakaway-s2.csv axol tune.breakaway --r --joint shoulder_1 --poses -30 0 30 # load dependence ``` > [!NOTE] > > The test joint spends most of the run with no position spring. Only the trimmed gravity feed-forward and light damping hold it. Keep the space around the arm clear and the E-Stop within reach. # tune.factory Source: https://docs.almond.bot/cli/tune-factory Calibrate friction and gravity for all 14 joints in one run, and share the result. Calibrates friction ([`tune.friction`](/cli/tune-friction)) and gravity ([`tune.gravity`](/cli/tune-gravity)) for all 14 joints, both arms times seven, in one command. You can also run it from the diagnostics dashboard (`axol serve`). For a step-by-step walkthrough, see [Calibrating Axol](/guides/axol-calibration). Each joint sweeps back and forth at several speeds. From one sweep the tool fits both the joint's friction and the center of mass of the link it moves. * **Time:** about 6 minutes per joint, about 1.5 hours for both arms. * **Order:** each arm runs from `wrist_3` to `shoulder_1`. Each joint's fit is saved before the next joint sweeps, so the shoulder fits use the corrected wrist and elbow values. * **Poses:** the clearance and gravity-load poses are the same as in [`tune.friction`](/cli/tune-friction) and [`tune.gravity`](/cli/tune-gravity). The default `slow` profile calibrates friction for slow, smooth motion. On `shoulder_1`, `shoulder_2` and `elbow`, a slow-profile calibration also switches the joint to stiffer [slow-motion gains](/operations/teleop-config). A joint without one keeps the standard gains. ## Where the results go The results are saved to `~/.almond/calibration.json`, and this computer uses them right away. They are also uploaded under the serial number of Axol's hub, which stays with the arms when you swap the computer. The upload needs a write key in `.env`: ```bash theme={null} # .env on the computer you calibrate from AXOL_SUPABASE_KEY= ``` Without a key, the run calibrates this computer only and tells you so. Downloading needs no key. The upload merges with what is already stored, joint by joint: * A one-arm run keeps the other arm's values. * A joint whose gravity fit is rejected keeps its earlier `com` and `mass`. * An interrupted run keeps and uploads every joint that finished. ## Custom end-effectors The gravity fit keeps each link's mass fixed and fits only its center of mass. The gripper and everything mounted on it count as the `wrist_3` link, including wrist cameras and their brackets. The stock mass, 0.75 kg, includes the Camera Kit wrist camera and its mount. With the parcel gripper the default is 0.6 kg. If you change the weight on the wrist, give the new `wrist_3` mass before you calibrate. Otherwise the extra weight is spread over the wrong links. Set the mass in one of two places: * In the control panel, under **General settings → Advanced**, in the `wrist_3` row of each arm's table. The run uses this mass for its fits and saves it with the calibration. * On the command line, with `--mass wrist_3=`. This overrides the panel setting. `--com` optionally sets a starting center of mass, in metres, in that arm's URDF link frame. A center of mass set in the panel overrides the fitted one when Axol runs, so the run warns you about it. Clear it in the panel, or use [`--keep-gravity`](#keeping-a-hand-tuned-gravity-model). The mass and center of mass are written to `~/.almond/calibration.json` before the sweeps, so every fit uses them. They are uploaded with the calibration even if a fit fails. To go back to the standard gripper and Camera Kit wrist camera, pass the stock mass (`--mass wrist_3=0.75`) and calibrate again. * A `--mass` without a side applies to every arm being calibrated. * `--com` must name its side (`left.` or `right.`), because the arms are mirror images. * An arm that isn't being calibrated, an unknown joint, or a mass of zero or less is an error, reported before anything moves. ```bash theme={null} axol tune.factory --mass wrist_3=0.78 # other wrist cameras on both arms axol tune.factory --mass left.wrist_3=1.1 --com left.wrist_3=-0.03,0,-0.14 # one arm, seeded CoM ``` A few rejected gravity fits are normal, mostly on `elbow` and `wrist_1`. For a step-by-step walkthrough, and when a rejected fit needs attention, see [After you change the end-effector or add cameras](/guides/axol-calibration#after-you-change-the-end-effector-or-add-cameras). ### Keeping a hand-tuned gravity model If you set link masses or centers of mass by hand in the control panel (**General settings → Advanced**), run with `--keep-gravity`. The run then fits friction against your settings and doesn't fit or save any mass or center of mass. `--mass` and `--com` still take priority over the settings. Without the flag, the run uses the masses from your settings, fits each center of mass, and warns you about any center of mass set in the settings. ```bash theme={null} axol tune.factory --keep-gravity ``` The saved calibration holds `friction`, `mass` (kg) and `com` for each joint: ```json theme={null} { "version": 1, "hub_serial": "004800345542501420373234", "left": { "wrist_3": { "friction": {"fc": 0.12, "k": 900.0, "fv": 0.05, "fo": -0.02}, "mass": 1.1, "com": [-0.03, 0.0, -0.14] } } } ``` | Flag | Description | | - | - | | `--arms {both,left,right}` | Which arms to calibrate (default: both) | | `--left-channel IFACE` / `--right-channel IFACE` | CAN interface overrides (default: the Axol hub's interface names) | | `--profile {slow,standard}` | `slow` (default) calibrates friction for slow motion. `standard` is a quicker 7–72°/s sweep without the slow-speed and load terms. | | `--velocities DEG_S …` | Sweep speeds in deg/s (default: `1 2 3 5 8 15 30` for slow, `7.2 18 36 54 72` for standard) | | `--stribeck-gain G` | Share of the extra low-speed friction to cancel, saved for every joint (default: 0.8 on `shoulder_1`, `shoulder_2` and `elbow`, 0 elsewhere) | | `--raw-dir DIR` | Save each joint's raw sweep samples to `DIR/-.csv`. Refit them later with `tune.friction --fit-csv`. | | `--hub-serial SERIAL` | Robot identity for the upload (default: the attached hub's USB serial) | | `--keep-gravity` | Keep the [hand-tuned gravity model](#keeping-a-hand-tuned-gravity-model) from the panel settings. Saves friction only. | | `--mass [SIDE.]JOINT=KG` | Link mass for a [custom end-effector or wrist camera](#custom-end-effectors). Overrides the mass in the panel settings. Repeatable. | | `--com SIDE.JOINT=X,Y,Z` | Starting link center of mass in metres, uploaded as given if the fit is rejected. Repeatable. | > [!NOTE] > > The calibration tools (`tune.factory`, `tune.friction`, `tune.gravity`, `tune.breakaway`) move the arm under impedance control at fixed calibration gains, with gravity fed forward. They never use the motors' firmware position loops or the production gains. Every joint is held before anything moves. ```bash theme={null} axol tune.factory # both arms, upload if credentials exist axol tune.factory --arms left axol tune.factory --raw-dir ~/factory-raw # keep the raw sweeps too axol tune.factory --profile standard # the quicker sweep ``` ## calibration.push Uploads this computer's calibration file (`~/.almond/calibration.json`) under the hub serial. It merges joint by joint with what is already stored. Use it after you calibrate joints one at a time with `tune.friction`, `tune.gravity` or `tune.pid`, so you don't have to run `tune.factory`. It needs the same write key. `--dry-run` shows what would be uploaded and needs no key. ```bash theme={null} axol calibration.push --dry-run axol calibration.push ``` ## calibration.pull Downloads a robot's uploaded calibration into `~/.almond/factory_calibration.json`. This includes friction, link masses and centers of mass, so a custom gripper's weight comes along. It needs no key. [`can.setup`](/cli/can-setup) runs it at the end, so a new computer gets its robot's calibration during setup. Run it by hand to refresh: ```bash theme={null} axol calibration.pull # identity from the attached hub adapter axol calibration.pull --hub-serial 004800345542501420373234 ``` When a value is set in more than one place, this order applies, from lowest to highest priority: 1. The built-in defaults. 2. The downloaded calibration. 3. The calibration file on this computer, `~/.almond/calibration.json`. Anything you save locally afterwards with `tune.friction --save`, `tune.pid --save` or `tune.gravity --save` overrides the downloaded values. # tune.filter Source: https://docs.almond.bot/cli/tune-filter Add network or IK noise to a clean motion and score how much the teleop filters remove. Tests the teleop filter stack offline, with no robot or VR headset. The tool takes a clean joint signal, adds known noise, and replays it through the same smoothing chain and rates teleop uses. You get the same result every time for the same settings. The clean signal is a synthetic sine or a saved [reference motion](/cli/motion-build). To run the same test on the real arms, use [`tune.motion --noise --filter`](/cli/tune-motion). The diagnostics dashboard runs that version. The teleop pipeline is: ``` VR stream ──> pose low-pass ──> IK solver ──> EMA ──> trapezoid ▲ network noise enters here ▲ IK noise is created here ``` ## Noise sources `--noise` picks what to add. Each source enters the pipeline where it would on the robot, so you can test them one at a time. | Mode | Where it enters | What it adds | | - | - | - | | `network` | Before the pose low-pass, so every filter sees it | **Jitter** (small noise on every sample), **outliers** (single samples that jump away) and **stalls** (the stream freezes, then jumps to catch up) | | `ik` | After the low-pass, where the IK solver sits, so only the EMA and trapezoid see it | **Churn** (3–20 Hz restless motion on each joint) and **jumps** (one joint switches to another solution for 0.3 to 1 s, then returns) | | `combined` | Both places | Both sets of noise (default) | The output is scored per joint against the clean signal. The noise is seeded, and the network and IK noise use separate seeds, so the same seed gives the same network noise whether or not IK noise is added. To compare filter settings, change one (for example `--cutoff`), rerun, and compare the scores. | Flag | Description | | - | - | | `--noise MODE` | `network`, `ik` or `combined` (default: combined). Network settings are ignored in `ik` mode, and IK settings in `network` mode. | | `--motion NAME` | Use a saved reference motion as the clean signal, all 14 joints (default: a synthetic sine) | | `--duration S` / `--amp DEG` / `--freq HZ` | Sine length, amplitude and frequency (defaults: 10 s, 15°, 0.5 Hz) | | `--jitter DEG` | Network: noise RMS on every sample (default: 0.3°; 0 turns it off) | | `--outlier-rate /S` / `--outlier-amp DEG` | Network: how often outliers occur and how far they jump (defaults: 0.5/s, 10°) | | `--stall-rate /S` / `--stall-ms MS` | Network: how often stalls occur and how long they last (defaults: 0.5/s, 150 ms) | | `--ik-churn DEG` | IK: churn RMS per joint (default: 0.2°; 0 turns it off) | | `--ik-jump-rate /S` / `--ik-jump-amp DEG` | IK: how often jumps occur and how large they are (defaults: 0.2/s, 3°) | | `--cutoff HZ` | Pose low-pass cutoff (default: teleop's `pose_cutoff`) | | `--seed N` | Noise seed. The same seed gives the same noisy stream (default: 0). | | `--label TEXT` | Note stored on the run | | `--save-run` | Save the time series and scores under `~/.almond/diagnostics/tuning/` for the diagnostics dashboard | ```bash theme={null} axol tune.filter --noise network --save-run # wifi artifacts only axol tune.filter --noise ik --save-run # solver artifacts only axol tune.filter --save-run # both combined axol tune.filter --noise network --stall-ms 300 --save-run # harsher wifi axol tune.filter --noise ik --ik-churn 0.01 --save-run # a very restless solver axol tune.filter --motion reach-and-place --save-run # a real motion, all joints axol tune.filter --cutoff 1.5 --label "half cutoff" --save-run ``` ## Reading the scorecard | Column | Meaning | | - | - | | `in RMS °` | Error the noise added to the input, against the clean signal | | `out RMS °` | Error left after the filters, including their delay on a moving signal | | `lagfree °` | `out RMS` with the delay removed. This is the noise the filters left in. | | `lag ms` | Delay the filters add | | `jitter ×` | Share of the 3–15 Hz error that got through. Well below 1 means the filters removed the jitter you would feel. | | `peak °` | Largest error against the clean signal, which shows how much of an outlier got through | | `accel` | Peak output acceleration (°/s²). It must stay at or under teleop's configured limit, so outliers and stall catch-ups can't jerk the arm. | During a stall the clean signal keeps moving while the stream is frozen, so error during a stall is expected. Judge the filters on the catch-up: the arm should resume without overshoot or a spike in acceleration. # tune.friction Source: https://docs.almond.bot/cli/tune-friction Measure one joint's friction with a velocity sweep and save it to the robot's calibration. Measures one joint's friction by sweeping it back and forth at several speeds. Gravity comes from the robot model (see [Gravity compensation](/cli/gravity-comp)), so this command fits only friction and a constant offset. You can also run it from the diagnostics dashboard (`axol serve`). To calibrate every joint at once, use [`tune.factory`](/cli/tune-factory). **Friction model:** `τ = Fc·tanh(0.1·k·v) + Fv·v + Fo` Friction differs from motor to motor, and the built-in defaults are only a starting point. Pass `--save` to store the fit in this computer's calibration file, `~/.almond/calibration.json`. Every operation on the robot then uses it. Values you set explicitly in the config still take priority. ## Profiles | Profile | Speeds | What it fits | | - | - | - | | `standard` (default) | 7.2 to 72°/s | Sliding and viscous friction. | | `slow` | 1 to 30°/s | The full model teleop uses for slow, smooth motion, including load and very-low-speed friction. Takes 5 to 8 minutes per joint. | The slow profile sweeps the speeds under 8°/s twice: once where the joint carries the least load, and once where it carries the most. With `--save` it stores the friction fit and the `stribeck_*` fields. On `shoulder_1`, `shoulder_2` and `elbow`, a saved slow-profile fit also switches the joint to stiffer [slow-motion gains](/operations/teleop-config). A joint without one keeps the standard gains. The `standard` profile doesn't switch them. ## Sweep safety The tool poses the other joints so the arm stays clear of the robot: * `shoulder_2` sweeps only outboard of rest, because inboard travel swings into the base. * `wrist_2` sweeps with the elbow raised to its midpoint, which keeps the gripper clear of the base over its full range. * `shoulder_3` and `wrist_1` sweep with `shoulder_2` held 10° outboard, clear of the chest cameras. [`tune.gravity`](/cli/tune-gravity) uses the same poses, plus extra poses that load the test joint with gravity. The friction fit doesn't depend on the pose, so it works in either. | Flag | Description | | - | - | | `--l` / `--r` | Arm side (required) | | `--channel IFACE` | SocketCAN interface override for setups without the Axol hub adapter | | `--joint JOINT` | `shoulder_1`, `shoulder_2`, `shoulder_3`, `elbow`, `wrist_1`, `wrist_2`, `wrist_3` (required) | | `--kp FLOAT` | Proportional gain (default: the calibration gains below) | | `--kd FLOAT` | Derivative gain (default: the calibration gains below) | | `--profile {standard,slow}` | Sweep profile (default: `standard`) | | `--velocities V [V ...]` | Sweep speeds in deg/s (default: `7.2 18 36 54 72`, or `1 2 3 5 8 15 30` with `--profile slow`) | | `--stribeck-gain G` | With `--profile slow`: the share of the extra low-speed friction to cancel (default: 0.8 on `shoulder_1`, `shoulder_2` and `elbow`, 0 elsewhere) | | `--raw-csv PATH` | Save every sweep sample, so you can refit later with `--fit-csv` | | `--fit-csv PATH [PATH ...]` | Fit the slow-profile model to saved `--raw-csv` files without moving anything. `--save` still applies. | | `--bins N` | Number of position bins the fit uses (default: 40) | | `--lo DEG` | Override the lower sweep limit (degrees) | | `--hi DEG` | Override the upper sweep limit (degrees) | | `--save` | Save the fit to `~/.almond/calibration.json` | | `--dump-csv [PATH]` | Write the binned sweep data to a CSV for plotting. Without a path it is named `logs/friction___.csv`. | ## Calibration gains The calibration tools (`tune.factory`, `tune.friction`, `tune.gravity`, `tune.breakaway`) move the arm under impedance control at these fixed gains, with gravity fed forward. They never use the motors' firmware position loops or the production gains. Every joint is held before anything moves. | Joint | kp | kd | | - | - | - | | `shoulder_1`, `shoulder_2` | 250 | 3.5 | | `shoulder_3` | 180 | 5 | | `elbow` | 130 | 5 | | `wrist_1` | 180 | 1.7 | | `wrist_2` | 130 | 2.25 | | `wrist_3` | 130 | 2 | ```bash theme={null} axol tune.friction --l --joint shoulder_1 --kp 30 --kd 0.8 axol tune.friction --r --joint elbow --kp 20 --kd 0.6 --save axol tune.friction --l --joint wrist_1 --velocities 12 35 60 axol tune.friction --l --joint shoulder_2 --dump-csv axol tune.friction --r --joint shoulder_1 --profile slow --raw-csv s1-slow.csv --save axol tune.friction --r --joint shoulder_1 --fit-csv s1-slow.csv creep-s1.csv ``` # tune.gravity Source: https://docs.almond.bot/cli/tune-gravity Measure one link's center of mass from the motors to correct gravity compensation. Measures one link's real center of mass from motor torques and corrects the gravity feed-forward with it. You can also run it from the diagnostics dashboard (`axol serve`). To calibrate every joint at once, use [`tune.factory`](/cli/tune-factory). ## When to use it The gravity feed-forward starts from the CAD masses and centers of mass. Cables, the end-effector and build differences can make a real link a few percent off. The position spring then has to carry the missing torque, so the joint sags under load by `unmodeled torque / kp`. Raising the gains won't fix the sag. Correcting the model fixes it at every angle. ## How it works The joint sweeps back and forth at a constant speed, as in [`tune.friction`](/cli/tune-friction). Averaging the forward and backward torques cancels friction, which leaves gravity. The tool fits the difference from the current model as a shift in the link's center of mass. * The link's mass doesn't change. If you add a camera or a heavier gripper to the wrist, set the new `wrist_3` mass first. See [After you change the end-effector or add cameras](/guides/axol-calibration#after-you-change-the-end-effector-or-add-cameras). * One joint's sweep can't see every direction of the center of mass equally well. Directions it can't see stay at their current value. * A fitted shift of more than 60 mm is rejected as bad data. ## Sweep poses Gravity can't turn a joint whose axis is vertical, so the tool poses other joints to load the test joint: | Joint | Pose during the sweep | | - | - | | `shoulder_3` | `shoulder_1` raised so the upper arm is horizontal (+90° left, −90° right), elbow bent | | `wrist_1` | Elbow bent, `wrist_2` at 85° | | `wrist_2` | Elbow raised to clear the base, `wrist_1` at 90° | The clearance rules from [`tune.friction`](/cli/tune-friction) also apply. `shoulder_2` sweeps only outboard of rest. `shoulder_3` and `wrist_1` sweep with `shoulder_2` held 10° outboard, and are limited to ±90° in their loaded poses. If a sweep would still carry no gravity load, the tool refuses to fit it. ## Order Run from `wrist_3` to `shoulder_1`. A shoulder sweep moves every link past it, so errors in uncalibrated wrist and elbow links end up in the shoulder's fit. The tool prints a note when links further out are still uncalibrated. Run [`tune.friction --save`](/cli/tune-friction) on the joint first. The tool refits the friction offset `Fo` against the corrected model and saves it with the center of mass. | Flag | Description | | - | - | | `--l` / `--r` | Arm side (required) | | `--channel IFACE` | SocketCAN interface override for setups without the Axol hub adapter | | `--joint JOINT` | `shoulder_1`, `shoulder_2`, `shoulder_3`, `elbow`, `wrist_1`, `wrist_2`, `wrist_3` (required) | | `--velocity DEG_S` | Sweep speed in deg/s (default: 18). Keep it at 25 or below, because the shoulder torque readings get noisy above that. | | `--lo DEG` / `--hi DEG` | Override the sweep limits (degrees) | | `--kp FLOAT` / `--kd FLOAT` | Gains during the sweep (default: the [calibration gains](/cli/tune-friction#calibration-gains)) | | `--save` | Save the fitted center of mass, the refit `Fo` and the link mass to `~/.almond/calibration.json`. This computer then uses them everywhere. | | `--save-run` | Save the sweep (measured and model torque per angle) for the dashboard charts | | `--label NOTE` | Note stored with the saved run | The report prints the center-of-mass shift in mm, how well the model fits before and after, and the worst sag at rest before and after, at the joint's configured `kp`. ```bash theme={null} axol tune.gravity --l --joint shoulder_1 axol tune.gravity --l --joint elbow --save axol tune.gravity --r --joint wrist_1 --velocity 25 --save ``` # tune.motion Source: https://docs.almond.bot/cli/tune-motion Replay a reference motion through the teleop controller and score tracking and smoothness per joint. Replays a [reference motion](/cli/motion-build) through the same controller teleop uses, and scores **tracking accuracy** and **smoothness** for each joint. The gains, feed-forward and damping come from the same config as teleop and the SDK: your panel settings on top of the calibration. The motion is the same on every run, so you can change one gain with `--gain`, replay, and compare the numbers. The diagnostics dashboard shows the runs as charts, side by side. Every run is saved, with each joint's full time series and scores, under `~/.almond/diagnostics/tuning/`. ## Safety * The arm moves to the motion's start and back to rest on planned paths that avoid collisions. * A contact watchdog stops playback if a joint keeps pushing harder than the plan expects (`--torque-threshold`). * Before playback the tool checks that the arm reached the start pose. If a joint is more than about 3° off, the tool names it, skips playback and returns the arm to rest. * A tracking guard stops playback if a joint leaves its path, oscillates or vibrates. See [Tracking guard](#tracking-guard). If an `--a4` joint fails the start check, its stored planner acceleration is probably neither 0 nor 60000. Read it with `scripts/fw_gains.py --id `. Any value in between makes the joint barely move (see [`tune.a4`](/cli/tune-a4)). | Flag | Description | | - | - | | `--motion NAME` | Saved motion name (`axol motion.list`) or a path to a motion `.npz` file (required) | | `--arms both\|left\|right` | Which arms to bring up and drive (default: `both`). The other arm's bus is left alone, so an unpowered arm or a single-arm bench doesn't block the run. | | `--gain [SIDE.]JOINT.FIELD=VALUE` | Override one gain for this run, for example `left.elbow.kd=4.5`. Repeatable, and without a side it applies to both arms (see [Gain fields](#gain-fields)). | | `--stiffness S` | Stiffness-slider position, 0 to 1, for both arms (default: the panel's, 1.0 unless you changed it). At 1.0, gain overrides apply as given. | | `--defaults` | Ignore the panel settings and run the calibrated defaults | | `--repeat N` | Replay the motion N times in one session (default: 1; 0 runs until Ctrl-C). Each pass is scored and saved as its own run, and a one-line summary per pass closes the session. | | `--hold SIDE.JOINT[=DEG]` | Hold a joint still at the motion's start angle or at the given angle (repeatable). Only the move to the start is checked for collisions, so watch the first pass. | | `--label TEXT` | Note stored on the run | | `--torque-threshold NM` | Contact watchdog threshold (default: 8.0; 0 turns it off) | | `--no-save-run` | Don't save the run | | `--no-imu` | Skip the wrist IMU. By default each pass gets an `imu` shake score (see below). | | `--no-gripper` | Run on an Axol without grippers. The panel's `axol.has_gripper` setting already covers a robot set up that way. | | `--record PREFIX` | Record the session like teleop's `--teleop.record`: measured joints to `PREFIX_meas.npz` and the realtime core's trace to `PREFIX_rt.npz` | ```bash theme={null} axol tune.motion --motion reach-and-place # baseline run axol tune.motion --motion reach-and-place --gain left.elbow.kd=4.5 # A/B a gain axol tune.motion --motion reach-and-place --controller position # firmware position loops, 400 Hz axol tune.motion --motion reach-and-place --gain shoulder_3.kd_host=8 --label "s3 damp" axol tune.motion --motion reach-and-place --noise network # raw noise, no filters axol tune.motion --motion reach-and-place --noise network --filter # same noise, stack on axol tune.motion --motion reach-and-place --ik # IK solver in the loop ``` ## Gain fields `--gain` accepts these fields: * **Impedance and damping:** `kp`, `kd`, `kd_host`, `kd_host_hz`, `kd_host_q`, `j_eff` * **Friction compensation:** `stiction_gain`, `stiction_load_gain`, `stiction_err_deg`, `dither_nm`, `dither_hz`, `stribeck_gain`, `stribeck_dfs`, `stribeck_load_gain`, `stribeck_vs`, `stribeck_pole`, and the friction model as `friction.fc`, `friction.k`, `friction.fv`, `friction.fo`, `friction.fl` * **Firmware position loop:** `firmware.position_kp`, `firmware.position_ki`, `firmware.position_kd`, `firmware.speed_kp`, `firmware.speed_ki`, `firmware.profile_acc` * **MyActuator 0xA4 planner:** `firmware.planner_accel` (`0` or `60000`), `firmware.cap_track` (1 or more, for example `1.2`) and `firmware.planner_lead_ms` * **Torque feed-forward:** `firmware.tf_rated_current_a`, in amps, for MyActuator `a4` joints on V4.4 firmware * **Gravity model:** `mass` (kg) and `com.x`, `com.y`, `com.z` (m, in the link's URDF frame), to try a gravity correction before you calibrate it Firmware gains are written to the motor's ROM when the joint enables, so they stay in the motor after the run. The next run without the override sets the planner back to `0`. ## Noise, filters and IK | Flag | Description | | - | - | | `--noise MODE` | Add noise to the motion where it would enter on the robot: `network`, `ik`, `combined` or `none` (default). See [`tune.filter`](/cli/tune-filter). | | `--filter` | Pass the stream through teleop's filters before sending it. This is the hardware version of [`tune.filter`](/cli/tune-filter). | | `--ik` | Re-solve each waypoint through the IK solver, as teleop does, and drive the arms with the solver's output. Solve times and the difference from the reference are saved on the run. | | `--seed N` | Noise seed. The same seed gives the same noisy stream (default: 0). | With any of these, the run is still scored against the clean motion. The saved run also stores the stream that was sent, so the dashboard can overlay the clean, sent and measured positions for each joint. `--ik` solves the whole motion before playback starts, so slow solves don't change the playback timing. ## Controllers and rates | Flag | Description | | - | - | | `--controller impedance\|position` | `impedance` (default) runs the production controller at 240 Hz. `position` runs every joint on its motor's position loop at 400 Hz, which is stiff and has no host feed-forward. | | `--a4 SIDE.JOINT` | Run one MyActuator joint on its firmware position loop (0xA4), for example `right.shoulder_1`, while the rest stay on impedance. The joint has no compliance and its torque reads as NaN. | | `--loop-hz HZ` | Realtime-core tick rate (default: 240 for impedance, 400 for `position`, 480 when `--a4` joints are mixed in). With any joint on impedance, only 240 or 480 is accepted. | | `--impedance-hz 240\|480` | Command rate of the MyActuator impedance joints (default: 240). The gains were tuned at 240, and the Damiao wrists stay at 240. | | `--fast-impedance SIDE.JOINT` | Run one impedance joint at 480 Hz while the others stay at 240 Hz. Repeatable. | | `--enc2 SIDE.JOINT` | Record a MyActuator joint's output-side encoder in the core trace (`enc2_p` and `enc2_t` in `PREFIX_rt.npz`). Implies `--record`. | ## Learning and pre-compensation | Flag | Description | | - | - | | `--learn N` | Learn a correction over N passes, in place of `--repeat`. See below. | | `--learn-imu` | With `--learn`: learn from the tool's vertical deviation as the wrist IMU measures it, which includes flex the joint encoders can't see. Needs one driven arm and its wrist camera. | | `--learn-gain G` | Step size of each update (default: 0.7). 0.9 converges faster when passes repeat closely. | | `--learn-band LO HI` | Band the learning corrects, Hz (default: `0.7 8`) | | `--learn-max-deg D` | Largest offset per joint, degrees (default: 1.5) | | `--learn-joint SIDE.JOINT` | Learn only these joints. Repeatable (default: every driven joint that moves at least 1° and isn't held). | | `--correction RUN_ID` | Replay with the offset a `--learn` pass saved, without learning, to check that it holds up | | `--invert` | Pre-compensate the motion with each joint's tracking model from [`tune.tf`](/cli/tune-tf), so lag and resonance cancel. Joints without a model stream unchanged. | | `--notch HZ` | Notch the streamed motion at `HZ` with teleop's command notch (`VRTeleopConfig.command_notch_hz`), for shake the joint loops can't damp. Repeatable. | | `--notch-q Q` | Quality factor of those notches (default: 2.0). Bandwidth is `HZ` divided by Q. | With `--learn`, pass 1 runs uncorrected. After each pass, each joint gets a position offset that cancels its tracking error in `--learn-band`. A pass that comes out worse goes back to the best offset at half the gain. A learned offset belongs to the motion it was learned on. It shows how much each joint needed, which is the most a feed-forward model could achieve. ## Tracking guard By default the guard watches every driven joint's tracking error and stops playback when a joint: | Trips when | Flag | Default | | - | - | - | | Leaves its path by more than the limit, plus 0.1 s of the commanded speed | `--guard-dev-deg` | 10° | | Oscillates: 1.5–15 Hz error RMS above the limit | `--guard-osc-deg` | 1.5° | | Vibrates: >15 Hz error RMS above the limit | `--guard-vib-deg` | 0.15° | When the guard trips, the run's gain overrides go back to the base config, the arm holds still for 1.5 s, then returns to rest. The moves to and from the motion get twice the limits. If the return trips twice, the arm stays powered and holds its last command. Trips are saved with the run, and the command exits with status 3. For slow creep motions, tighten the limits, for example `--guard-dev-deg 4 --guard-osc-deg 1`. Pass `--no-guard` to turn the guard off. ## Research flags > [!WARNING] > > These flags are research tools and are not part of the production controller. Damping from the wrist camera's IMU can add high-frequency oscillation, and its effect depends on how the camera is mounted on the wrist. | Flag | Description | | - | - | | `--imu-damp C` | Damp the tool's vertical shake with a force of −C times the shake velocity the wrist IMU measures, in N·s/m. Start at 5. | | `--imu-damp-joint SIDE.JOINT[=SCALE]` | Joints that apply the damping, each with an optional scale. Repeatable (default: `shoulder_1`, `shoulder_2` and `elbow`). | | `--imu-damp-joint-lp SIDE.JOINT=HZ` | Low-pass one joint's damping torque. Repeatable. | | `--imu-damp-ref encoder\|command\|model` | What the tool's velocity is measured against: the encoders (default, flex past the joints only), the command (any departure from the path), or the [`tune.tf`](/cli/tune-tf) tracking model (ignores normal lag). | | `--imu-damp-source imu\|encoder` | Measure the tool's velocity with the wrist IMU (default) or from the joint encoders | | `--imu-damp-lp HZ` | Upper edge of the damped band (default: 15) | | `--imu-damp-hp HZ` | Lower edge of the damped band (default: 1.0). Below about twice this, the force acts more like a spring than a damper. | | `--imu-damp-lead HZ` | Center of a lead-lag stage (default: 0, none) | | `--imu-damp-notch HZ` | Notch the damping force (default: 0, none) | | `--imu-damp-notch-q Q` | Quality factor of that notch (default: 1.0) | | `--imu-damp-max NM` | Largest damping torque per joint (default: 0.5) | | `--imu-damp-alternate` | Damp on passes 2, 4 and so on only, to compare within one session | | `--gyro-damp C` | Damp flex past the joints from the wrist gyro, in N·m·s/rad. Needs `--gyro-mount`. | | `--gyro-damp-joint SIDE.JOINT[=C]` | Joints that apply gyro damping, each with an optional gain. Repeatable (default: `shoulder_1` and `elbow`). | | `--gyro-mount PATH` | The wrist cameras' rotation relative to the gripper mount (default: `~/.almond/wrist_imu_mount.json`) | | `--gyro-mount-fit RUN_ID` | Fit that rotation from a saved run with the IMU recorded, write it to `--gyro-mount`, and exit | | `--torque-probe SIDE.JOINT=NM` | Add a known 0.5–15 Hz torque, up to NM peak, to a joint, to measure how joint torque moves the tool. Repeatable. | ## Reading the scorecard | Column | Meaning | | - | - | | `RMS °` | Tracking error against the reference | | `lagfree °` | Error with the measured delay removed. This separates slowness from inaccuracy. | | `lag ms` | Delay from command to measured motion | | `jitter °` | 3–15 Hz error RMS, the vibration the operator feels | | `amp` | Measured over commanded motion in the middle band. Above 1 the arm rings, below 1 it filters. | | `trq HF` | Torque chatter from one cycle to the next (Nm RMS) | | `buzz °` / `@Hz` | Sustained motion at 20 Hz or more, which you hear as buzz, and its frequency. Healthy joints read about 0.005°, and an audible buzz 2 to 5 times that. | ### Wrist IMU shake Each pass also prints the shake the wrist camera's IMU measures at the gripper. It is reported in mm, as the typical peak-to-peak motion over 2 s in the 1–15 Hz band. The score is given overall and along gravity, and the vertical part is split into `low_mm` (1–3 Hz, slow sway) and `high_mm` (3–15 Hz). The IMU sees motion the joint encoders can't, such as gear backlash, link flex and the gripper itself. It is the number that matches a shake you can see at the tool. The saved run stores it as `metrics.imu`, with the raw samples. Joints that move less than 1° in the motion show `-` in the tracking columns. They keep their row and are still scored for buzz and torque chatter, which is where a vibration at a held pose shows up. # tune.pid Source: https://docs.almond.bot/cli/tune-pid Compare and rank Kp/Kd gains for one joint with a sine or step test. Tests one or more `Kp`/`Kd` pairs on a single joint. Pass several values to `--kp` or `--kd` to test every combination in one session. The tool measures tracking error (RMS, max, overshoot, settling time), ranks the candidates, and can save the best one to this robot's calibration file. You can also run it from the diagnostics dashboard (`axol serve`). ## Feed-forward By default the test applies the same feed-forward as teleop: gravity, friction, inertia (`j_eff`) and host damping (`kd_host`). Gains you find here carry over to teleop unchanged. * `--ff` tests with less feed-forward. For example, `--ff none` runs bare PD, and `--ff friction` shows the joint without gravity compensation. * `--host-kd` overrides the host damping. The shoulders need host damping, because the motor's own `kd` alone leaves them ringing at about 2 Hz. ## Other joints During each test the other joints hold their rest pose under impedance control, with gravity fed forward. The tool checks that they stayed put. Each candidate's report ends with a `Holder peak` line that shows how far each held joint moved. If a held joint moved more than about 0.5°, the arm was flexing, and part of the measured ringing comes from that joint and not the one under test. | Flag | Description | | - | - | | `--l` / `--r` | Arm side (required) | | `--channel IFACE` | SocketCAN interface override for setups without the Axol hub adapter | | `--joint JOINT` | `shoulder_1`, `shoulder_2`, `shoulder_3`, `elbow`, `wrist_1`, `wrist_2`, `wrist_3` (required) | | `--kp KP [KP ...]` | Proportional gain candidates (default: the joint's configured kp) | | `--kd KD [KD ...]` | Derivative gain candidates (default: the joint's configured kd) | | `--ff {full,gravity,friction,none}` | Feed-forward during the test (default: `full`, the same as teleop) | | `--host-kd KD` | Host damping in Nm·s/rad, the same as the config's `kd_host` (default: the joint's configured value) | | `--host-kd-hz HZ` | Center of the band the host damping acts in, the same as `kd_host_hz`. Set it to the ring frequency the step test reports (default: the joint's configured value, else 3.2 Hz). | | `--host-kd-q Q` | Width of that band, the same as `kd_host_q`: bandwidth is the center divided by Q (default: the joint's configured value, else 0.8). See below. | | `--stiffness S` | Test the production gains at this stiffness-slider position, 0 to 1. Can't be combined with `--save`. | | `--mode {sine,step}` | `sine` tracks a sine wave (default). `step` measures a step response. | | `--amp DEG` | Motion amplitude in degrees (default: 10°, limited to the room the joint has) | | `--center DEG` | Center of the test, joint-frame degrees with 0 at rest (default: a step starts where the joint is, a sine centers on its midpoint). See below. | | `--pose JOINT=DEG` | Hold another joint at this joint-frame angle during the test. Repeatable, see below. | | `--pose-by-hand` | Pose the arm by hand between tests. See below. | | `--hold-host-kd KD` | With `--pose-by-hand`: cap the host damping on the held joints | | `--a4-holders` | Hold the other joints on their firmware position loops instead of impedance. This is stiffer but can make a shoulder oscillate, so keep a hand on the E-Stop. | | `--target-noise DEG` | Sine only: add about 8 Hz noise of this RMS to the target, like hand-tracking jitter. Try 0.1 to 0.3. | | `--freq FLOAT` | Sine frequency in Hz (default: 1.0) | | `--duration FLOAT` | Sine duration in seconds (default: 5.0) | | `--hold FLOAT` | Step hold time per phase in seconds (default: 2.0). The joint also settles this long before the step. | | `--rate FLOAT` | Command rate in Hz (default: 240, the teleop control rate). The report prints the rate it reached and warns if the CAN bus held it below the request. | | `--save` | Save the best candidate's Kp/Kd to `~/.almond/calibration.json` | | `--no-imu` | Skip the wrist IMU. By default each candidate gets an `imu` shake score (see [`tune.motion`](/cli/tune-motion)). | | `--save-run` | Save each candidate's time series and scores under `~/.almond/diagnostics/tuning/` for the diagnostics dashboard | | `--label TEXT` | Note stored on each saved run | | `--dump-csv [PATH]` | Write every sample (`kp, kd, t, target, actual, error`) to a CSV for plotting. Without a path it is named `logs/pid___.csv`. | ```bash theme={null} axol tune.pid --l --joint elbow # config gains, production FF axol tune.pid --l --joint elbow --kp 20 30 45 --kd 0.5 1.0 # 6-way sweep, ranked axol tune.pid --r --joint shoulder_1 --mode step --ff none # bare-PD step response axol tune.pid --l --joint wrist_1 --kp 12 --kd 0.4 --save # persist to calibration ``` ## Testing in the worst pose Gains that are stable with the arm hanging at rest can ring under gravity load or with the arm extended. Test the worst case too. * **`--center`**: run the test at other angles, such as 45 and −45. `shoulder_2` may start at 0 but must swing outboard, because the base is inboard. `wrist_2` runs with the elbow raised to its midpoint, which keeps the gripper clear of the base. * **`--pose`**: hold other joints in a pose, for example `--pose elbow=90 --pose wrist_1=45`. In the dashboard, enter them in one field separated by spaces. Posed joints return to where they were after the test. `shoulder_2` may only be posed outboard. `wrist_2` may only be posed in its inboard half if the pose also bends the elbow at least 30°. * **`--pose-by-hand`**: the arm floats in gravity compensation so you can move it by hand. Press Enter to hold the pose, and the tool runs a step test with every candidate. Compare the ring frequency across poses. The pose with the lowest ring frequency has the least damping margin. It needs `--mode step` and can't be combined with `--center`, `--pose` or `--save`. ## Host damping band At the default Q of 0.8, the damping band reaches an octave either side of its center. With a low center, it reaches into the slow, intentional motion below 1.5 Hz, drags the final approach, and the step never settles. Once you know the ring frequency, set `--host-kd-hz` to it and use a Q of 2 to 3, so only the ringing is damped. ## Per-robot calibration `--save` writes the best gains to `~/.almond/calibration.json`. Every operation on this computer (teleop, data collection, policies) then uses them in place of the built-in defaults. Explicit overrides still take priority, such as `--axol.left.elbow.kp 60` or the panel's Advanced settings. Saved gains apply at full stiffness (stiffness slider at 1, the default), like the defaults they replace. Friction values from [`tune.friction --save`](/cli/tune-friction) live in the same file. # tune.repeatability Source: https://docs.almond.bot/cli/tune-repeatability Measure how reliably the left arm returns to the same pose after many motions. Tests the repeatability of the **left arm**. The arm moves from rest to pose **A**, then moves between two fixed poses (A, B, A, B and so on) for the number of cycles you ask for. At the end, or when you press Ctrl-C, it returns to rest. * Each move is planned in joint space so the arm can't hit the torso, and it plays back the same way every cycle. * The gripper stays closed throughout. * The right arm isn't used, and its CAN bus stays off. | Flag | Description | | - | - | | `--cycles INT` | Number of A-to-B-to-A round trips (default: 0, run until Ctrl-C) | | `--gripper-torque-limit FLOAT` | Gripper closing torque limit in Nm (default: 0.3) | | `--no-gripper` | Run on an Axol without grippers. The gripper motor is never enabled, and `--gripper-torque-limit` is ignored. | | `--dwell FLOAT` | Seconds to hold at each waypoint except B (default: 0.5) | | `--dwell-b FLOAT` | Seconds to hold at pose B before returning to A (default: 3.0) | | `--rate FLOAT` | Control and waypoint rate in Hz. Higher gives finer steps and smoother motion at the same speed (default: 250). | | `--speed FLOAT` | Average speed of the fastest joint in rad/s. The peak is 1.5 times this (default: about 0.31). | | `--stiffness FLOAT` | Arm stiffness, 0 to 1. Lower softens the arm and reduces tracking jitter (default: 1.0, the standard gains). | | `--log-level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | ```bash theme={null} axol tune.repeatability # bounce A↔B forever axol tune.repeatability --cycles 5 # five A→B→A round trips, then rest ``` > [!NOTE] > > Poses A and B are set in `almond_axol/cli/tune/repeatability.py` as `_POSE_A_LEFT` and `_POSE_B_LEFT`, in raw motor angles. To change them, pose the arm by hand, run `axol motor.info --l`, and paste the printed angles into the file. # tune.tf / motion.chirp Source: https://docs.almond.bot/cli/tune-tf Measure a joint's tracking response with a sine sweep, then pre-compensate motions with it. These commands measure how a joint follows its command at different frequencies, and use that to make a known motion track better. The workflow has four steps: 1. `motion.chirp` builds a sine sweep for one joint. 2. `tune.motion` replays it on the robot. 3. `tune.tf` fits a tracking model to the replay. 4. `tune.motion --invert` replays a motion through the inverse of that model, which cancels the joint's lag and resonance. The fitted model is `H(s) = K (1 + s/ωz) ωn² / (s² + 2ζωn s + ωn²) · e^(−sτ)` with a natural frequency `ωn`, damping `ζ`, an optional zero `ωz` and a delay `τ`. For slow motion, most of the shake comes from friction, not from the tracking response. Calibrate friction first with [`tune.friction --profile slow`](/cli/tune-friction). The tracking model matters more for faster motion. ## 1. Build the sweep: `motion.chirp` | Flag | Description | | - | - | | `SIDE.JOINT` | The joint to sweep, for example `right.shoulder_1` | | `--base MOTION` | Motion whose first pose the sweep starts from (default: a built-in pose with `shoulder_1` and the elbow raised) | | `--f0` / `--f1` | Sweep band, Hz (default: `0.3` / `8`) | | `--duration S` | Sweep length in seconds (default: `60`) | | `--amp-deg D` | Amplitude at low frequency (default: `1.5`) | | `--acc-max DEG_S2` | Acceleration limit that shrinks the amplitude at high frequency (default: `200`, full amplitude up to 1.8 Hz and 0.08° at 8 Hz) | | `--carrier DEG_S` | Add a triangle wave of this speed over ±7.5°, so the joint keeps sliding one way for seconds at a time (default: `0`). Use it to measure the joint the way slow motion moves it. | | `--out PATH` | Output file (default: `~/.almond/motions/chirp__.npz`) | The command refuses a sweep that would leave the joint's range. ## 2. Replay it: `tune.motion` ```bash theme={null} axol tune.motion --motion ~/.almond/motions/chirp_right_shoulder_1.npz --arms right \ --hold right.wrist_2 --hold right.wrist_3 --gain right.shoulder_1.kp=450 --label "chirp s1" ``` Use the same `--gain` and `--fast-impedance` settings you will run the motion with. The model is only valid for those settings. ## 3. Fit: `tune.tf` | Flag | Description | | - | - | | `SIDE.JOINT RUN_ID [RUN_ID ...]` | The joint and one or more chirp runs, fitted together | | `--f0` / `--f1` | Band to fit, Hz (default: the chirp's band) | | `--min-coherence C` | Leave out frequencies with coherence below this (default: `0.6`) | | `--save` | Save the model and the run's gain overrides to `~/.almond/tracking_models.json` | The command prints: * the response at a few frequencies, and the fitted model * a warning if the joint is lightly damped, with how much it amplifies a command at its resonance * a warning if the fitted resonance lies above the band the data covers * if the run recorded the wrist IMU, how closely the wrist's vertical motion follows the command in each band. Where it drops, something the joint encoder can't see is moving the tool. ## 4. Use it: `tune.motion --invert` `--invert` pre-compensates every modelled joint that moves and isn't held. The correction boosts no frequency more than 3 times, fades out above the measured band, and ramps in and out over 0.5 s, so the motion still starts and ends where it should. The run is scored against the original motion. * If a joint's saved gains differ from the run's, the tool warns. * If a joint's model has a resonance outside the measured band, the tool skips that joint. ```bash theme={null} axol motion.chirp right.shoulder_1 --carrier 3 axol tune.motion --motion ~/.almond/motions/chirp_right_shoulder_1.npz --arms right --label "chirp s1" axol tune.tf right.shoulder_1 --save axol tune.motion --motion slow_osc --arms right --invert --repeat 3 --label "osc inverted" ``` # waypoints Source: https://docs.almond.bot/cli/waypoints Teach poses by hand in gravity comp, then replay them as straight-line moves. Teach poses by hand, then replay them. The arms hold in [gravity compensation](/cli/gravity-comp) so you can guide them. Each time you record, the pose of both arms is added to a waypoint file. On playback each gripper tip moves in a straight line from waypoint to waypoint, and its orientation turns smoothly along the way. The [IK solver](/api/kinematics) turns each point on the line into joint angles. At each waypoint the arms pause to open or close the grippers. * The straight line is held at the point where the fingers close, 145 mm past the gripper mount. The tip doesn't swing in an arc when the wrist turns. * Each move starts and stops smoothly, with no jolt. * The whole path is planned before the arms move. If a waypoint can't be reached in a straight line, you find out while the robot is still. * An arm you didn't move holds still. An arm resting in gravity compensation drifts a millimetre or two between recordings. Below `--min_travel` and `--min_rotation`, playback keeps that arm in place instead of chasing the drift. Arm stiffness is the same setting every operation uses: the control panel's setting, or `--axol.left_stiffness` and `--axol.right_stiffness`. A stiffer arm follows the path more closely. A softer one sags a little, but shakes less when bumped and gives way if the path meets an obstacle. Stiffness doesn't affect hand-guiding. This command is configured through draccus (see [Command configuration](/cli/configuration)). Arm gains and stiffness are on the nested `axol` config, and IK weights are on `kinematics`. They are the same fields as teleop's [Robot](/operations/teleop-config#robot) and [Kinematics](/operations/teleop-config#kinematics) parameters, with the same `--axol.` and `--kinematics.` prefixes. The command's own flags are listed below. ## Driving a session On the terminal, single keys on stdin: | Key | Action | | - | - | | `Enter` | Record the pose both arms are in | | `u` | Undo the last waypoint | | `c` | Clear every waypoint | | `[` / `]` | Open or close the left / right gripper | | `p` | Play the path | | `s` | Stop playback and go back to teaching | | `q` | Quit | The same actions are buttons in the [control panel](/guides/control-panel), so you can teach and replay a path without a terminal. ## Grasping A gripper is either open or closed. Press `[` for the left gripper and `]` for the right, so one arm can carry something while you guide the other. Both start open. Each waypoint stores the state both grippers are in when you record it: ```text theme={null} [ ] guide above the object, record -> both open [ ] press ], guide down, record -> right closed: the grasp [ ] guide to the destination, record -> right still closed: carrying [ ] press ], record -> right open: let go ``` On playback the arms hold still while a gripper moves, so the grasp closes on the object at its waypoint rather than somewhere along the way. Waypoints that don't change a gripper don't pause for it. Grip force is the gripper's `torque_limit`, the same setting every operation uses, and you can set it in the control panel. A closed waypoint always commands **fully closed**, not the point where the fingers stopped on the object, so the gripper keeps squeezing. Set the torque to suit the object. > [!TIP] > > Before anything moves, planning logs what each waypoint asks the grippers to do. It warns you when a path never moves the grippers, which can look like a broken gripper. ## Flags | Flag | Description | | - | - | | `--file PATH` | Waypoint file to record into and play back from. Written after every change. Default `~/.almond/waypoints.json` | | `--play_only BOOL` | Skip teaching and replay the file straight away. Default `false` | | `--sim BOOL` | Preview a saved path in the browser visualizer instead of on the robot (implies `--play_only`). Default `false` | | `--loops INT` | Times to run the path; `0` replays until stopped. Default 1 | | `--speed FLOAT` | Average gripper speed (m/s) along each move. The peak mid-move is 1.875 times this. Default 0.25 | | `--ang_speed FLOAT` | Speed (rad/s) at which the gripper turns. Default 1.2 | | `--speed_scale FLOAT` | Factor in `(0, 1]` that slows every move in the session, including the approach and the return to rest. Control panel: **Speed scale** slider. Default 1.0 | | `--dwell FLOAT` | Seconds held still at each waypoint after its grippers have moved. Default 0.5 | | `--grip_time FLOAT` | Seconds to open or close the grippers at a waypoint. Skipped when the grippers don't change. Default 0.75 | | `--pos_tolerance FLOAT` | Largest allowed distance (m) from the straight line when planning. Default 0.01 | | `--plan_rate_hz FLOAT` | Fewest IK solves per second of motion when planning. Fast moves can get more. Default 10 | | `--min_travel FLOAT` | An arm whose gripper tip moves less than this (m) between two waypoints holds still for that move. Default 0.01 | | `--min_rotation FLOAT` | Rotation counterpart to `--min_travel` (rad). Default 0.05 | | `--ease_in FLOAT` | Seconds to blend onto the start of each move, so the arm joins the path smoothly. Default 0.4 | | `--free_joints [J1,J2,...]` | Joints to gravity-compensate while teaching. Default `null` = all 7 | | `--kd FLOAT` | Velocity damping on free joints while teaching (Nm·s/rad). Default 0.25 | | `--left_channel ` / `--right_channel ` | CAN channel per arm; `null` disables that arm. | | `--rate_hz FLOAT` | Control loop and waypoint rate in Hz (default: 250) | | `--log_level {DEBUG,INFO,WARNING,ERROR}` | Default: `INFO` | | `--config_path PATH` | Load a whole-config JSON/YAML file. Flags override it. | | `--settings_path PATH` / `--no_settings` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. By default `~/.almond/settings.json` applies, beneath `--config_path` and the flags. | ```bash theme={null} axol waypoints # teach, then play axol waypoints --file pick_place.json # keep a named path axol waypoints --play_only --loops 0 # replay it until stopped axol waypoints --sim --file pick_place.json # preview it in the browser axol waypoints --speed 0.03 --dwell 2 # slow, with a long pause axol waypoints --speed 0.5 # brisk axol waypoints --play_only --speed_scale 0.25 # first run of a new path at quarter pace ``` ### Choosing a speed At the default speed the gripper peaks at about 0.47 m/s mid-move. Lines stay straight at any speed. Acceleration grows with the square of the speed: about 2 m/s² at the default, 8 at `--speed 0.5` and 16 at `--speed 0.7`. Above that, each move takes a fraction of a second and the pause at each waypoint takes most of the cycle. Lowering `--speed` alone doesn't slow a move that is mostly turning, because `--ang_speed` may set its pace. `--speed_scale` (the **Speed scale** slider in the control panel) slows both, and the moves to the first waypoint and back to rest. Use it to try a new path slowly. > [!WARNING] > > A fast move carries real momentum, and a stiff arm won't give way if the path meets something. Raise the speed step by step, with the workspace clear. ## The waypoint file Waypoints are stored as the joint angles the arms reported, so a path is exact. You can edit the file or check it into a repository: ```json theme={null} { "version": 1, "waypoints": [ { "label": "approach", "left": [-0.157, 0.0, 0.0, 0.314, 0.0, 0.0, -0.157, 1.0], "right": [0.157, 0.0, 0.0, -0.314, 0.0, 0.0, 0.157, 1.0] } ] } ``` Each arm entry is 7 joint angles in radians (`SHOULDER_1` to `WRIST_3`, 0 = rest), then the gripper opening from `0` to `1`. The joint angles are what the arm reported. The gripper value is the opening to command, such as `0.0` for a grasp, not where the fingers stopped. The gripper poses for planning are computed from the joint angles. > [!TIP] > > A 7-joint arm can reach the same gripper pose in several ways. Playback keeps the posture you taught, so the elbow follows the path you guided it along instead of swinging somewhere unexpected. > [!NOTE] > > Playback starts with a collision-aware move to the first waypoint. When the path finishes or is stopped, the arms park at the rest pose. If you quit while teaching, the arms don't park, since your hands are on them. # zed.driver Source: https://docs.almond.bot/cli/zed-driver Update a ZED Box or ZED Link camera driver to the version the ZED SDK needs. Updates the GMSL camera driver on a ZED Box, or the ZED Link card driver on a Jetson AGX Orin, to the Stereolabs release that matches the ZED SDK. | Carrier | Package | Pinned release | | - | - | - | | ZED Box Duo | `stereolabs-zedbox-duo` | 1.4.3 (L4T 36.4) | | ZED Box Mini | `stereolabs-zedbox-mini` | 1.4.3 (L4T 36.4) | | ZED Link Duo (Jetson AGX Orin) | `stereolabs-zedlink-duo` | 1.4.4 (L4T 39.2) | ```bash theme={null} axol zed.driver ``` The ZED SDK needs a matching driver. A unit may ship from the factory with an older driver, and with a newer SDK that driver restarts the camera service during capture, which stops the camera stream mid-session. `zed.driver` removes the factory package and installs the pinned one, following Stereolabs' procedure. [`provision`](/cli/provision) runs this for you, so you rarely need to run it yourself. ## When it does nothing * No `stereolabs-zed*` package is installed. * The installed driver is already at the pinned version or newer. * The Jetson's L4T release doesn't match the one the pinned driver was built for. If a Stereolabs driver package is installed that isn't in the table, `zed.driver` logs a warning and leaves it alone. The downloaded package must match a pinned SHA-256 checksum. If Stereolabs changes the file, `zed.driver` rejects it. > [!WARNING] > > The new driver loads only at boot, so you must **reboot** after the update. Run by itself, `zed.driver` only prints a notice. [`axol provision`](/cli/provision#reboots), the installer and the `axol serve` updater reboot for you at a safe time. The updater waits until no operation is running. # zed.install Source: https://docs.almond.bot/cli/zed-install Install the pyzed Python package that matches the installed ZED SDK. Installs the `pyzed` Python package that matches the installed ZED SDK version. `pyzed` isn't on PyPI, so this command downloads it from Stereolabs and installs it into the `axol` environment. The download is cached in `~/.almond/wheels/`. ```bash theme={null} axol zed.install axol zed.install --force # reinstall even when the matching version is present ``` | Flag | Description | | - | - | | `--force` | Reinstall pyzed even when the matching version is installed. Without it, the command does nothing when pyzed already matches the SDK. | `zed.install` checks the downloaded package's name, version and contents before it installs it, and refuses one that doesn't match. > [!NOTE] > > Install the **ZED SDK** at `/usr/local/zed` first. `zed.install` reads the SDK version to pick the right package. If the SDK is missing, it exits with an error that points to the [Stereolabs download page](https://www.stereolabs.com/developers/release). The [one-command install](/installation) runs `zed.install` whenever the SDK is present. # Calibrating Axol Source: https://docs.almond.bot/guides/axol-calibration 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 Host Computer, run: ```bash theme={null} axol tune.factory ``` You can also press **Factory calibration (all joints)** in the [diagnostics dashboard](/guides/diagnostics-dashboard). 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`](/cli/tune-factory). The new calibration takes effect on this computer as soon as the run finishes. It is saved to `~/.almond/calibration.json`. ## After you change the end-effector or add cameras Gravity compensation needs to know how much the wrist weighs. The gripper and everything mounted on it count as one link, `wrist_3`. That includes wrist cameras, brackets, screws and a different gripper. The default `wrist_3` mass is 0.75 kg, for the standard gripper with the Camera Kit wrist camera and its mount. With the parcel gripper (**Gripper** set to `parcel`) the default is 0.6 kg. The calibration measures where each link's weight sits, but it can't measure how heavy the link is. Enter the new mass before you calibrate. Otherwise the extra weight is spread over the wrong links, and the elbow and shoulders are compensated less accurately. **1. Weigh the parts** Weigh everything you added to one wrist: camera, bracket, screws, and the cable up to its first tie point on the arm. Also weigh any parts you removed or left off, such as the Camera Kit wrist camera and its mount. **2. Work out the new mass** Start from the current `wrist_3` mass. Add what you added and subtract what you removed. For example, if your camera and bracket weigh 30 g more than the Camera Kit wrist camera and mount they replace, the new mass is 0.75 + 0.03 = 0.78 kg. A Camera Kit wrist camera counts as stock, so you don't need to change the mass for it. **3. Enter the mass** In the control panel, open **General settings → Advanced** and search for `wrist_3`. Set **mass** in the `wrist_3` row of both arms' tables, then press **Save**. Teleop, data collection and the calibration all use this value. You can also pass the mass to the calibration instead: `axol tune.factory --mass wrist_3=0.78`. It is saved with the calibration. **4. Route the cables** Tie each camera cable to the arm on both sides of the wrist and elbow joints. Leave a loose loop across each joint, so the cable doesn't pull when the joint turns. A cable that pulls on a joint throws off its calibration. **5. Calibrate** Run `axol tune.factory`. If only one arm changed, set that arm's mass and run `axol tune.factory --arms left` or `--arms right`. ## If a gravity fit is rejected The run prints `Gravity fit rejected` when the fit would move a joint's center of mass more than 60 mm. The joint still gets its friction calibration and keeps its current gravity values. Axol works normally for teleop and data collection. A few rejected fits are normal, even on a stock Axol. The `elbow` and `wrist_1` links are light, so their fits are often rejected. Up to half of the 14 joints can be rejected. Look into it only when joints that passed before are rejected after a change: * **More joints rejected after you added weight to the wrist:** [enter the new mass](#after-you-change-the-end-effector-or-add-cameras) and calibrate again. * **Different joints rejected on each run:** check that nothing touches the arm during the sweeps and that no cable catches or pulls. Each run starts from the last saved values, so a second run can show larger shifts on joints that passed before. ## 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= ``` 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`](/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`](/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`](/cli/tune-friction) for friction and [`tune.gravity`](/cli/tune-gravity) for gravity. Then upload the result with `axol calibration.push`. # Web Control Panel Source: https://docs.almond.bot/guides/control-panel Connect to Axol from a browser, set up cameras and settings, and run every operation without a terminal. The **web control panel** is a browser page for running Axol. Use it to connect to the robot, assign cameras, change settings, and run teleoperation, gravity compensation, jogging, data collection, dataset replay and policies. It is served by [`axol serve`](/cli/serve). The sidebar on the left switches between its pages. On a phone, open it with the **☰** button. | Page | What it is for | | - | - | | **Overview** | What is running, what to set up next, quick start and recent datasets. | | **Devices** | The Host Computer, Axol, Mantis and Jelly, and what Axol is mounted on. | | **Operations** | Every operation. Open one, fill in its fields and press **Start**. | | **Datasets** | Watch recorded episodes, check their robot data and fix their task text. | | **Request teleoperator** | Pay Almond to finish a one-off task on your Axol remotely. | | **Request data** | Pay Almond to collect a training dataset of your task. | | **Settings** | Settings shared by every operation and every browser. | | **Diagnostics** | Motor telemetry, tests and tuning. See [Diagnostics dashboard](/guides/diagnostics-dashboard). | | **Logs** | The output of the latest operation. | The Host Computer you are connected to, and whether the selected device is connected, show at the top right of every page. Click it to open **Devices**. Before you connect, the **Overview** shows a **Connect** button. ## Open the control panel With the [one-command install](/installation), the server already runs on the Host Computer (the one wired to the arms, with the ZED cameras attached). It starts at boot and restarts if it stops. Open [axol.almond.bot](https://axol.almond.bot) and connect to the host. On a development install, start the server yourself: ```bash theme={null} axol serve ``` It prints a local and a LAN URL: ``` Axol control panel: Local : https://localhost:8001 LAN : https://192.168.1.50:8001 ``` Open the **Local** URL on the Host Computer, or the **LAN** URL from another machine on the same network. Accept the self-signed certificate the first time. The panel is at `/control`, and it works on a phone or tablet too. > [!NOTE] > > On a development install, build the local UI once (`cd web && npm install`, then `npm run build` for the `axol-vr-client` and `app` workspaces). Or skip the build and use the hosted UI at [axol.almond.bot](https://axol.almond.bot), which connects to your `axol serve`. See [Development install](/advanced/development-install#build-the-web-ui). > [!TIP] > > **Quickstart** at the bottom of the sidebar has commands to copy for installing the CLI and starting the server. ## Connections The **Overview** lists your devices on one line each, with a **Connect** button for one that is plugged in but not connected. Mantis and Jelly show once they are plugged in. The **Devices** page has a card each for the **Host Computer**, **Axol**, **Mantis** and **Jelly**. Each card shows the device's status, with **Connect** or **Disconnect** at the top right. Press **Open settings** on a card to open that device's [settings](#settings). On the **Host Computer** card, it opens the general settings. **Choose the device.** Every operation runs on either Axol or Mantis. The chosen card shows **Selected**. Press **Use for operations** on the other card to switch. * With Mantis selected, only **Teleoperation** and **Collect data** are offered. * The choice is saved on the host, so every browser sees the same one. * You can't change it while an operation is running. * If only one of Axol or Mantis is plugged in, the panel selects it for you. > [!WARNING] > > Closing the browser tab, or disconnecting from the host, does **not** stop anything. The robot connection and any running operation keep going in `axol serve`. Press **Stop** to end an operation. Every browser connected to the same host sees the same running operation. An operation started from another browser or a phone shows up within a couple of seconds, and you can stop it from here. ### Host Computer The **Host Computer** is the computer running `axol serve`. Press **Connect** on its card and enter the host's IP address (port `8001` is assumed). Click the field to pick from the last five hosts this browser connected to. If the host doesn't answer within a few seconds, the dialog says it can't reach the host. Once connected, the card shows the host's name and its installed version (for example `Axol v0.1.2`). Teleoperation and gravity compensation need nothing else. The connected card has three buttons: | Button | What it does | | - | - | | **Restart** | Reboots the Host Computer after you confirm. Reconnect when it is back, usually in under a minute. | | **Shut down** | Powers the Host Computer off after you confirm. You need physical access to turn it back on. | | **Disconnect** | Disconnects this browser only. The server, the robot and any running operation keep going. | **Restart** and **Shut down** wait until no operation is running and no update is installing. On a development install they need passwordless `sudo`, or the host reports that it couldn't restart and stays up. #### Updates When a newer [release](https://github.com/almond-bot/axol/releases) is available, a banner at the top of every page shows the version change and links to the release notes. Nothing updates until you press **Update**. 1. Stop any running operation. **Update** is disabled while one runs. 2. Press **Update**. The button shows each step: `Upgrading…`, `Installing packages…`, `Restarting…` or `Rebooting host…`. 3. Wait for the panel to reconnect on the new release. Some updates reboot the host. If a required step fails, the error names it. Press **Update** to try again. Optional steps, such as Lighthouse tracking, show a warning instead of stopping the update. Each step's full output is in `/var/log/almond-axol/` on the host. The banner also warns when the panel and the host run different versions. This happens with an old browser tab or an outdated local UI build. Update the host, or rebuild the local UI. #### Axol version Axol comes in several versions with the same arms. The version tells Axol where its mount is, so the arms don't hit it, and sets the joint limits. When Jelly is attached, Axol uses **Axol on Jelly** automatically. This applies while Jelly's wheel or lift adapter is plugged in and not switched off under **Jelly settings → Wheels & lift**. Otherwise, pick what Axol is mounted on under **Mount** at the top of **Axol settings → Robot**, then press **Save**: | Version | Mount | | - | - | | **Axol Legacy** | The original model, and the default. | | **Axol Standalone** | No mount. Axol is bolted to your own table or fixture. | | **Axol on Ox Cart** | On the Ox Cart's lift column, with the lift fully raised. | | **Axol on Owl Mount** | On the Owl Mount's column. | You can preview any card by hovering it. You can pick one only while Axol is connected. Until a version is saved, **Set up** on the **Overview** shows the mount cards with a **Save** button. The **Devices** page shows the same cards under **What is Axol mounted on?**. Runs that drive the arms list *Choose what Axol is mounted on* under [Before you start](#before-you-start). Sim runs and runs with the arms off don't need it. While Jelly's wheel or lift adapter is plugged in, the panel doesn't ask what Axol is mounted on. On Axol on Jelly with the parcel gripper (**Gripper** in **Axol settings → Robot**), the panel uses the parcel gripper's model. To force a version, set `kinematics.robot_model` under **General settings → Advanced → Kinematics**, or pass `--kinematics.robot_model` on the CLI. ### Axol and Mantis The panel finds the CAN adapters plugged into the host and connects the selected device automatically. On a new hub, it first identifies each adapter (Axol arm, Mantis rig, Jelly wheels or Jelly lift) and names it, the same way [`axol can.setup`](/cli/can-setup) does. If the automatic connection fails twice, press **Connect** on the card. After you press **Disconnect**, the panel doesn't reconnect that hardware automatically until you press **Connect** or change the selection. **Switching between Axol and Mantis.** Unplug one and plug in the other. The panel sees that the connected device is gone, identifies the new one and connects it. You don't need to press **Disconnect** first. **If hardware is plugged in but not answering.** The **Overview** and **Devices** say *Hardware is plugged in but not answering*. This usually means its power is off. Turn it on: the panel checks again on its own and connects it. While Axol or Mantis is connected, press **Check again** instead. If it still doesn't connect, run `axol can.setup` in a terminal. To change which CAN interface each side uses, go to **Axol settings → Robot** or **Mantis settings → CAN**. **Motor status.** While no operation runs, the panel checks every motor once a second: all 16 Axol motors, or the two Mantis grippers. Each motor is a square on the card, next to how many are OK. Hover a square to see its status and temperature. | Square | Meaning | | - | - | | Green | Reachable and reporting no error. | | Red | Unreachable or reporting a fault. Operations on that device can't start until you fix it. Sim teleop still works. | | Grey | Unknown, because a running operation is using the bus. | **If motor power is cut.** If you cut motor power during a run, for example with the E-Stop, the run stops with `motor power lost`. Usually the panel then releases the robot without any action from you. If it can't confirm the motors are off yet, it shows a lock message: 1. Release the E-Stop to turn motor power back on. 2. Wait a few seconds. The panel unlocks on its own once every motor reads off. 3. If the message stays, press **Re-check motors**. A motor it names still has torque on: press the E-Stop, wait a few seconds, then press **Re-check motors** again. **Mantis.** Press **Use for operations** on the Mantis card. See [Mantis Hardware](/mantis/hardware) for the rigs and hub. * **Teleoperation** drives the grippers from the rig triggers. It needs only CAN, with no tracking. * **Collect data** uses the pose source set under **Mantis settings → Tracking**. See [Mantis Tracking](/mantis/tracking). * Mantis can't run **Run policy** or **Collect DAgger**. ### Jelly The **Jelly** card has one **Connect** button. It connects the wheels and the lift, whichever are plugged in. **Disconnect** drops both. A row each for the wheels and the lift shows its status. Jelly is driven together with Axol, so it isn't part of the device choice. While the lift is connected, the card shows the battery charge and pack voltage. The icon is green above 25%, amber at 25% and below, red at 10% and below, and blue while charging. * A reading with `~` (for example `~40%`) was measured while Jelly was moving, so it reads low. * While an operation uses the bus, the last reading stays dimmed. Hover it to see its age. * The figure is a rough range, not an exact gauge. For an exact charge, use the batteries' LiTime Bluetooth app. From Python, [`Jelly.battery`](/api/robot#jelly) returns the same estimate. ## Settings Settings that apply to every run live on the **Settings** page. Switch between **Axol**, **Mantis**, **Jelly** and **General** at the top of the page, or press **Open settings** on a card on **Devices**. **Axol settings** | Tab | What's in it | | - | - | | **Cameras** | Camera previews and the Axol camera layout. See [Cameras](#cameras). | | **Robot** | **Mount** ([Axol version](#axol-version)), arm stiffness, CAN channels, gripper type and limits, gravity-comp damping and rate, the contact stops, and the **Axol arms** switch. | | **Teleop & VR** | Teleop rate, position and rotation multipliers, **Hold grips to engage**, [controller haptics](/operations/teleop#controller-haptics) and **Park to zero on stop**. | | **Rest pose** | A 3D editor with a slider per joint. The arms start from and return to this pose in teleop and data collection. | | **Kinematics** | The **IK solver** (`jax` by default, or `mink`, see [Mink IK](/operations/mink)) and its main weights. | **Contact stops.** The **Return-to-rest contact stop** is always on: it stops a return to rest that runs into something and leaves the arms limp. The **Teleop contact stop** and **Policy contact stop** are off by default. Turn one on to stop the arms and leave them limp when they push on something during teleop or a policy run. Raise a threshold if normal motion trips it. **Axol arms.** Turn it off to drive only Jelly from the headset. Axol doesn't need to be connected then. **Mantis settings** | Tab | What's in it | | - | - | | **Tracking** | The pose source (Quest or Lighthouse) and its setup steps. See [Mantis Tracking](/mantis/tracking). | | **Triggers** | **Left trigger full squeeze** and **Right trigger full squeeze**, which scale each trigger to a full close (default `1.0`). See [Testing the triggers and grippers](/mantis/hardware#testing-the-triggers-and-grippers). | | **Cameras** | The Head, Left Mantis and Right Mantis camera layout, kept separate from Axol's. | | **CAN** | The left and right Mantis CAN interfaces (`can_mantis_l` and `can_mantis_r` by default). Swap the two values to swap sides without moving cables. | **Jelly settings** | Tab | What's in it | | - | - | | **Wheels & lift** | **Jelly wheels** and **Jelly lift**. Turn one off to leave that part of Jelly still, even when it is attached. | | **Parameters** | Drive speeds and other Jelly settings. | **General settings** | Tab | What's in it | | - | - | | **Quest** | The [Quest over USB](#quest-usb) link and **Keep awake**. | | **Recording** | Dataset fps, video codec, dataset root, push to the Hugging Face Hub, and the Rerun viewer address. | | **Inference** | Device, inference server host and port, episode length, and action chunking. | | **System** | Log level. | | **Advanced** | Every other setting, grouped by subsystem, with a search box. Per-joint gains show as one table per arm. | Recording fps above 60 raises the cameras' capture rate to match. The ZED X supports rates above 60 only at `SVGA`. **Saving.** Changes stay in your browser until you press **Save** (or **Discard**). They are kept while you visit other pages, and a dot next to **Settings** in the sidebar shows that some are unsaved. Settings are saved on the host in `~/.almond/settings.json`, so every operation and every browser uses the same values. The [`axol` CLI](/cli/configuration#the-shared-settings-file) and the [SDK](/api/robot#shared-settings) read the same file. A field you haven't set shows its default in grey, and a changed field has a reset button. **Export** and **Import** at the bottom of the settings save the whole settings file as JSON, or load one. Use them for backups or to copy settings to another robot. The [Settings File](/guides/control-panel-settings) page describes the file. Each operation's **Config Parameters** page, such as [Teleoperation](/operations/teleop-config), lists every setting with its default. ### Cameras Data collection and policies need ZED cameras on the host. Assign Axol's cameras under **Axol settings → Cameras** (overhead, left arm, right arm). Assign Mantis cameras under **Mantis settings → Cameras** (Head, Left Mantis, Right Mantis). The two layouts are saved separately. Camera assignments are saved on the host, so each robot keeps its own. A host with no cameras assigned shows none until you assign them. Each panel lists the cameras plugged into the host, with serial number, type (stereo ZED X or mono ZED X One), model and a preview frame. Use the preview to tell which camera is which. * Press **Refresh** to list the cameras again and update the previews. * Press **Restart camera service** after you plug in or unplug a GMSL camera. * Previews aren't available while an operation is using the cameras. **Stream and Record.** Each layout has two outputs: | Output | Where it goes | | - | - | | **Stream** | The live video in the VR headset during teleop and data collection. | | **Record** | The video saved in the dataset. **Run policy** and **Collect DAgger** also feed the policy at this resolution, so it matches the training data. | Each output has a resolution setting (`SVGA`, `HD1080` or `HD1200`) or **Off**. Each camera has separate **Stream** and **Record** switches. A stereo camera has **L** and **R** checkboxes for each eye instead. This lets you, for example, stream both eyes of the overhead camera for depth and record only one. A stereo overhead camera with both eyes recorded is saved as two cameras, `overhead_left` and `overhead_right`. A single eye is saved under the slot name, like a mono camera. **What each operation needs.** * **Collect data**, **Run policy** and **Collect DAgger** need at least one camera with **Record** on. A camera set to stream only doesn't count. * They also check that every assigned camera is plugged in, and name any missing serial. Reconnect it, then press **Refresh** (or **Restart camera service**). * **Teleoperation** streams whatever is set up and is never blocked by cameras. The Mantis **Head** slot starts unassigned. A slot you leave unassigned is off. ### Quest USB The **Quest** tab under **General settings** runs the optional [Quest over USB](/guides/quest-over-usb) link. It sends the controller poses over a USB cable for lower latency. Camera video still uses the network. 1. Plug the Quest into the Host Computer with a USB-C cable. 2. The first time, put the headset on and accept **Allow USB debugging?**. 3. The link connects automatically and shows *Controller over USB*. Press **Connect** to retry if it doesn't. If the cable is pulled, poses continue over Wi-Fi with no reconnect. For [headless](/guides/quest-headless) use, press **Keep awake** with the headset plugged in. The headset keeps the VR session running while it sits on a table. **Allow sleep** turns normal sleep back on, and so does rebooting the headset. ## Operations The **Operations** page shows every operation as a card, grouped into **Drive**, **Record** and **Play back**. Each card says what the operation needs, or what is in the way. **Quick start** on the **Overview** offers the ones you used last. Click a card to open the operation. Fill in its fields under **Run details** and press **Start**. The panel asks only for values that change between runs, such as a dataset name or a policy path. Everything else is in [Settings](#settings). * Hover the **ⓘ** next to a field for its description. * Some fields offer a list to pick from, such as the datasets on the host. You can still type your own value. * A few fields accept only values from their list. **Start** stays disabled with *Pick \ from the list* until you pick one. * Your browser remembers these values for next time. While the operation starts, its screen shows what it is doing and how far along it is, such as **Warming up IK** at 40%. The **Overview** and the chip at the top of every page show the same. Once it is ready, it shows **Running** and how long it has run. Starting takes a few seconds to a minute, depending on the operation and on whether cameras, a dataset or a policy have to load. | Operation | Needs | What it does | | - | - | - | | **Teleoperation** | Axol, Mantis, or sim | Drive Axol from a Quest. With Jelly attached, the thumbsticks drive Jelly too. With Mantis selected, drive the rig grippers from their triggers. Turn on **sim** to drive a simulated Axol in the browser, and pick its version under **Sim robot**. See [Teleoperation](/operations/teleop#run-it). | | **Gravity compensation** | Axol | Hold the arms weightless so you can move them by hand. | | **Waypoints** | Axol or sim | Teach a path by hand and replay it. See [Waypoints](#waypoints). | | **Jog** | Axol, Jelly, or sim | Move a gripper to a pose you drag in 3D, jog it with buttons, and drive the lift and Jelly. See [Jog](#jog). | | **Collect data** | Axol or Mantis, and cameras | Record episodes into a LeRobot dataset. Pick an existing dataset under **repo id** to add to it. See [Data collection](/operations/data-collection#run-it). | | **Replay dataset** | Axol | Play a recorded episode on the arms, then return to rest. Turn on **loop** to repeat until **Stop**, and **interpolate** to smooth playback. | | **Run policy** | Axol and cameras | Run a LeRobot policy on the robot or on an [inference server](/cli/inference-server). Choose policy type `custom` to run [your own model](/operations/custom-policy), which needs no checkpoint path. | | **Collect DAgger** | Axol and cameras | Run a policy and correct it from VR, recording both. A `custom` policy needs `hold_to_intervene=true`. See [`collect-dagger`](/cli/collect-dagger). | > [!NOTE] > > Recordings go to the **Dataset root** setting. By default this is `~/.cache/huggingface/lerobot` of the account that ran the installer, so the panel and the CLI see the same datasets. ### Waypoints 1. Start **Waypoints**. The arms go into gravity compensation. 2. Move the arms by hand and press **Record waypoint** at each pose. Use **Undo last**, **Clear all** and the gripper buttons as needed. 3. Once you have two or more waypoints, press **Play** to replay the path as straight-line moves. **Stop playback** stops it. Lower the **Speed scale** slider to try a new path slowly. Turn on **sim** to preview a saved path in the browser. See [`waypoints`](/cli/waypoints). ### Jog Use **Jog** to move Axol from the browser without a headset. Open **Jog** under **Drive** on the **Operations** page. Turn on **sim** to jog a simulated Axol, and pick its version under **Sim robot**. When jogging starts, the arms hold their pose. A 3D view of Axol sits beside a **Telemetry** panel that shows both arms' joints, the lift and the base. On the robot, the camera feeds play under the 3D view. The controls are in tabs: | Tab | What it does | | - | - | | **Arm move** | Pick **Left** or **Right**, drag the target in the 3D view, then press **Plan move**. An orange preview shows where the arm will go. Press **Execute** to move it, or **Stop move** to halt it. | | **Jog gripper** | Hold a button to move or turn the gripper along one axis. It stops when you let go. Choose **Robot** or **Gripper** axes, and a speed. | | **Lift** | Hold **Raise** or **Lower** to move Jelly's lift. Shown on Axol on Jelly. | | **Drive** | Hold the drive pad to drive Jelly, and **Turn left** or **Turn right** to turn in place. Shown on Axol on Jelly. | * In the 3D view, drag the arrows to move the target and the rings to turn it. Drag empty space to orbit, and scroll to zoom. * If the target is out of reach, the plan goes to the closest pose it can reach and shows how far off it is. * **Reset target** puts the target back on the gripper. **Go to rest** moves both arms to the rest pose. * Every plan avoids collisions between the arms and the body. **Keyboard and game controller.** Open the help button on the controls card for the full list. They work on every tab. | Input | Action | | - | - | | `W` `A` `S` `D`, or the left stick | Drive Jelly | | Left and right arrow keys, or the right stick | Turn Jelly in place | | Up and down arrow keys, or the D-pad up and down | Raise or lower the lift | | D-pad left and right | Choose the left or right arm | | Hold LT | Move the gripper: left stick across, right stick up and down | | Hold RT | Turn the gripper: left stick tilts, right stick turns | To use a game controller, plug it in, click the page and press any button on it. If the page says the controller isn't supported, move the switch on the back of a Logitech controller to the other letter (D on a Mac). Everything stops when you let go or leave the page. Press **Stop** to end the run. The arms move to the rest pose before the motors turn off. See [`jog`](/cli/jog) for the speed settings. ### Before you start **Start** stays disabled until the operation has what it needs. A **Before you start** list says what is missing, with a button that opens the place to fix it, for example: * *Connect Axol* * *Choose what Axol is mounted on* (see [Axol version](#axol-version)) * *Axol isn't answering. Turn on its power.* when no motor answers * *Left arm isn't answering. Check its power and cable.* when no motor on one arm answers * *Fix the motor fault on*, followed by the motor and the fault * *Assign a camera and enable Record in Axol settings → Cameras* * *Identify left + right Lighthouse trackers* Fix tracker problems under **Mantis settings → Tracking** ([Mantis Tracking](/mantis/tracking)). Tracker-to-TCP transforms are a [file on the host](/cli/tracker#transform-file). Tracking only matters for Mantis data collection. Mantis teleop needs only CAN. ### Logs and stopping The newest line of output shows below the operation. If the operation stops with an error, that line turns red and shows the error. Click it, or open **Logs** in the sidebar, to see the full output, including messages from the ZED SDK, GStreamer and CUDA. * The log follows new lines while you are scrolled to the bottom. Scroll up to read, and press the arrow button to jump back. * The download button saves the log to a `.log` file to attach to a bug report. While an operation runs, its page shows how long it has run. Every other page shows its name at the top right, and **Operations** in the sidebar has a green dot. The **Overview** also shows it with **Open** and **Stop** buttons. Press **Stop** to end an operation. The badge shows **Stopping…** until the operation has shut down, then the robot returns to idle. You can disconnect Axol only when no operation is running. ## Operator view During **Teleoperation**, **Collect data** and **Collect DAgger**, the panel shows the same camera feeds as the headset. You can watch the robot's view without wearing the headset. The [camera layout](#cameras) decides what streams. Sim runs and runs with **Axol arms** off show no feeds. Press the fullscreen button on the camera feeds to fill the screen. Press **Esc** or **Exit fullscreen** to leave. If the feeds never connect, press **Authorize** to accept the stream's self-signed certificate, the same one-time step as in the [VR app](/guides/vr-interface). ## Episode controls While **Collect data**, **Run policy** or **Collect DAgger** runs, an **Episode control** box appears in the operation card. It shows the phase (Ready, Recording, Saving, Resetting and so on), the episode number and the number saved. Every connected browser sees the same state. To end the whole session, press **Stop**. Some operations also show a setup card with an instruction, a list of items and a layout grid, for example the scene to set up next. **Hide setup** and **Show setup** fold it away. **Run policy and Collect DAgger** | Button | What it does | | - | - | | **Start episode** | Start the next rollout once the scene is reset. | | **Save** | Save the episode. Then press **Start episode** for the next one. | | **Discard** | Drop the episode. The arms go limp so you can move them out of the way by hand. Then press **Return to rest**. | | **Return to rest** | Send limp arms back to rest from where they are. It appears after **Discard**, or when the arms hit something (phase **Contact**). Clear the arms by hand first. | These match the `s` and `r` keys and the Enter prompts of [`run-policy`](/cli/run-policy). To correct a policy from VR in **Collect DAgger**, see [Intervening](/operations/dagger#intervening). **Collect data** | Button | What it does | | - | - | | **Start recording** | Start the next take after a 3-second countdown, so you can pick up the controllers. Press again to cancel. | | **Save episode** | End the take and save it, like **A** in the headset. Press twice to confirm. | | **Discard episode** | End the take and drop it, like **X** in the headset. Press twice to confirm. | | **Return to rest** | Appears when the arms hit something and went limp (phase **Contact**). Clear the arms by hand, then press it, or press **X** on the controller. | If a take ends without being saved, the box shows the reason in red until the next take starts. With Axol or Mantis on Quest, the VR controllers also work, and whichever input comes first wins. With Mantis on Lighthouse, no headset is needed: * Squeeze and release both rig triggers together to engage tracking and start a take. **Start recording** works only after the rig is engaged. * While recording, press either trigger three times to save, or four times to discard. ## Datasets The **Datasets** page plays the datasets on the host. Pick a dataset and an episode. All of the episode's cameras play side by side with one play button and scrub bar. The menu next to the scrub bar sets the playback rate: **15 fps** (the default), **30 fps** or the full recorded rate. Full rate with four cameras needs about 85 Mbps, more than most Wi-Fi or Tailscale links carry. Nothing downloads until you press play. **Rename a task.** Type the new task text, or pick one of the dataset's tasks, and press **Save task**. The change is written into the dataset, so replay and training see the new text. During a recording session, the page follows the dataset being recorded and selects each take once it is saved. You can review earlier takes and fix a mistyped task without stopping the session. ### Check an episode's robot data Under the videos, **Robot data** shows what the episode recorded, so you can check a teleop or Mantis take before you train on it. Everything follows the scrub bar. Click a chart to move to that moment. * **Checks** at the top flag dropped frames and the largest jump between two frames. A jump of more than 5° in a joint or 3 cm at a gripper is marked. It is usually a re-engage, lost tracking or a glitch. Click it to go to that frame. * **3D view.** The robot model replays the recorded joints, and a line shows each gripper's path. A marker shows the gripper at the current frame, with its axes. Mantis episodes record gripper poses, not joints, so the arms stay still and the paths show the motion. * **Charts.** **Joints** shows each arm's joint angles in degrees. **Gripper pose** shows each gripper's position in cm and its rotation in degrees. For Mantis it also shows the lag between the cameras and the trackers. **Gripper opening** shows how far open each gripper is. * **Show commanded** adds what the robot was told to do, drawn see-through. A gap between the two lines is the arm lagging its command. Gripper poses are in the robot's frame, at the gripper mount. For a joint episode, the panel works them out from the recorded joints. The 3D view uses the Axol version set under **Axol settings → Robot**. ## Request teleoperator Have an Almond operator control your Axol remotely to finish a one-off task for you. Open **Request teleoperator** in the sidebar. The **Overview** and **Teleoperation** pages also have a card that leads there. 1. Under **Hours of credit**, enter the hours you expect the task to take. The form shows the hourly price and the total. 2. Describe the task: what the robot should do, with which objects, and what counts as done. 3. Optionally, add an example of the task: a link to a video, or a Hugging Face dataset of sample episodes. 4. Press **Buy credit** and pay on Stripe's checkout page. You pay for the credit up front. Almond bills the session by the minute and refunds any credit you don't use. After you pay, Almond emails you to schedule the session. ## Request data Get a LeRobot dataset of your task, ready for training. Open **Request data** in the sidebar. The **Collect data** page also has a card that leads there. 1. Choose how Almond collects the data under **How Almond collects it**: * **Almond's Axol**: Almond builds your setup and records the task with teleop on its own Axol. * **Your Axol**: an Almond operator controls your Axol remotely and records the task in your space. 2. Enter the hours of usable data you want. The form shows the hourly price for the method you chose, and the total. 3. Describe the task: what the robot should do, with which objects, and what counts as done. 4. Optionally, add an example of the task: a link to a video, or a Hugging Face dataset of sample episodes. 5. Press **Continue to payment** and pay on Stripe's checkout page. You pay per hour of usable data, however long recording takes. After you pay, Almond emails you to plan the collection. Both requests need an internet connection on the computer running the browser. To hide a card, press **×** on it. **Request teleoperator** and **Request data** stay in the sidebar. ## Next steps > [card] [Diagnostics dashboard](/guides/diagnostics-dashboard) > > Live motor telemetry, health tiles and diagnostic scripts under **Diagnostics** in the sidebar. > [card] [serve reference](/cli/serve) > > Flags, TLS, and what the server exposes. > [card] [VR interface](/guides/vr-interface) > > The WebXR app that drives teleop and recording. # The Robot's Settings File Source: https://docs.almond.bot/guides/control-panel-settings The layout of ~/.almond/settings.json and what each section controls. `~/.almond/settings.json` on the Host Computer holds the robot's settings. Every tool uses it: * The [control panel](/guides/control-panel#settings) edits it and applies it to every operation it starts. **Export** and **Import** in the panel save and load this file. * The [`axol` CLI commands](/cli/configuration#the-shared-settings-file), such as `axol teleop`, `gravity-comp` and `collect-data`, read it by default. * The [SDK constructors](/api/robot#shared-settings) (`Axol()`, `VRTeleop()`, `Jelly()`, `Mantis()`) build their default configs from it. ## Which value wins When a value is set in more than one place, the later one in this list wins: 1. The built-in defaults. 2. The settings file. 3. A `--config_path` file. 4. CLI flags. On the CLI, `--no_settings` skips the file and `--settings_path PATH` reads a different one. In the SDK, a config or channel argument you pass overrides the setting. ## Layout The file has one object per section. It stores only the values you have changed. Anything missing uses the default. ```json theme={null} { "version": 2, "axol": { "left_stiffness": 0.8, "has_gripper": true, "left": { "elbow": { "kp": 60 }, "gripper": { "torque_limit": 0.4 } } }, "teleop": { "frequency": 240, "rest_pose_left": [-0.15, 0, 0, 0.31, 0, 0, -0.15] }, "kinematics": { "pos_weight": 100 }, "robot": { "left_channel": "can0", "right_channel": "null" }, "gravity": { "kd": 0.5 }, "recording": { "fps": 30, "root": "/data/lerobot" }, "cameras": { "serials": { "overhead": "12345" } } } ``` The `axol`, `teleop`, `kinematics`, `jelly` and `vr_server` sections have the same fields as the matching configs. They use the same names as a teleop [`--config_path`](/cli/configuration) file, the operation config pages and the SDK: * `axol` is the [robot config](/operations/teleop-config#robot). * `teleop` is the [teleop session](/operations/teleop-config#teleop). * `kinematics` is the [kinematics config](/operations/teleop-config#kinematics). * `jelly` is the [Jelly config](/operations/teleop-config#jelly). * `vr_server` is the VR server. You can set any field in these sections. The panel shows the common ones as controls and the rest under **Advanced**. Each value applies to every operation that uses it. | Section | Contains | Used by | | - | - | - | | `axol` | Arm stiffness (`left_stiffness`, `right_stiffness`), `has_gripper`, `gripper` (`parallel` or `parcel`), per-joint gains and masses, and gripper limits such as `left.gripper.torque_limit` (at most 5 Nm). | Every operation | | `teleop` | `frequency`, `position_multiplier`, `rotation_multiplier`, `hold_to_engage`, `park_to_zero`, the rest pose (`rest_pose_left`, `rest_pose_right`) and the contact thresholds. | Teleop, data collection, DAgger. Some fields also apply to run policy and replay. | | `kinematics` | `mount` (`classic`, `standalone`, `ox_cart` or `owl`), `robot_model`, the IK weights and `max_joint_delta`. | Teleop, data collection, DAgger | | `jelly` | `wheels` and `lift` (the **Jelly wheels** and **Jelly lift** switches), `max_speed` and the other drive settings. | Teleop, data collection, DAgger | | `vr_server` | The VR server's `port` and other settings. | Teleop, data collection, DAgger | | `lerobot` | LeRobot `robot_config` fields such as `observe_torques`, `observe_cartesian`, `id` and `calibration_dir`. | Data collection, DAgger, run policy, replay | | `lerobot_teleop` | LeRobot `teleop_config.id` and `teleop_config.calibration_dir`. | Data collection, DAgger | | `robot` | `left_channel` and `right_channel`, the arms' CAN interfaces. `"null"` turns an arm off. | Every operation, diagnostics dashboard | | `gravity` | `kd` and `rate_hz` of gravity compensation. | Gravity compensation, waypoints | | `mantis` | `source` (`lighthouse` or `quest`), `quest_tracker_key`, and the Mantis CAN channels (`can_mantis_l` and `can_mantis_r` by default). | Mantis data collection and teleop | | `recording` | `fps`, `replay_fps`, `vcodec`, `root`, `push_to_hub`, `record_jelly` (the **Record Jelly** switch), `rerun_ip` and `rerun_port`. | Data collection, DAgger, run policy, replay | | `inference` | The [run policy](/operations/run-policy-config) settings, such as `device`, `server_host`, `server_port` and `episode_time_s`. | Run policy | | `system` | `hardware_profile` (`axol` or `mantis`, the device chosen in the panel) and `log_level`. | Every operation | | `cameras` | The camera layouts set in the panel. | Teleop, data collection, DAgger, run policy | `kinematics.mount` is what Axol is mounted on when Jelly isn't attached, set by **Mount** in the panel. `kinematics.robot_model` forces a version: any `mount` value, or `mobile` for Axol on Jelly. Leave it unset to use Axol on Jelly whenever Jelly is enabled, and `mount` otherwise. See [Axol version](/guides/control-panel#axol-version). ## Version 1 files A version 1 file has a flat `values` map with keys such as `robot.left_stiffness`, and an `advanced` map. Axol reads it and saves it in the layout above the next time settings are saved. You can import a version 1 file into the panel too. # Diagnostics Dashboard Source: https://docs.almond.bot/guides/diagnostics-dashboard Check motor health, watch live telemetry, and run tests and tuning from the browser. The diagnostics dashboard is part of the [control panel](/guides/control-panel). Click **Diagnostics** in the sidebar, or open [axol.almond.bot/diagnostics](https://axol.almond.bot/diagnostics) (`https://:8001/diagnostics` on your network). It also works on a phone or tablet. The dashboard has four pages, listed under **Diagnostics** in the sidebar: | Page | What's on it | | - | - | | **Live** | The CAN devices, [motor status](#motor-status), [control loop timing](#control-loop-and-can-timing) and [live telemetry](#live-telemetry). | | **Tests and helpers** | [Tests](#tests) and [helpers](#helpers). | | **Tuning** | The [tuning](#tuning) workbench. | | **Run history** | Past runs and their output. See [Run history](#run-history). | The **Hardware** section at the top of **Live** lists each device on CAN (Axol or Mantis, and Jelly's wheels and lift), and lets you connect or disconnect each one. ## Motor status Each motor has a card with its status, temperature, bus voltage and position, updated once a second. Axol shows 8 motors per arm. Mantis shows the gripper (ID 8) on each side. * A card reads **OK** whether the motor is enabled or disabled. * A card turns red when the motor reports an error, such as over-temperature or lost communication, or doesn't answer. * A card shows a short name for the error, such as **Shaft encoder**. Hover the status to see the full name, or open the card's details. * Click a card to see the motor's details: model, firmware, control mode, gains and live readings. ### Change a motor's parameters For a MyActuator motor, the card's dialog has a **Parameters** tab next to **Details**. It shows the motor's configuration in groups: **Protection parameters**, **Motion planning parameters**, **Motor parameters** and **Motor information**. 1. Type a new value, or pick one from the list. 2. Press **Set** or Enter. The value is saved to the motor's flash, and the table reloads. If the motor saved a different value from the one you typed, the row shows *Motor saved … instead*. Rows marked *Not on this firmware* aren't supported by that motor. Rows with a lock (factory, calibration and CAN settings) stay locked until you turn on **Edit protected parameters** and confirm. The **Parameters** tab isn't available while an operation, such as teleop, is using the robot. ### Motor tools The buttons above the motor cards run these commands: | Button | What it does | | - | - | | **CAN setup** | Finds and sets up the Axol or Mantis hub ([`can.setup`](/cli/can-setup)). | | **CAN enable** | Opens the CAN adapter picker. See [Choose CAN adapters](#choose-can-adapters). | | **Set CAN ID** | Changes a motor's CAN ID ([`motor.set-can-id`](/cli/motor-set-can-id)). | | **Set zero position** | Sets one motor's zero, or walks you through zeroing each joint against its end stop ([`motor.set-zero-pos`](/cli/motor-set-zero-pos)). Axol only. | | **Read all parameters** | Reads every configuration parameter from one motor, or from all motors if you leave the CAN ID blank ([`motor.dump-config`](/cli/motor-dump-config)). | | **Edit parameter** | Reads or writes one configuration parameter ([`motor.set-config`](/cli/motor-set-config)). | | **Flash firmware** | Installs motor firmware from a `.bin` file on the Host Computer ([`motor.flash`](/cli/motor-flash)). Axol only. | Mantis grippers calibrate themselves, so Mantis has no zeroing. To restore a saved configuration file, run [`motor.restore-config`](/cli/motor-restore-config) in a terminal. ## Choose CAN adapters **CAN enable** opens the adapter picker. 1. Choose **Axol** or **Mantis**. 2. Choose **Both arms**, **Left only** or **Right only**. 3. Pick each side's CAN interface from the detected list, or type its name. The defaults are `can_alm_axol_l` and `can_alm_axol_r` for Axol, and `can_mantis_l` and `can_mantis_r` for Mantis. A generic adapter such as `can0` also works. 4. Press **Save & connect**. If the hub hasn't been set up yet, the dashboard sets it up for you. If it can't identify the hardware, run `axol can.setup` in a terminal. Every test and calibration run on the page uses this choice, and skips a side you didn't select. The Axol choice is saved with the robot's settings. The Mantis choice is used only by the dashboard, so it never changes the robot's saved channels. In Mantis mode, the dashboard shows only the two grippers and runs tests on the grippers only. The lift commands are hidden. On the command line, add `--target mantis` to a command to use Mantis. To pick arms by hand, use `--left-channel` / `--right-channel` and `--no-left` / `--no-right` on two-arm commands, or `--channel` on single-motor tools. See [`can.enable`](/cli/can-enable). ## Control loop and CAN timing The **Control loop & CAN timing** panel shows how steadily commands reach each arm during teleop. 1. Keep the diagnostics page open. 2. Start `axol teleop` from the control panel or a terminal. The graph starts when teleop's control loop starts, after the IK solver is ready. It stops when teleop stops. The panel only listens to the bus and adds no traffic. Each arm's card shows: | Reading | Meaning | | - | - | | **Command** / **Feedback** | Commands sent and replies received per second. | | **Full cycle p95** | Time from an arm's first command to its last reply. | | **Send batch p95** / **Reply batch p95** | Time to send all of an arm's commands, and to receive all its replies. | | **Motor RTT p95** | Time from a command to that motor's reply. | | **Command jitter** / **Worst command gap** | How unevenly commands are spaced, and the longest gap. | | **CAN occupied p95** / **Headroom p05** | How busy the bus is, and the time left over in each cycle. | | **Missed periods** | Command gaps longer than one loop period, per second. | | **Lost feedback** | Replies that never arrived, per second. | The loop runs at 240 Hz (a 4.17 ms period) on the impedance controller, and 400 Hz (2.5 ms) on the position controller. A card shows **240 Hz clean** (or **400 Hz clean**) when all of these hold: * Command and feedback rates are within 2% of the target. * Command and feedback jitter are 0.5 ms or less. * Motor round trip is 3 ms or less. * At least 0.25 ms of headroom is left in each cycle. * No missed cycles and no lost feedback. The chart below the cards switches between **Loop rate**, **Jitter**, **Latency**, **CAN cycle**, **Max gap** and **Misses**. ## Live telemetry The live chart streams the selected arm while the robot is connected. Choose **Position**, **Velocity**, **Torque** or **Temp**. Position, velocity and torque update 10 times a second, and temperature once a second. * Pick a time window from 30 s to 10 min. The chart keeps the last 10 minutes, so it fills in when you open the page. * Choose the arm and turn individual joints on or off. * Scroll to zoom and drag to pan. Press **Go live** to follow the newest data again. * Use the expand button to view the chart full screen. Press Esc to exit. The chart keeps streaming while a test, tuning run or teleop session is using the robot, even one started from a terminal. It shows *Bus in use, showing observed CAN traffic* then. It goes quiet only when the running task isn't moving the motors, for example while it waits at a prompt. After **CAN setup** resets the hub, the chart recovers on its own. ## Tests Each test is a card. Click it, set the options in the dialog, and press **Run**. | Test | What it does | | - | - | | **ROM enable** ([`diag.rom-enable`](/cli/diag-rom-enable)) | Moves every joint through its full range of motion for two hours. On Axol you can pick which joints to test, and the rest hold their home position. On Mantis it tests the grippers only. | | **Lift cycle** ([`diag.lift-cycle`](/cli/diag-lift-cycle)) | Runs the lift up and down on a mounted Axol. Axol only. | | **ZED cable check** ([`diag.zed-cable`](/cli/diag-zed-cable)) | Checks a ZED X One camera's cable by capturing frames. It doesn't move the arms, and motor telemetry keeps streaming. | The card shows the run's state, the elapsed time and the latest output line. You get a notification when it finishes, and the full log is kept in [Run history](#run-history). The ROM and lift tests take over the CAN bus while they run. They drive the arms with the same controller as teleop. To check Mantis triggers against their grippers, run [Teleoperation](/operations/teleop) with Mantis selected. It needs only CAN. ### Lift cycle Enter how many cycles to run. 1. The selected arms move their first shoulder joint to 90°, clear of the lift. 2. The lift runs the full down and up cycles while the test checks that the arms hold their pose. 3. When the lift is up and stopped, the first shoulder joint returns to 0°. The other joints hold where they started. 4. The arm motors turn off. The test uses the lift bus set by [`can.setup`](/cli/can-setup): `can_alm_axol_c`, or the wheel bus `can_alm_axol_b` if there is no separate lift adapter. You can enter another interface in the dialog. ### When a test can start A test that moves motors won't start while one of its motors has a fault. Motors it doesn't use don't block it, so a one-arm run or a bench arm with some motors missing can still run. In the ROM test, a deselected motor that doesn't answer is skipped. A deselected motor that answers with an error still blocks the run, because the run holds it in place. ### Steps that need you Some tests pause for you, for example to put an item in the gripper. The card then shows the instruction and a **Continue** button, such as "Position the item in the RIGHT gripper, then close it." Nothing moves until you press **Continue**. ## Helpers | Helper | What it does | | - | - | | **ROM disable** ([`diag.rom-disable`](/cli/diag-rom-disable)) | Opens grippers left closed by the ROM test, and turns the arms off. | | **Home the lift** ([`lift.home`](/cli/lift-home)) | Calibrates Jelly's lift. Both legs home together by default. Turn on **Independent** only for loose legs off the robot, to level them. | | **Raise lift to install height** ([`lift.goto`](/cli/lift-goto)) | Moves the lift to the robot's install height. | | **Update lift firmware** ([`lift.update`](/cli/lift-update)) | Pick the lift's `firmware.bin`, then press **Run** to install it over CAN. Run it without a file to see the lift's current firmware. | | **Update Mantis firmware** ([`mantis.update`](/cli/mantis-update)) | Pick the Mantis `firmware.bin`, then press **Run** to install it on both rigs over CAN. Keep the triggers released. Run it without a file to see each rig's current firmware. | The lift helpers appear only on Axol on Jelly. **Update Mantis firmware** appears only when Mantis is selected. To restart or shut down the Host Computer, use **Restart** or **Shut down** on the control panel's [Host Computer card](/guides/control-panel#host-computer). ## Tuning The tuning workbench runs the tuning commands with every option on the page. Pick a tab, set the values, and press **Run**. Sine and step runs chart live while they run, and the full charts and scores appear when the run finishes. Gain fields (kp, kd, kd\_host, kd\_host\_hz, kd\_host\_q) start at the joint's current value: the defaults plus this robot's calibration. That is what runs if you leave a field empty. Angles are in degrees. Gains are in Nm/rad and Nm·s/rad. | Tab | What it runs | | - | - | | **Sine** / **Step** | [`tune.pid`](/cli/tune-pid) on one joint. Leave the gains empty to test the current ones, or type several space-separated kp or kd values to try each in its own run. | | **Firmware loop** | [`tune.a4`](/cli/tune-a4): tunes a joint's built-in motor position loop. | | **Recorded motion** | [`tune.motion`](/cli/tune-motion): replays a reference motion and scores how well each joint follows it. | | **Friction** | [`tune.friction`](/cli/tune-friction): measures one joint's friction. Turn on **Save to calibration** to keep the result. | | **Gravity** | [`tune.gravity`](/cli/tune-gravity): measures one link's center of mass. Run it after friction, from the wrist to the shoulder. | | **Factory** | [`tune.factory`](/cli/tune-factory): measures friction and gravity for all 14 joints. See [Calibrating Axol](/guides/axol-calibration). | | **Build motion** | [`motion.build`](/cli/motion-build): turns a recorded session into a reference motion for **Recorded motion**. | | **IK** | [`diag.offline kinematics`](/cli/diag-offline): analyzes a teleop recording without hardware. | ### Sine and Step * kd\_host\_hz sets the center of the damping band. Aim it at the ring frequency that the step score reports. * kd\_host\_q sets the band's width. Raise it to 2 or 3 when the center sits on a measured ring. * **Holder wobble** shows how far the other joints moved during the run. Above about 0.5°, part of the ring came from a neighboring joint, not the one under test. ### Friction, gravity and factory Gravity fixes the sag a joint shows when it holds still under load, which gain tuning can't fix. Its chart shows measured torque against joint angle, with the model before and after the fit. On the **Factory** tab, leave **Velocities** empty to use the default slow speeds (1, 2, 3, 5, 8, 15 and 30 °/s). On the **Friction** tab, an empty field sweeps 7.2 to 72 °/s. A factory run takes about 1.5 hours. ### Recorded motion * **Gains:** the table shows each joint's current gains. Edit a cell to change it for this run only, on both arms. Clear a cell to go back to the configured value. To clear every override, press **Reset *N* overrides** below the table. * **Controller:** **impedance** runs the normal teleop controller at 240 Hz. **position** runs every joint on its motor's own position loop at 400 Hz. * **Controller per joint:** with impedance, click a cell to put that joint on its motor's position loop for this run. A joint already set to the motor loop in the configuration can't be switched back here. * **Run as IK:** solves the motion through the IK solver, as teleop does, instead of replaying joint angles. The score then includes both IK and tracking error. * **Inject noise** and **Filter stack:** add network noise, IK noise or both, and turn teleop's smoothing filters on or off. Run once with filters off and once with them on to see what the filters remove and how much lag they add. ### Build motion and IK **Build motion** takes a session recorded with `axol teleop --teleop.record` or `axol gravity-comp --record`. It saves a before-and-after run, so you can check the smoothed motion before you replay it. **IK** charts the target pose against the solved pose with the error in mm, the solve time for each step, and a per-joint jitter score. Solve time spikes show up as lurches in teleop. ### Read the results * **Error by joint** shows one bar per joint for both arms, colored green, amber or red. Click a joint to jump to its chart. * Each joint's chart shows commanded against actual position, with the error below. * The scores table has one row per joint: tracking error (RMS, in degrees), lag, 3 to 15 Hz jitter, ringing, torque chatter and buzz. * Buzz catches a joint you can hear. A healthy joint sits near 0.005°. An audible buzz is 2 to 5 times that. Charts zoom and pan like the live chart. Double-click to reset the view. ### Compare runs Tick two runs of the same kind in **Past runs**. The charts overlay both runs (A in yellow, B in blue), and a table marks the better value of each score in green. Press **Exit compare** to go back. Runs are saved in `~/.almond/diagnostics/tuning/` on the Host Computer, shared with the command line's `--save-run`. Select or delete them in **Past runs**. ## Run history Every test run is kept with its command, options, duration, result, log and the telemetry recorded during the run. The list shows the newest first, 10 runs per page. Open a run to chart it with the same controls as the live chart. **Clear** deletes the history. The history is stored in `~/.almond/diagnostics/runs` on the Host Computer. # Quest Without Wearing It Source: https://docs.almond.bot/guides/quest-headless Turn off the Quest's proximity sensor so teleop and data collection keep running with the headset set down. The Quest's proximity sensor, inside the visor between the lenses, puts the headset to sleep when nobody is wearing it. Sleep pauses the VR session, which stops the controller poses and the camera feeds. A headset set down on a desk drops the teleop link within seconds. Turn the proximity sensor off when you want the headset to keep running unworn, for example to: * Run data collection with the control panel's [episode controls](/guides/control-panel#episode-controls). * Watch the camera feeds in the control panel's [operator view](/guides/control-panel#operator-view), with the headset only tracking the controllers. * Leave the VR app connected between takes. ## One-time setup Turn on **Developer Mode** on the headset, as for [Quest over USB](/guides/quest-over-usb#one-time-setup). In the **Meta Quest** phone app, go to **Menu → Devices**, select your headset, then **Headset Settings → Developer Mode**. Turn it on and restart the headset. ## Keep the headset awake from the control panel 1. Plug the headset into the Host Computer with a USB-C cable. 2. If the headset shows **Allow USB debugging?**, accept it. 3. In the [control panel](/guides/control-panel#quest-usb), open the **Quest** tab under **General settings** and press **Keep awake**. The display stays on and the VR session keeps running with the headset on a desk. You can unplug the cable afterwards. The headset stays awake until you press **Allow sleep** or restart the headset. ## Keep the headset awake with adb The **Keep awake** and **Allow sleep** buttons run these `adb` commands on the Host Computer. [`axol provision`](/cli/provision) installs `adb`. With the headset plugged in, you can run them from any terminal: ```bash theme={null} # Disable the proximity sensor (keep the headset awake) adb shell am broadcast -a com.oculus.vrpowermanager.prox_close # Restore normal proximity behavior adb shell am broadcast -a com.oculus.vrpowermanager.automation_disable ``` > [!NOTE] > > The setting is lost when the headset restarts. Run the command again, or press **Keep awake** again, after a restart. > [!WARNING] > > With the sensor off, the display never sleeps. The battery drains at the full VR rate and the lenses keep projecting. Keep the headset on its charger for long sessions, and turn the sensor back on when you're done. ## Use Meta Quest Developer Hub instead The [Meta Quest Developer Hub](https://developers.meta.com/horizon/documentation/unity/ts-odh/) desktop app has the same switch. Connect the headset over USB, open **Device Manager**, and turn off **Proximity Sensor**, or press `Ctrl+Shift+P`. The app turns the sensor back on about 10 minutes after the headset disconnects from it, and you need it installed on a laptop. For a headset plugged into the robot, the control panel button works better. ## Run a session without wearing the headset 1. Open the VR app at [axol.almond.bot](https://axol.almond.bot) in the headset, connect to the robot, and press **Enter VR**. 2. Set the headset down. The controller poses and camera feeds keep streaming. 3. In the control panel, use the [episode controls](/guides/control-panel#episode-controls) to start, save and discard takes. Watch the camera feeds in the [operator view](/guides/control-panel#operator-view). The controllers stay live the whole time, so an operator can pick them up at any point. ## Next steps > [card] [Quest over USB](/guides/quest-over-usb) > > Send controller poses over the same USB cable for lower lag. > [card] [Web Control Panel](/guides/control-panel) > > Episode controls and camera feeds for sessions without the headset on. # Quest over USB Source: https://docs.almond.bot/guides/quest-over-usb Send Quest controller poses to the robot over a USB cable instead of Wi-Fi to cut teleop lag. By default the Quest sends controller poses to the robot over Wi-Fi. On some networks, Wi-Fi power saving holds poses back and releases them in bursts, with gaps of about 150 ms. The arms then move in jerky, delayed steps. **Quest over USB** sends the poses over a USB cable instead. > [!NOTE] > > USB carries controller poses only. Camera video still uses the network, so connect to the robot's address as usual. With USB on, the headset sends each pose over both the cable and Wi-Fi, and the robot uses whichever copy arrives first. If the cable drops, Wi-Fi takes over with no reconnect. When the cable comes back, USB takes over again. ## One-time setup **1. Enable Developer Mode on the Quest** 1. Open the **Meta Quest** mobile app on your phone, with your headset connected. 2. Go to **Menu → Devices**, select your headset, then **Headset Settings → Developer Mode**, and turn it on. The app may ask you to create a free Meta organization first. 3. Restart the headset. This is the same Developer Mode used for [remote teleop](/guides/remote-teleop#sideload-tailscale-on-the-quest). **2. Confirm adb is installed on the robot machine** The [one-command install](/installation) runs [`axol provision`](/cli/provision), which installs `adb` and the Quest USB permissions. On a development install, run `axol provision` once. ## Connect and drive **1. Plug the headset into the robot machine** Use a data-capable USB-C cable from the headset to the machine running [`axol serve`](/cli/serve) (the one wired to the robot). **2. Authorize and connect from the control panel** In the [control panel](/guides/control-panel#quest-usb), open the **Quest** tab under **General settings** to see the headset's state. The first time, put on the headset and accept the **Allow USB debugging?** prompt. Tick **Always allow from this computer**. The link then connects on its own and the status turns green: **Controller over USB**. If it doesn't, press **Connect**. **3. Confirm the tunnel on localhost** In the headset browser, open `https://localhost:8001` and accept the certificate warning. This is the control panel, reached over the cable. If it loads, the cable link works. You can also use the control panel from the headset this way. > [!NOTE] > > The browser approves each port separately. Accepting the warning on port 8001 doesn't cover port 8000, which you approve in a later step. **4. Enable USB in the VR app** Open the VR app at [axol.almond.bot](https://axol.almond.bot), enter the robot's address as usual, and tick **Quest over USB**. The USB status and the **Authorize USB certificate** button appear right away, before you connect. **5. Authorize the USB certificate** The USB link uses port 8000, which needs its own approval. Until you approve it, the app uses Wi-Fi and shows *Quest over USB: not connected, using Wi-Fi*. 1. Start a teleop or data collection operation from the control panel. Port 8000 is open only while one is running. 2. Tap **Authorize USB certificate** and accept the warning. You can also open `https://localhost:8000` in the headset browser. The status changes to *Quest over USB: connected*. **6. Enter VR** Press **Enter VR** and teleoperate as usual. You don't have to wait for the USB link. Wi-Fi drives the arms until the cable link is up, and then the robot switches to it. ## Troubleshooting | The **Quest** tab shows | Fix | | - | - | | **Authorize on headset** | Put on the headset and accept the **Allow USB debugging?** prompt. | | **No headset** | Plug the cable in again, and check that Developer Mode is on. | | **adb not installed** | Run `axol provision` on the Host Computer, then reconnect the headset. | | **Headset ready**, but the link doesn't connect | Press **Connect**. If it still fails, try another cable. A faulty cable is the most common cause. | ## Next steps > [card] [Web Control Panel](/guides/control-panel) > > Where the Quest settings tab lives and how connections work. > [card] [VR Interface](/guides/vr-interface) > > The WebXR app, camera views, and connection details. > [card] [Quest Without Wearing It](/guides/quest-headless) > > Keep the headset awake while nobody wears it, using the same cable. # Remote Teleop Source: https://docs.almond.bot/guides/remote-teleop Drive Axol over the internet by putting the Quest and the Host Computer on one Tailscale network. [Teleoperation](/operations/teleop) normally runs over your local network, with the headset and the Host Computer on the same Wi-Fi. To drive Axol from anywhere over the internet, put the Meta Quest and the Host Computer on the same [Tailscale](https://tailscale.com) network (a "tailnet"). The headset then reaches the robot by its Tailscale address as if it were on the same network, and the traffic is encrypted. Tailscale isn't in the Meta Quest Store, so you have to sideload it. This guide covers that, then the connection. > [!NOTE] > > Remote teleop is sensitive to latency. Tailscale usually connects the two devices directly. When it can't, it sends traffic through a relay, which adds latency. You get the best results on connections with a low round-trip time. ## Sideload Tailscale on the Quest The Quest runs Horizon OS, which is based on Android, so you can install Tailscale's Android app from its APK file. **1. Enable Developer Mode on the Quest** 1. Open the **Meta Quest** app on your phone, with your headset connected. 2. Go to **Menu → Devices**, select your headset, then **Headset Settings → Developer Mode**, and turn it on. You may need to create a free Meta "organization" first, which takes a minute. 3. Restart the headset. **2. Download the Tailscale APK** Download the Android APK from Tailscale's package server at [pkgs.tailscale.com/stable/#android](https://pkgs.tailscale.com/stable/#android) onto your computer. > [!WARNING] > > Download the APK only from Tailscale's site, not from third-party APK mirrors. **3. Sideload it with SideQuest** The easiest tool is [SideQuest](https://sidequestvr.com): 1. Install SideQuest on your computer from [sidequestvr.com](https://sidequestvr.com). 2. Connect the Quest to your computer with a USB-C cable. 3. Put the headset on and accept the **Allow USB debugging?** prompt. Check **Always allow from this computer**. 4. In SideQuest, press **Install APK from folder** and select the Tailscale APK. If you already use ADB, you can skip SideQuest and run `adb install tailscale.apk`. **4. Launch and log in** Tailscale doesn't appear in your normal app grid. Find it under **Unknown Sources** in your Quest app library (the folder icon with a "?"). Open it, sign in to your tailnet, and approve the VPN connection prompt. > [!TIP] > > The Android app isn't built for VR, so signing in inside the headset can be awkward. Signing in with an auth key or QR code is often easier than typing a password. > [!NOTE] > > A sideloaded Tailscale doesn't update itself. Sideload a newer APK from time to time. ## Connect the Host Computer to the same tailnet On the Host Computer, install Tailscale and start it (see [Tailscale's Linux install docs](https://tailscale.com/download/linux)): ```bash theme={null} curl -fsSL https://tailscale.com/install.sh | sh sudo tailscale up ``` Sign in to the **same tailnet** as the headset. Note the computer's Tailscale address: its `100.x.y.z` IP or its MagicDNS name. Run `tailscale ip -4`, or check the [Tailscale admin console](https://login.tailscale.com/admin/machines). ## Drive the robot With both devices on the tailnet, use [teleoperation](/operations/teleop) as usual, with the Tailscale address instead of the local one: **1. Start teleop on the Host Computer** Start it from the [control panel](/guides/control-panel) or with `axol teleop`, as for local teleop. **2. Check that Tailscale is connected in the headset** Open the Tailscale app on the Quest and check that the VPN is on. **3. Enter the Tailscale address in the VR app** Open the VR app at [axol.almond.bot](https://axol.almond.bot) on the headset. In the **Connect** field, enter the robot computer's **Tailscale IP or MagicDNS name** instead of its local IP. Press **Connect**, then **Start**. **4. Authorize the certificate** As with local teleop, accept the self-signed certificate once. Tap **Authorize certificate** when prompted, or open `https://:8000` in the headset browser and continue past the warning. See [Authorize the TLS certificate](/operations/teleop#authorize-the-tls-certificate). The session then works like local teleop, with the same controls and camera views. ## Drive from outside your tailnet (Funnel + TURN) The steps above assume the operator can join your tailnet. To let someone drive without installing Tailscale, publish the robot on the internet with [Tailscale Funnel](https://tailscale.com/kb/1223/funnel). You need two pieces: Funnel carries the control connection, and a TURN server carries the camera video. > [!WARNING] > > Funnel puts the robot on the public internet, and the teleop connection has **no password**. Anyone with the URL can drive the arms. Turn Funnel on only during a session, and turn it off as soon as you're done: > > ```bash theme={null} > sudo tailscale funnel --https=443 off > ``` ### 1. Publish the control connection with Funnel Funnel publishes only on ports 443, 8443 and 10000, and it handles TLS itself. Point it at the VR server's HTTPS port and tell it to skip the self-signed certificate check: ```bash theme={null} sudo tailscale funnel --bg https+insecure://localhost:8000 ``` This publishes the control connection at `https://.tailXXXX.ts.net/` on port 443. Check it with `tailscale serve status`. If your Tailscale version doesn't accept this command, use these two instead: ```bash theme={null} sudo tailscale serve --bg --https=443 https+insecure://localhost:8000 sudo tailscale funnel --bg 443 on ``` ### 2. Add a TURN server for camera video Camera video travels as a separate stream that doesn't go through Funnel. When the headset and the robot are on different networks, they need a public **TURN** server to relay the video. Use a hosted TURN provider, or run [coturn](https://github.com/coturn/coturn) on a machine with a public IP. The repo includes a coturn setup for [Fly.io](https://fly.io) in [`deploy/turn/`](https://github.com/almond-bot/axol/tree/main/deploy/turn). Fly supports the UDP traffic TURN needs, which most hosting services don't. Follow [`deploy/turn/README.md`](https://github.com/almond-bot/axol/blob/main/deploy/turn/README.md) to launch your own server with a few `flyctl` commands. Then set these variables on the Host Computer **before** you start teleop: ```bash theme={null} export AXOL_TURN_URL="turn:turn.example.com:3478,turns:turn.example.com:5349" export AXOL_TURN_USERNAME="axol" export AXOL_TURN_PASSWORD="your-turn-credential" ``` `AXOL_TURN_URL` is a comma-separated list of `turn:`, `turns:` or `stun:` URLs. Without these variables, an operator outside your tailnet can still drive the arms through Funnel, but sees no camera video. On a local network or a tailnet, leave them unset. > [!TIP] > > Instead of exporting the variables in every shell, put them in a `.env.local` file in the directory you run `axol` from. `axol` loads it at startup. The file is ignored by git, so your TURN password stays out of version control. ### 3. Connect from the headset In the VR app's **Connect** field, enter the Funnel address as an `https://` URL, or add `:443`. Otherwise the app uses the local default port, `8000`. ``` https://almond-zed-box.tailXXXX.ts.net ``` Funnel uses a valid public certificate, so there's no certificate to authorize. Press **Connect**, then **Start**. ## Next steps > [card] [Teleoperation](/operations/teleop) > > The full teleop flow and controller layout. > [card] [VR Interface](/guides/vr-interface) > > The WebXR app, camera views, and connection details. # VR Interface Source: https://docs.almond.bot/guides/vr-interface Connect a Meta Quest to Axol and drive the arms, cameras and Jelly from the headset. The VR interface is a WebXR app that runs in the Meta Quest browser. It sends your controller poses to Axol during [teleoperation](/operations/teleop) and [data collection](/operations/data-collection). ## Connect the headset You can open the app from two places: | | URL | When to use | | - | - | - | | **Hosted** | [axol.almond.bot](https://axol.almond.bot) | Most setups. | | **Self-hosted** | `https://:8001/` | Served by [`axol serve`](/cli/serve) on the Host Computer. Use it offline or when you change the app. | Either way, the headset connects to port 8000 on the Host Computer. That port is open while [`axol teleop`](/cli/teleop), [`axol collect-data`](/cli/collect-data), or a teleop or data collection operation from the [control panel](/guides/control-panel) is running. 1. Open the app in the Quest browser. 2. Enter the robot computer's address in **Host Computer address**. Tap the field to pick one of the last five hosts you connected to. 3. Press **Connect**. 4. The first time, the connection fails because the certificate is self-signed. Tap **Authorize certificate**, accept the warning in the popup, and the app reconnects. You can also open `https://:8000` in the headset browser and accept the warning there. 5. Press **Enter VR**. > [!NOTE] > > If Wi-Fi adds lag, tick **Quest over USB** before you connect. Controller poses then travel over a USB cable, and the cameras keep using the network. See [Quest over USB](/guides/quest-over-usb). ## Camera views When camera video is on, the robot's cameras appear as screens over passthrough. Camera video is on with [`axol teleop --cameras`](/cli/teleop), with [`axol collect-data`](/cli/collect-data), or when cameras are assigned in the control panel's [Cameras tab](/guides/control-panel#cameras). * The overhead camera is in the center. A stereo ZED X overhead camera shows in 3D. * The left and right wrist cameras are in the bottom corners. * Only the cameras being streamed appear. * **Connecting cameras…** shows until every streamed camera has sent its first frame. The screens stay fixed in the room, where you were looking when the session started. While arm tracking is disengaged, you can arrange them: | To | Do this | | - | - | | Move a screen | Point a controller at it, hold the trigger, and move the controller. | | Resize a screen | Hold both triggers on the same screen, then move your hands apart or together. | | Reset all screens | Press **B**. The screens move to where you are looking and go back to their default size. | ## Robot model A small 3D model of Axol stands below the overhead camera screen. It shows where the arms, grippers and Jelly's lift are now, so you can check the robot's pose without looking away from the cameras. * You see the model from behind, so its left arm is on your left. * The model follows the robot whether or not arm tracking is engaged. * Move and resize the model like a camera screen, and press **B** to put it back. ## Controller bindings ![Quest controller diagram](https://mintcdn.com/almondbot/QoFJerlOUFU8RmP8/assets/quest.png?fit=max\&auto=format\&n=QoFJerlOUFU8RmP8\&q=85\&s=5e7d85aeb3afa2639107ac9ebc6bdd8f) | # | Button | Action | | - | - | - | | 1 | Left grip | Press both grips together to engage tracking. Once engaged, click a grip to freeze or resume its arm. | | 2 | Right grip | Same as the left grip. | | 3 | Left trigger | Close the left gripper. With tracking disengaged, move or resize a camera screen. | | 4 | Right trigger | Close the right gripper. With tracking disengaged, move or resize a camera screen. | | 5 | X | Return the arms to the rest pose. Cancels a recording countdown. While recording, asks to discard the episode. | | 6 | A | In teleop with the parcel gripper, tucks both arms in and freezes them. See [Tucking the arms](#arm-stow). In data collection, starts recording, or while recording, asks to save the episode. | | 7 | Y | Exit VR. The arms stop and hold their position. | | | B (right) | Reset the camera screens. | | | Left thumbstick | Drive [Jelly](#jelly) forward, back and sideways. | | | Right thumbstick, left or right | Turn Jelly. | | | Right thumbstick, forward or back | Raise or lower Jelly's lift. | | | Both thumbstick clicks together | Turn [box mode](#box-mode) on or off. Parcel gripper only. | ### Engage and freeze the arms * Press both grips together to start tracking. * Click one grip to freeze that arm. It holds its pose and its grip, so it can steady an object while the other arm works. Click the grip again to resume. * A resumed arm's gripper keeps its grip until you squeeze the trigger to the same point. From there it follows the trigger again, so letting the trigger out opens it. * A reset, a [contact stop](/operations/teleop) or a dropped link disengages both arms. Press both grips to engage again. With **Hold grips to engage** turned on in the control panel (`--teleop.hold_to_engage true`), each grip is a dead-man switch. Hold a grip to move its arm, and release it to freeze the arm. Either grip engages its own arm, including from rest. After a forced disengage, release a grip you are still holding before it engages again. ### Tucking the arms With the parcel gripper fitted, press **A** in teleop to tuck both arms in before you drive. It works while the arms move, while they are frozen and from rest. 1. The two grippers move in together to the middle of the chest, below the shoulders, with the elbows tucked in against the robot. 2. They keep their positions relative to each other the whole way, so a box squeezed between them stays squeezed with the same force. 3. Each gripper stays as open or closed as it was when you pressed **A**. 4. Once the arms settle, both arms freeze. Click a grip to move that arm again. Click a grip during the move to stop it, and both arms freeze where they are. In box mode, **A** stows the box instead. See [Stowing the box](#box-stow). ### If the link drops The arms disengage after about half a second and hold their position if the headset stops sending poses. This happens when you take the headset off, open the system menu, exit the app or lose Wi-Fi. Engaging again never jerks the arms toward the controllers (see [Re-engaging](#re-engaging)). Press **X** to return them to rest. ### Teleop or data collection The command that starts the session sets the mode. You can't switch it in the headset. * [`axol teleop`](/cli/teleop): the HUD shows `Teleop`. With the parcel gripper, **A** tucks the arms in (see [Tucking the arms](#arm-stow)). Otherwise it does nothing. * [`axol collect-data`](/cli/collect-data): the HUD shows `Data collection` and **A** records. See [Record episodes](#record-episodes). ## Re-engaging When a grip engages an arm again, your controller and the arm are usually in different places. This happens after you freeze an arm, walk away, or someone moves the arm by hand. The **Ramp** button on the HUD chooses what happens: | Button | What happens | Use it when | | - | - | - | | **Ramp: OFF** (clutch, the default) | The arm stays where it is. Your controller's current pose becomes the new starting point. | The arm is holding something, or you want to continue from where it is. Move your hand to roughly match the arm first, so your reach feels the same. | | **Ramp: ON** (ramp) | The arm moves to where your controller is, using the hand-to-arm offset from its last engage. Then it follows your hand. | After a hand-off or after someone guides the arm by hand. Hold your hands where you want the arms and press the grips. | In ramp mode the arm moves at about 0.15 m/s and takes at least 0.75 s. You can keep moving while it catches up. After a reset or a return to rest, the next engage behaves like clutch, so the arms never jump out of rest. Set the startup default with the control panel's **Re-engage** setting or `--teleop.reengage`. During a session, use the **Ramp** button or **Re-engage** in [session settings](#session-settings). ## Box mode > [!NOTE] > > Box mode needs the parcel gripper. Set **Robot → Gripper** to `parcel` in the control panel, or pass `--axol.gripper parcel`. With the standard parallel gripper, box mode and its settings are hidden in the headset and the control panel. Box mode carries a box with both arms. The grippers press on opposite sides of the box, like two flat hands, and hold it by friction. One controller moves both arms together as a pair. The pair follows your hand's position, and turning your hand about any axis turns the pair about its center. Line the pair up with a box, then tip or tilt it once it's held. ### Turn box mode on Use any of these: * The **Box** button on the HUD. * Click both thumbsticks together. * **Box mode** in [session settings](#session-settings). To start every session in box mode, turn on **Box mode at startup** in the control panel (`--teleop.box_mode true`). The pair engages as soon as box mode turns on, led by your right hand. Set **Box lead hand** to `left` to lead with the left hand. If someone turns box mode on from the control panel while nobody is wearing the headset, the pair waits for a grip. On engage, the arms first move into a parallel pair over about 1.5 s. They keep their current midpoint and width. Then the leading hand moves the pair. > [!TIP] > > Bring the grippers roughly into the grasp with normal two-arm teleop before you switch. The button turns blue and reads **Box: OFF (aligned)** when the grippers face each other across a box-sized gap. Switching then barely moves the arms. ### Box mode controls | Control | Action | | - | - | | Leading controller | Move it to move the pair. Turn, tip or roll it to turn the pair about its center. | | Leading grip | Freeze the pair. Press either grip to lead again. | | Other grip | Hand the lead to that controller. | | Left trigger | Close the left gripper, whichever hand leads. | | Right trigger | Close the right gripper, whichever hand leads. | | Right thumbstick, forward or back | Change the grip width. Forward is wider, back is narrower. | | Thumbstick click, quick tap | Switch between the straight and flush grasp. See [Grasps](#box-grasp). | | Right thumbstick click, held | Raise Jelly's lift. | | Left thumbstick click, held | Lower Jelly's lift. | | Other thumbstick directions | Drive [Jelly](#jelly), as outside box mode. | | Both thumbstick clicks | Leave box mode. | | A | Stow the box against the chest, then freeze the pair. Works while leading or frozen, in teleop only. See [Stowing the box](#box-stow). | | X | Return to rest and leave box mode. | The width stick works only while a grip leads, and it never moves the pair. A tap is a click released within about 0.3 s, with the other stick not pressed. Hold a click longer and the lift starts moving, so one press never does both. To clamp a box, lead the pair to it. Then pull the right thumbstick back until the gripper faces close on the box's sides. The width is the gap between the two contact faces, up to 0.70 m. The parcel gripper's faces can close all the way together, so thin parcels clamp too. ### Grasps | Grasp | How the grippers sit | | - | - | | `straight` (default) | Fingers point straight forward. The front of each fixed blade lies flat on the box, with the box in front of the grippers. It holds boxes about 12.5 cm wide and up. | | `flush` | Each gripper turns 39° inward about the front edge of its plate. The plate's chamfer and the tip of the fixed blade both touch the box. Release the triggers before you close the width. | Tap either thumbstick while leading to switch, or set **Box grasp** in [session settings](#session-settings). The arms move to the other grasp over about 1.5 s, and you can switch with a box already clamped. The **Box** button shows the current grasp, for example **Box: ON (straight)**. Set the flush angle with **Angled yaw** and the starting grasp with `--teleop.box_grasp`. ### The parcel gripper The parcel gripper has a fixed blade and a hinged plate. When you release the trigger, the plate opens fully and folds back along the wrist, on the side facing the box. Box mode places each gripper by this contact face, not by its mount. Each gripper turns whichever flat side is closer toward the box, so the wrist never makes a half turn. If a gripper engages with its fixed blade toward the box, or with its motor cap facing down, set **Left face** or **Right face** to `+x` or `-x`. Try the other value if the first is wrong, then engage again. If the pair doesn't sit flat on the box, adjust **Angled yaw** or `--teleop.box_grip_tilt`. ### Driving with the box The thumbsticks drive [Jelly](#jelly) with the normal controls the whole time box mode is on, whether the pair is led or frozen. Two controls change: the right thumbstick's forward and back sets the width, and the thumbstick clicks run the lift. The right thumbstick follows whichever direction you push it furthest, so squeezing doesn't turn Jelly and turning doesn't change the width. You can carry a box across the room while you lead the pair. ### Stowing the box Stow the box before you drive. The arms then hold it close to the chest, with both arms mirrored and the elbows tucked in against the robot. 1. Clamp the box. 2. Press **A**. It works while a grip leads the pair and while the pair is frozen. 3. The arms level the box, turn it to face forward and bring it to the middle of the chest, at **Box-mode stow height** below the shoulders (0.15 m by default). They bring it as close to the chest as they can while keeping the elbows tucked in. 4. Once the arms settle, the pair freezes and holds the box. Your hands are free to drive. The grippers keep the grasp they had when you pressed **A**, even if you let go of the triggers. The stow takes a few seconds, and your hands don't move the box while it runs. If the box presses against the robot on the way in, the arms stop 1 cm short of it. Press a grip to stop the stow, or to lead the pair again afterwards. **A** stows the box in teleop only, because data collection uses A to record. For a long drive, you can also freeze the pair where it is: 1. Clamp the box. 2. Click the leading grip to freeze the pair. The arms hold the box where it is, with the grippers closed, whatever your hands do. 3. Drive to where you need to go. 4. Squeeze both triggers, then press a grip to lead the pair again. A pair you have tipped keeps its tilt when you freeze it, hand over the lead or switch the grasp. Only turning box mode on again squares the grippers up level. > [!WARNING] > > When a grip takes the lead, each gripper follows its trigger again. If the triggers are released at that moment, the grippers open and the box drops. ### Elbows Set **Elbows out** in [session settings](#session-settings). It goes from 0° (hanging below the line from shoulder to wrist) to 90° (level), and starts at 0°. At 0°, the elbows go down and back beside the body when you pull a box in to the chest. Raise it for a wide box. If closing the width would bring an arm too close to the torso, the width stops closing. To turn off elbow control, pass `--teleop.box_elbow_weight 0`. The elbows then rest where they fall, and **Elbows out** does nothing. ### Clamp force The clamp gets harder the further you push the width past the box, by about 6 N per arm for each centimetre. These settings shape the squeeze. They work on the real robot only. | Setting | Default | What it does | | - | - | - | | **Squeeze force** | 0 (off) | Caps the clamp force per arm, in newtons. Try 8 N for a light parcel, and raise it if boxes slip. | | **Squeeze lean** | 1× | Tilts each gripper into the box as you squeeze, so the blade tip and the plate press evenly. Raise it if the tip lifts, lower it if the plate lifts. 0 turns it off. | | **Squeeze trim** | 5° | The most extra inward turn added while pressing, so each gripper face ends up flat on the box. 0 turns it off. | | **Squeeze cap** | 0 (off) | Caps the shoulder torque that squeezes the box. Leave it off unless you need it, because it also slows an arm moving toward the other and skews the pair. | With **Squeeze force** off, nothing limits the clamp. Past about 39 N per arm, the blade tip can lift and the plate's chamfer takes the whole load. Set **Squeeze force** to keep the clamp below that. The leading controller throbs once the clamp gets hard, and more strongly as you close further. See [Controller haptics](/operations/teleop#controller-haptics). While the grippers press, the **Box** button shows the clamp force and trim, for example **Box: ON (straight, 6 N, 2° in)**. The teleop log prints a `box clamp:` line every second. ### Leave box mode Click both thumbsticks together, press the **Box** button, or turn off **Box mode** in the control panel. Press both clicks within about a third of a second of each other. A quick double click counts as one toggle. Both arms engage in normal teleop as box mode turns off: * With **Ramp: ON**, each arm moves back to where its controller is, using the hand-to-arm offset from before box mode. * With **Ramp: OFF**, the arms stay where they are and follow your hands from there. If you leave while leading in the `flush` grasp, the pair first returns to `straight` over about 1.5 s. To leave right away, release the grip or toggle again. Pressing **X** always leaves box mode and returns the arms to rest. After a hand-off, or after someone moves the arms by hand, press a grip. Box mode always starts by moving the arms into the parallel pair at their current midpoint and width. ## Session settings You can change these settings during a session. Open them with the **Settings** button on the HUD, or in the **Session settings** card of the control panel. Both show the same values, so a change in one appears in the other. **Box** and **Ramp** also have their own HUD buttons. | Setting | What it does | | - | - | | **Box mode** | One controller drives both arms as a pair. See [Box mode](#box-mode). | | **Re-engage** | `clutch` or `ramp`. See [Re-engaging](#re-engaging). | | **Hold to engage** | Makes each grip a dead-man switch instead of a toggle. | | **Haptics** | Turns the [controller vibration](/operations/teleop#controller-haptics) on or off. | | **Body ticks** | Ticks a controller, faster as its arm gets close to Axol's body. Off by default. | | **Haptic push** (Nm) | Unexpected joint torque at which a controller starts to rumble. 0 turns the rumble off. Real robot only. | | **Elbows out** (°) | Box mode. How far out the elbows are held, from 0 (tucked beside the body) to 90 (out level). | | **Squeeze lean** (×) | Box mode. How far each gripper tilts into the box as you squeeze. Real robot only. | | **Squeeze trim** (°) | Box mode. The most extra inward turn added while pressing. Real robot only. | | **Box lead hand** | Which controller leads the pair when box mode turns on. | | **Box grasp** | `straight` or `flush`. | | **Angled yaw** (°) | How far the `flush` grasp turns each gripper inward. Default 39. | | **Left face** / **Right face** | `auto`, `+x` or `-x`. Which side of each gripper faces the box. | | **Squeeze force** (N) | Box mode. Caps the clamp force per arm. 0 means no cap. Real robot only. | | **Squeeze cap** (Nm) | Box mode. Caps the shoulder torque that squeezes the box. 0 is off. Real robot only. | | **Grip force** (Nm) | How hard a closed gripper squeezes, on both hands. Real robot only. | | **Reach scale** (×) | Hand motion multiplier. Above 1 extends your reach, below 1 gives finer control. | | **Arm speed** (rev/s) | Joint speed limit while tracking. Lower it for slow, careful work. | The box mode settings appear only with the parcel gripper. Sessions start with the values from the command line or the control panel's saved settings. Changes made here last for the current session only. ## Jelly On Axol on Jelly, the thumbsticks drive the base, so you can move Axol without leaving VR. Jelly is a powered base with omni wheels and a telescoping lift. | Control | Action | | - | - | | Left thumbstick | Drive forward, back and sideways. | | Right thumbstick, left or right | Turn. | | Right thumbstick, forward or back | Raise or lower the lift. Forward raises it. | * Jelly moves only while you push a stick, and stops smoothly when you let go. This works whether or not arm tracking is engaged. * Each push of the right thumbstick does one thing. A push close to straight forward or back runs the lift, and Jelly doesn't turn. Any other push, diagonals included, turns Jelly, and the lift stays still. Let the stick return to center to switch. * The lift starts once the right thumbstick is about halfway forward or back. * Speed follows how far you push the stick. The first part of the travel is slow, for creeping up on a spot, and a full push is full speed. Set the curve with `--jelly.stick_expo` (default `0.6`, `0` is linear). * In box mode, the right thumbstick's forward and back sets the grip width. Hold a thumbstick click to run the lift instead: right raises it and left lowers it. See [Driving with the box](#driving-with-the-box). * If the headset link drops while you drive, Jelly stops. A parked Jelly keeps holding its position. * After several minutes of driving mostly one way, a parked Jelly brakes its wheels instead of holding them, and it can creep slowly on a slope. Power Jelly off and on to restore the full hold. * If a parked wheel turns fast or moves too far, Jelly turns its wheels off and stops parking until you restart the session. * A policy never drives Jelly. Data collection doesn't record Jelly unless you turn on [Record Jelly](/operations/data-collection#record-jelly), so you can move Axol between takes without affecting the recording. ### Set up Jelly Axol drives Jelly when Jelly's CAN adapters are plugged in. The wheels use `can_alm_axol_b`. The lift uses `can_alm_axol_c`, or shares the wheel bus. The control panel names the adapters when they first appear ([CAN discovery](/guides/control-panel#axol-and-mantis)), or you can run [`axol can.setup`](/cli/can-setup). To leave attached hardware out of a session, use the switches in the **Robot** tab of **Axol settings**: | Switch | Flag | | - | - | | **Axol arms** | `--arms false` | | **Jelly wheels** | `--jelly.wheels false` | | **Jelly lift** | `--jelly.lift false` | With **Axol arms** off, the session drives only Jelly and never connects to the arms. The same happens when Jelly is attached but the arm hub is not. Jelly's other settings are under **Advanced → Jelly**, or the `--jelly.*` flags of [`axol teleop`](/cli/teleop). Home the lift once with [`axol lift.home`](/cli/lift-home) before it can move. [`axol lift.goto`](/cli/lift-goto) raises it to the install height. Both are also in the [diagnostics dashboard](/guides/diagnostics-dashboard#helpers). ## Record episodes In data collection, record with **A** and **X**: 1. Press **A**. Recording starts after a 3-second countdown. Press **X** during the countdown to cancel. 2. To finish, press **A**. **Save episode?** appears. Press **A** again to save, or **X** to keep recording. 3. To throw the take away, press **X**. **Discard episode?** appears. Press **X** again to discard it and record again, or **A** to keep recording. Nothing is saved until you confirm. While an episode is being saved, every control except **Y** is blocked. The HUD shows **Episode N** at the top right, the number of the episode you are about to record. If the robot reports an error, the headset shows an error indicator. For the messages behind these states, see the [VR server API](/api/vr). ## Run the app yourself The app's source is in the `web/` folder of this repository. The same build produces the [control panel](/guides/control-panel). From `web/`: ```bash theme={null} npm install # Build the client package first, then the app (output: web/app/dist, served by axol serve) npm run build --workspace=packages/axol-vr-client npm run build --workspace=app # Development server with hot reload npm run dev --workspace=app ``` For development, open the printed URL in the Quest browser and connect as usual. ## Next steps > [card] [Teleoperation](/operations/teleop) > > Go from install to a live VR session. > [card] [VR server API](/api/vr) > > The WSS server, frame schema, and feedback messages. # Hardware Overview Source: https://docs.almond.bot/hardware Learn what comes with Axol, its mounts, the Camera Kit and the Compute Kit. You choose your Axol setup when you order. Every setup has these parts: * **Axol**: the dual-arm robot. Every configuration starts here. * **Mount**: one of the following. * **Standalone**: bolt Axol to your own table or fixture. * **Owl Mount**: a rigid column that bolts to a table or fixture. * **Ox Cart**: height-adjustable mobile cart with a manual lift and leveling casters. * **Jelly Mobile**: powered mobile base with a battery and telescoping lift. * **Camera Kit** (optional): two ZED X One S Fisheye wrist cameras and one ZED X Mini stereo head camera, with mounts and GMSL2 cables. * **Compute Kit**: the NVIDIA Jetson computer that runs Axol. It comes in three sizes: * **ZED Box Orin**: Jetson Orin NX 16GB in the industrial ZED Box. * **Jetson AGX Orin**: 64GB, for running the full Camera Kit. * **Jetson Thor**: 128GB Blackwell, for VLA policies and the full Camera Kit on one box. ## Axol Overview ![Almond Axol dual-arm robot](https://mintcdn.com/almondbot/QoFJerlOUFU8RmP8/assets/axol.png?fit=max\&auto=format\&n=QoFJerlOUFU8RmP8\&q=85\&s=3f2109b8fae2d4e76a8ca29061a4587e) Axol ships fully assembled and ready to mount. It attaches with four **M8×12 bolts** that thread in from below. The hole positions are in the [mounting holes diagram](#reference-diagrams). The back of the robot has these connectors: * **2× GMSL2 ports** for the wrist cameras. * **1× XT90 connector** for power (**24V DC, 60A peak**). * **1× locking USB-C connector** for control. Axol works with two grippers: * **Parallel**: the standard two-finger gripper. * **Parcel**: a gripper with hinged plates, used by [box mode](/guides/vr-interface#box-mode). Tell the software which gripper is fitted. Use the **Gripper** setting under **Axol settings → Robot** in the control panel, or pass `--axol.gripper parallel` or `--axol.gripper parcel` on the command line (see [`AxolConfig.gripper`](/api/robot)). When the arms first enable after power-up, Axol measures each gripper's travel against its end stops. ### Reference diagrams * [Mounting holes](https://downloads.almond.bot/resources/axol_mounting_holes.pdf) (PDF) * [Joint layout drawing](https://downloads.almond.bot/resources/axol_joint_layout.pdf) (PDF) * [Gripper drawing](https://downloads.almond.bot/resources/gripper.pdf) (PDF) * [Gripper CAD model](https://downloads.almond.bot/resources/gripper.step) (STEP) ## Owl Mount Overview ![Almond Axol on the Owl Mount](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/owl_mount.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=295b43857f17d3ee2411c59b05220b80) The Owl Mount is a rigid **400mm 8080 aluminum T-slot column** that holds Axol on a table, workbench or fixture. Its base brackets have holes for **2020, 4040 and 4545** extrusion patterns, so it fits most T-slot tables without drilling. The slots on the column stay free for cables and accessories. The Owl Mount comes with an Axol mounting plate and all the bolts you need to fix it to your table. ### Reference diagrams * [Mount drawing](https://downloads.almond.bot/resources/static_mount.pdf) (PDF) * [Owl Mount product page](https://www.almond.bot/owl-mount) ## Ox Cart Overview ![Almond Axol on the height-adjustable Ox Cart](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/ox_cart.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=d67294d582cc7a08c21151dce20d2bef) The Ox Cart is a sturdy mobile cart with **four leveling casters** and a **manual crank lift**. Roll Axol between workstations, lock the casters, and crank it to a working height anywhere from sitting to standing. The **60 × 60 cm** footprint fits through standard doors. The frame is **powder-coated steel** with T-slots, so you can add your own fixtures. The cart ships with its crank handle and casters. | | | | - | - | | **Footprint** | 60 × 60 cm | | **Height range** | Sit-to-stand, manual crank | | **Wheels** | 4× leveling casters | | **Weight** | 54.5 kg | | **Mounting** | T-slot extrusion | ### Reference * [Ox Cart product page](https://www.almond.bot/ox-cart) ## Jelly Mobile Overview ![Almond Axol on the Jelly Mobile base](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/axol_mount_jelly.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=6f99fb4a2d41d3e2ff41c01ad62a6be6) Jelly Mobile is a **powered mobile base** for Axol. It has omni-wheels that drive in any direction, a **telescoping lift**, and a **2.4 kWh battery**, so Axol can work all day without a power cable. Its universal mounting plate also fits other robots, and its **600 × 600 mm** footprint fits through standard doors. During teleoperation you drive the base and the lift with the headset thumbsticks. Axol detects Jelly on its own when Jelly is connected. See [Jelly in the VR interface guide](/guides/vr-interface#jelly). | | | | - | - | | **Drive** | Powered holonomic drive, 0.7 m/s | | **Lift travel** | 610 mm (2 ft) at 40 mm/s | | **Height range** | 760–1,370 mm (2.5–4.5 ft) | | **Footprint** | 600 × 600 mm | | **Battery** | 2.4 kWh, 4–10 hours runtime | | **In the box** | 1× Jelly Mobile base with battery, 1× charger | ### Reference * [Outline drawing](https://downloads.almond.bot/resources/jelly_outline.pdf) (PDF) * [Jelly Mobile product page](https://www.almond.bot/jelly-mobile) ## Camera Kit Overview ![Almond Axol with the Camera Kit cameras and head mount](https://mintcdn.com/almondbot/HqgQ5S5UzigR6w6_/assets/axol_perception_kit.png?fit=max\&auto=format\&n=HqgQ5S5UzigR6w6_\&q=85\&s=7d6d20e3a3d73f3ec26de5b8616e0fa6) The Camera Kit adds wrist and head cameras. You need cameras to collect data and to run policies. The kit contains: * **2× ZED X One S Fisheye** wrist cameras (global shutter, 204° field of view) with wrist mounts. * **1× ZED X Mini** stereo head camera (global shutter) with a head mount. * **FAKRA GMSL2 cables**: three 1.5 m cables and two 0.3 m right-angle cables. The cameras plug into the GMSL2 inputs on the Compute Kit. ### Reference * [Camera Kit product page](https://www.almond.bot/camera-kit) * [Wrist Mount](https://downloads.almond.bot/resources/wrist_mount.step) (STEP) * [Head Mount](https://downloads.almond.bot/resources/head_mount.step) (STEP) ## Compute Kit Overview The Compute Kit is the NVIDIA Jetson computer that runs Axol, records the cameras and runs policies. It comes in three sizes: | | ZED Box Orin | Jetson AGX Orin | Jetson Thor | | - | - | - | - | | **Module** | Jetson Orin NX 16GB | Jetson AGX Orin 64GB | Jetson T5000 (Blackwell) 128GB | | **AI performance** | 100 TOPS | 275 TOPS | 2070 FP4 TFLOPS | | **Storage** | 256 GB SSD | 500 GB SSD | See product page | | **Camera inputs** | 4× GMSL2 | 4× GMSL2 | 8× GMSL2 | | **Axol control** | USB-to-CAN | USB-to-CAN | Direct CAN | | **Best for** | The full Camera Kit at a reduced frame rate | The full Camera Kit at full frame rate | The full Camera Kit at full frame rate, plus running policies | ### Reference * [Compute product page](https://www.almond.bot/compute) ## Next steps > [card] [Hardware Setup](/hardware-setup) > > Step-by-step setup for each mount: Standalone, Owl Mount, Ox Cart or Jelly Mobile. > [card] [Installation](/installation) > > Install the software on the Host Computer and open the control panel. > [card] [Mantis Hardware](/mantis/hardware) > > Set up the handheld Mantis rigs that record demonstrations without the robot. # Hardware Setup Source: https://docs.almond.bot/hardware-setup Find the step-by-step guide to mount, power and wire your Axol. Setting up Axol takes three steps: 1. **Mount and power Axol.** Pick the guide for your mount below. 2. **Fit the cameras.** If you have the Camera Kit, follow [Axol Cameras](/hardware-setup/cameras). It is the same for every mount. 3. **Install the software.** Follow [Installation](/installation). > [card] [Axol Standalone](/hardware-setup/standalone) > > Bolt Axol to your own table or fixture. > [card] [Axol + Owl Mount](/hardware-setup/owl-mount) > > Bolt the column to a table or bench, then mount Axol. > [card] [Axol + Ox Cart](/hardware-setup/ox-cart) > > Level the cart, set the crank height, and mount Axol. > [card] [Axol + Jelly](/hardware-setup/jelly) > > Charge, wire, and home the powered base, then mount Axol. > [card] [Axol Cameras](/hardware-setup/cameras) > > Mount the Camera Kit's wrist and head cameras and wire them to the compute. > [card] [Advantech Thor (MIC-742)](/hardware-setup/thor) > > Wire the cameras, install the operating system and add the camera driver on the Jetson Thor Compute Kit. > [!NOTE] > > After you install the software, calibrate Axol so its arms move smoothly at slow speed. Follow [Calibrating Axol](/guides/axol-calibration). It takes one command and about 1.5 hours. Not sure which mount you have? See the [Hardware Overview](/hardware). # Axol Cameras Source: https://docs.almond.bot/hardware-setup/cameras Mount the Camera Kit's wrist and head cameras on Axol and connect them to the computer. These steps are the same for every mount. Mount Axol first with the guide for your mount: * [Axol Standalone](/hardware-setup/standalone) * [Axol + Owl Mount](/hardware-setup/owl-mount) * [Axol + Ox Cart](/hardware-setup/ox-cart) * [Axol + Jelly](/hardware-setup/jelly) The [Camera Kit overview](/hardware#camera-kit-overview) lists what is in the kit. ### Tools required You need these hex (Allen) keys for the screws on the camera mounts: | Screw | Hex key | | - | - | | M4 | 3 mm | | M3 | 2.5 mm | | M2 | 1.5 mm | ### Mounting the cameras Follow this section if you have the **Camera Kit**. > [!NOTE] > > Before you mount each camera, scan the **QR code on its back** to read its serial number. Write down where each camera goes: left wrist, right wrist or head. You need this list later to assign each camera to its position in the software. #### Wrist cameras **1. Mount the camera to the bracket** Fasten each wrist camera to its mount with 4x **M2×8 screws**. ![Wrist camera mounted to its bracket](https://mintcdn.com/almondbot/bSr7TSwyiNZy_dL1/assets/wirst_mount.png?fit=max\&auto=format\&n=bSr7TSwyiNZy_dL1\&q=85\&s=74c84712195e421d44834cd81effd8e4) **2. Mount the bracket to the wrist** Attach the camera-and-bracket assembly to the wrist with **M3×8 screws**. ![Wrist camera bracket mounted to the gripper](https://mintcdn.com/almondbot/bSr7TSwyiNZy_dL1/assets/wrist_mount_gripper.png?fit=max\&auto=format\&n=bSr7TSwyiNZy_dL1\&q=85\&s=c2216740ccf051207600924f19b45783) **3. Remove the lens cap** Remove the lens cap from the wrist camera. #### Head camera **1. Mount the camera to the bracket** The screws depend on which head camera your Camera Kit has: * **ZED X Mini**: use 4x **M4×8 screws**. * **ZED X One S (ZX1S)**: use 4x **M2×8 screws**, the same as the wrist cameras. ![Head camera mounted to its bracket](https://mintcdn.com/almondbot/bSr7TSwyiNZy_dL1/assets/head_mount.png?fit=max\&auto=format\&n=bSr7TSwyiNZy_dL1\&q=85\&s=ec607670605fd0715231ce06691ecdbe) **2. Mount the bracket to the robot** Attach the camera-and-bracket assembly to the head-camera mounting holes on top of Axol with **M4×10 screws**. **3. Remove the lens cap** If your head camera is the **ZED X One S (ZX1S)**, remove its lens cap. ### Wiring Follow this section if you have the **Camera Kit** and a **Compute Kit**. Place the computer and the power supply near Axol, then connect the cables: **1. Position the computer** Set the computer close enough that the camera, USB and power cables reach the back of Axol. **2. Connect the head camera** Run the head camera's **GMSL** cable from the camera to a GMSL2 input on the computer. **3. Connect the wrist cameras** Connect each wrist camera to the GMSL port on its wrist with a short right-angle **GMSL** cable. Then run a long GMSL cable from each wrist-camera port on the back of Axol to a GMSL2 input on the computer. **4. Connect USB and power** Run the **USB** cable from the back of Axol to the computer. Plug the computer into the DC adapter that ships with it. ## Next steps > [card] [Installation](/installation) > > Install the software on the Host Computer and open the control panel. > [card] [Hardware Setup](/hardware-setup) > > Back to the setup guides for every mount. # Axol + Jelly Source: https://docs.almond.bot/hardware-setup/jelly Set up the Jelly Mobile base, install the computer inside it, and mount Axol on top. ![Almond Axol on the Jelly Mobile base](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/axol_mount_jelly.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=6f99fb4a2d41d3e2ff41c01ad62a6be6) Jelly Mobile is a **powered mobile base** for Axol. It has omni-wheels that drive in any direction, a 610 mm telescoping lift and a 2.4 kWh battery. Once Axol is on Jelly, you drive the base and the lift with the headset thumbsticks during teleoperation (see [Jelly in the VR interface guide](/guides/vr-interface#jelly)). For specs, see the [Jelly Mobile product page](https://www.almond.bot/jelly-mobile). For base and lift dimensions, see the [outline drawing](https://downloads.almond.bot/resources/jelly_outline.pdf) (PDF). ### Tools required You need a 6 mm hex (Allen) key for Axol. The other tools depend on which Compute Kit you have: | Screw | Driver | | - | - | | M8 (Axol) | 6 mm hex | | M6 (Jetson AGX Orin) | T30 Torx | | M3 (ZED Box Orin) | T10 Torx | | ZED Box Orin mounting brackets | Phillips | ### Power panel ![Jelly's power panel: on-switch, E-Stop connector, power switch, and charge connector](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/jelly_power_panel.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=77ef17d1ce173d02dc725a034611d7d6) The power panel is on the back of Jelly. It has four parts: * **Green on-switch**: starts Jelly. It works only when the red power switch is on and the E-Stop is released. * **E-Stop connector**, below the on-switch: plug the E-Stop in here. Keep the E-Stop where the operator can reach it. * **Red power switch**: the main power switch. Turn it off to cut all power to the base. * **Anderson connector**: the charge port. See [Charging Jelly](#charging-jelly). > [!WARNING] > > The E-Stop cuts power to Axol at once, and the arms drop. It does not cut power to the Jetson. > [!NOTE] > > Cutting power to a running Jetson can corrupt its operating system. Shut the Jetson down from its operating system first, then turn the red power switch off. ### Assembling Jelly **1. Unbox** Set Jelly on a level floor with room to work around it. **2. Attach the cable chain** The cable chain carries Axol's cables up the lift column. It may ship with its top end loose. If it does, fasten the chain's top bracket to the top plate so the chain moves with the lift. **3. Mount the compute** Install the Compute Kit in the compartment in Jelly's base. Follow [Mounting the compute](#mounting-the-compute) below. **4. Power on** 1. Plug the E-Stop into its connector on the [power panel](#power-panel) and make sure it is released. 2. Turn the red power switch on. 3. Press the green on-switch. The computer in the base starts up. **5. Raise the lift to install height** Run [`axol lift.goto`](/cli/lift-goto). With no target given, it raises the lift to **75%**, the install height. At this height it is easy to slide Axol onto the mounting plate. The lift ships homed, so you don't need to calibrate it first. **6. Mount Axol** Follow [Mounting Axol](#mounting-axol) below. You need four **M8×12 bolts** with locking washers, which thread in from under the plate. **7. Connect Axol** Plug the **XT90** power lead and the **USB-C** control cable into the back of Axol. Then fit the cameras with the [Axol Cameras](/hardware-setup/cameras) guide. You connected the camera cables to the computer when you mounted it. **8. Drive** During teleoperation, drive the base and the lift with the headset thumbsticks. See [Jelly in the VR interface guide](/guides/vr-interface#jelly). ### Mounting the compute ![The compute mounted inside Jelly's base compartment, with the power, USB, and antenna cables connected](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/jelly_compute.jpg?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=8f3c522e3a1d633626f1740fd2902a6b) The Compute Kit ships separately and goes inside the compartment in Jelly's base. Every cable it needs is already in the compartment, so you only plug them in: * A **19V DC power lead** (up to **5A**) from Jelly's battery. * The **USB-to-CAN adapters** for the wheels and the lift. * Two **antenna cables** (the braided pair on the right in the photo). * Axol's **USB-C** control cable. * The Camera Kit's **GMSL cables**. **1. Mount the compute** Fasten the computer into the compartment with the brackets that come with it. Face the heatsink fins outward so air can flow. The bolts depend on which Compute Kit you have: * **ZED Box Orin**: first attach the brackets to the ZED Box with their Phillips screws. Then fasten it in with 4× **M3×12** Torx bolts (T10). * **Jetson AGX Orin**: 4× **M6×12** Torx bolts (T30). **2. Connect power, CAN, and antennas** * Plug the **19V, 5A** DC power lead into the computer's power input. * Plug the wheel and lift **USB-to-CAN** adapters into its USB ports. * Connect the two **antenna cables** to its antenna connectors. **3. Connect Axol and the cameras** Plug Axol's USB-C control cable into a USB port on the computer. Plug the camera cables into its **GMSL2** inputs. ### Mounting Axol Axol attaches to its mounting plate with four **M8×12 bolts** and **locking washers**, which thread in from below. The hole positions are in the [mounting holes diagram](https://downloads.almond.bot/resources/axol_mounting_holes.pdf). > [!WARNING] > > Use **two people** to lift Axol onto the mount. **1. Gather the hardware** Have the four **M8×12 bolts** and **locking washers** ready, along with a **6 mm hex key**. **2. Place Axol on the mount** With two people, lift Axol and set it on the mount, aligning its mounting holes with the holes in the mounting plate. **3. Insert the bolts from below** From underneath the mounting plate, pass each M8×12 bolt (with its locking washer) up through the plate and into Axol's mounting holes. **4. Tighten** Tighten all four bolts with the 6 mm hex key to lock Axol in place. ### Charging Jelly Jelly's **2.4 kWh** battery lasts **4 to 10 hours**, depending on how much you drive and use the lift. Charge it through the **Anderson connector** on the power panel with the charger in the box. You can keep using Axol on Jelly while it charges. **1. Connect the charger** Plug the charger into a wall outlet, then into the Anderson connector on the power panel. **2. Wait for full** Leave the charger connected until it shows the battery is full, then unplug it. ## Next steps > [card] [Axol Cameras](/hardware-setup/cameras) > > Mount the Camera Kit's wrist and head cameras and connect them to the computer. > [card] [Installation](/installation) > > Install the software on the Host Computer and open the control panel. > [card] [Hardware Setup](/hardware-setup) > > Back to the setup guides for every mount. # Axol + Owl Mount Source: https://docs.almond.bot/hardware-setup/owl-mount Bolt the Owl Mount column to a table or bench, then mount Axol on it. ![Almond Axol on the Owl Mount](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/owl_mount.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=295b43857f17d3ee2411c59b05220b80) The Owl Mount is a rigid **400mm 8080 aluminum T-slot column**. Its base brackets fit **2020, 4040 and 4545** extrusion patterns. It ships with the Axol mounting plate and all the bolts you need to fix it to your table. For dimensions, see the [mount drawing](https://downloads.almond.bot/resources/static_mount.pdf). ### Tools required You need a hex (Allen) key for the bolts: | Screw | Hex key | | - | - | | M8 | 6 mm | ### Fixing the column **1. Position the base brackets** Set the column where Axol will work, with its base brackets over the table's T-slots or your fixture's holes. Turn the column so its slots face where you want to run cables. **2. Bolt the brackets down** Drop T-nuts into the table slots. Pass the supplied bolts through the bracket holes that match your extrusion pattern, then tighten them with the 6 mm hex key. **3. Check the column is plumb** Check that the column stands straight up from the table before you mount Axol. If the column leans, Axol is tilted in every task. ### Mounting Axol Axol attaches to its mounting plate with four **M8×12 bolts** and **locking washers**, which thread in from below. The hole positions are in the [mounting holes diagram](https://downloads.almond.bot/resources/axol_mounting_holes.pdf). > [!WARNING] > > Use **two people** to lift Axol onto the mount. **1. Gather the hardware** Have the four **M8×12 bolts** and **locking washers** ready, along with a **6 mm hex key**. **2. Place Axol on the mount** With two people, lift Axol and set it on the mount, aligning its mounting holes with the holes in the mounting plate. **3. Insert the bolts from below** From underneath the mounting plate, pass each M8×12 bolt (with its locking washer) up through the plate and into Axol's mounting holes. **4. Tighten** Tighten all four bolts with the 6 mm hex key to lock Axol in place. ### Power Axol runs on **24V DC, 60A peak** through the XT90 connector on its back. Almond offers two power supplies. Both are 1500W (24V, 62.5A) with an XT90 output: * **[Standard Power Supply](https://www.almond.bot/standard-power-supply)**: the desktop supply that ships with Axol. * **[Industrial Power Supply](https://www.almond.bot/industrial-power-supply)**: for permanent installations. It adds an **E-Stop**, a **power switch**, and a **brake resistor** that safely absorbs the current the arms send back. | | | | - | - | | **Robot input** | 24V DC, 60A peak, XT90 | | **Supply output** | 1500W (24V, 62.5A) | | **DC cable** | 1.5m XT90 male–female | | **AC** | Power-supply AC cord | **1. Place the power supply** Set the supply close enough that the XT90 cable reaches the back of Axol. **2. Connect DC** Plug the XT90 cable from Axol into the power supply. **3. Connect the E-Stop (Industrial Power Supply only)** Plug the E-Stop into the supply and put it where the operator can reach it. The supply does not turn on without the E-Stop. **4. Connect AC and power on** Plug the supply's AC cord into a wall outlet, then switch the supply on. On the Industrial Power Supply, press the power switch to power Axol. > [!NOTE] > > On the Industrial Power Supply, the E-Stop cuts power to the arms at once. To restore power, release the E-Stop and press the power switch again. > [!NOTE] > > The supply draws up to 1500W. Plug it into an outlet with nothing else on it. > [!WARNING] > > The Compute Kit has its own power. Use the DC adapter that ships with it. The ZED Box Orin takes **12–19V**, up to 60W. > [!NOTE] > > Cutting power to a running Jetson can corrupt its operating system. Shut it down from the operating system first, then unplug its adapter. ## Next steps > [card] [Axol Cameras](/hardware-setup/cameras) > > Mount the Camera Kit's wrist and head cameras and connect them to the computer. > [card] [Installation](/installation) > > Install the software on the Host Computer and open the control panel. > [card] [Hardware Setup](/hardware-setup) > > Back to the setup guides for every mount. # Axol + Ox Cart Source: https://docs.almond.bot/hardware-setup/ox-cart Level the Ox Cart, set its working height with the crank, and mount Axol on it. ![Almond Axol on the height-adjustable Ox Cart](https://mintcdn.com/almondbot/AN0zEDE45cz5TFUf/assets/ox_cart.png?fit=max\&auto=format\&n=AN0zEDE45cz5TFUf\&q=85\&s=d67294d582cc7a08c21151dce20d2bef) The Ox Cart is a **height-adjustable mobile cart** with four leveling casters and a manual crank lift. It ships with the crank handle, and the casters are already fitted. For specs, see the [Ox Cart product page](https://www.almond.bot/ox-cart). ### Tools required You need a hex (Allen) key for the bolts that hold Axol to the cart: | Screw | Hex key | | - | - | | M8 | 6 mm | ### Leveling the casters Each caster has a ratchet with a small lever that raises or lowers the wheel. To level the cart, flip the ratchet switch up or down on each caster and work the lever until the base sits level. ### Raising and lowering the robot To change Axol's height, insert the crank into the hole at the top of the cart and turn it. ![Inserting the crank into the Ox Cart to adjust its height](https://mintcdn.com/almondbot/bSr7TSwyiNZy_dL1/assets/height_adjust.png?fit=max\&auto=format\&n=bSr7TSwyiNZy_dL1\&q=85\&s=31ad708a870aec795222ff0a03ffb175) > [!WARNING] > > Push the crank **all the way in** before you turn it. A crank that is only partly in can slip or damage the lift. > [!TIP] > > Before you mount Axol, crank the cart down to a height that is easy to lift to. Raise it to working height after the bolts are tight. ### Mounting Axol Axol attaches to its mounting plate with four **M8×12 bolts** and **locking washers**, which thread in from below. The hole positions are in the [mounting holes diagram](https://downloads.almond.bot/resources/axol_mounting_holes.pdf). > [!WARNING] > > Use **two people** to lift Axol onto the mount. **1. Gather the hardware** Have the four **M8×12 bolts** and **locking washers** ready, along with a **6 mm hex key**. **2. Place Axol on the mount** With two people, lift Axol and set it on the mount, aligning its mounting holes with the holes in the mounting plate. **3. Insert the bolts from below** From underneath the mounting plate, pass each M8×12 bolt (with its locking washer) up through the plate and into Axol's mounting holes. **4. Tighten** Tighten all four bolts with the 6 mm hex key to lock Axol in place. ### Power Axol runs on **24V DC, 60A peak** through the XT90 connector on its back. Almond offers two power supplies. Both are 1500W (24V, 62.5A) with an XT90 output: * **[Standard Power Supply](https://www.almond.bot/standard-power-supply)**: the desktop supply that ships with Axol. * **[Industrial Power Supply](https://www.almond.bot/industrial-power-supply)**: for permanent installations. It adds an **E-Stop**, a **power switch**, and a **brake resistor** that safely absorbs the current the arms send back. | | | | - | - | | **Robot input** | 24V DC, 60A peak, XT90 | | **Supply output** | 1500W (24V, 62.5A) | | **DC cable** | 1.5m XT90 male–female | | **AC** | Power-supply AC cord | **1. Place the power supply** Set the supply close enough that the XT90 cable reaches the back of Axol. **2. Connect DC** Plug the XT90 cable from Axol into the power supply. **3. Connect the E-Stop (Industrial Power Supply only)** Plug the E-Stop into the supply and put it where the operator can reach it. The supply does not turn on without the E-Stop. **4. Connect AC and power on** Plug the supply's AC cord into a wall outlet, then switch the supply on. On the Industrial Power Supply, press the power switch to power Axol. > [!NOTE] > > On the Industrial Power Supply, the E-Stop cuts power to the arms at once. To restore power, release the E-Stop and press the power switch again. > [!NOTE] > > The supply draws up to 1500W. Plug it into an outlet with nothing else on it. > [!WARNING] > > The Compute Kit has its own power. Use the DC adapter that ships with it. The ZED Box Orin takes **12–19V**, up to 60W. > [!NOTE] > > Cutting power to a running Jetson can corrupt its operating system. Shut it down from the operating system first, then unplug its adapter. > [!TIP] > > Fix the power supply and the computer to the cart's T-slot frame so everything rolls together. ## Next steps > [card] [Axol Cameras](/hardware-setup/cameras) > > Mount the Camera Kit's wrist and head cameras and connect them to the computer. > [card] [Installation](/installation) > > Install the software on the Host Computer and open the control panel. > [card] [Hardware Setup](/hardware-setup) > > Back to the setup guides for every mount. # Axol Standalone Source: https://docs.almond.bot/hardware-setup/standalone Bolt Axol to your own table or fixture and connect its power. Axol ships fully assembled. In the Standalone setup you provide the table or fixture. Before you start: * Drill or tap the top of your table for Axol's four **M8** bolts. The hole positions are in the [mounting holes diagram](https://downloads.almond.bot/resources/axol_mounting_holes.pdf). * Make sure the table is stiff enough that it doesn't flex when the arms move. > [!TIP] > > If you have a T-slot table, the [Owl Mount](/hardware-setup/owl-mount) fits 2020, 4040 and 4545 extrusion without drilling. ### Tools required You need a hex (Allen) key for the bolts that hold Axol to your table: | Screw | Hex key | | - | - | | M8 | 6 mm | ### Mounting Axol Axol attaches to its mounting plate with four **M8×12 bolts** and **locking washers**, which thread in from below. The hole positions are in the [mounting holes diagram](https://downloads.almond.bot/resources/axol_mounting_holes.pdf). > [!WARNING] > > Use **two people** to lift Axol onto the mount. **1. Gather the hardware** Have the four **M8×12 bolts** and **locking washers** ready, along with a **6 mm hex key**. **2. Place Axol on the mount** With two people, lift Axol and set it on the mount, aligning its mounting holes with the holes in the mounting plate. **3. Insert the bolts from below** From underneath the mounting plate, pass each M8×12 bolt (with its locking washer) up through the plate and into Axol's mounting holes. **4. Tighten** Tighten all four bolts with the 6 mm hex key to lock Axol in place. ### Power Axol runs on **24V DC, 60A peak** through the XT90 connector on its back. Almond offers two power supplies. Both are 1500W (24V, 62.5A) with an XT90 output: * **[Standard Power Supply](https://www.almond.bot/standard-power-supply)**: the desktop supply that ships with Axol. * **[Industrial Power Supply](https://www.almond.bot/industrial-power-supply)**: for permanent installations. It adds an **E-Stop**, a **power switch**, and a **brake resistor** that safely absorbs the current the arms send back. | | | | - | - | | **Robot input** | 24V DC, 60A peak, XT90 | | **Supply output** | 1500W (24V, 62.5A) | | **DC cable** | 1.5m XT90 male–female | | **AC** | Power-supply AC cord | **1. Place the power supply** Set the supply close enough that the XT90 cable reaches the back of Axol. **2. Connect DC** Plug the XT90 cable from Axol into the power supply. **3. Connect the E-Stop (Industrial Power Supply only)** Plug the E-Stop into the supply and put it where the operator can reach it. The supply does not turn on without the E-Stop. **4. Connect AC and power on** Plug the supply's AC cord into a wall outlet, then switch the supply on. On the Industrial Power Supply, press the power switch to power Axol. > [!NOTE] > > On the Industrial Power Supply, the E-Stop cuts power to the arms at once. To restore power, release the E-Stop and press the power switch again. > [!NOTE] > > The supply draws up to 1500W. Plug it into an outlet with nothing else on it. > [!WARNING] > > The Compute Kit has its own power. Use the DC adapter that ships with it. The ZED Box Orin takes **12–19V**, up to 60W. > [!NOTE] > > Cutting power to a running Jetson can corrupt its operating system. Shut it down from the operating system first, then unplug its adapter. ## Next steps > [card] [Axol Cameras](/hardware-setup/cameras) > > Mount the Camera Kit's wrist and head cameras and connect them to the computer. > [card] [Installation](/installation) > > Install the software on the Host Computer and open the control panel. > [card] [Hardware Setup](/hardware-setup) > > Back to the setup guides for every mount. # Advantech Thor (MIC-742) Source: https://docs.almond.bot/hardware-setup/thor Wire the cameras, install the operating system and add the camera driver on the Jetson Thor Compute Kit. The Jetson Thor Compute Kit is the **Advantech MIC-742-AT** (Jetson T5000, 128GB) with Wi-Fi and a GMSL2 frame grabber, the card the cameras plug into. Before you [install the Axol software](/installation), follow this guide to: 1. Connect the Camera Kit. 2. Install Advantech's operating system image. 3. Install the camera driver. > [!WARNING] > > **Never flash the MIC-742 with NVIDIA's standard JetPack image.** That image is for NVIDIA's own Thor developer kit. On the MIC-742, it makes the camera driver hang at boot. Always use Advantech's MIC-742 image (see [Flash the OS](#flash-the-os)). > [!NOTE] > > Log in to the MIC-742 with username `mic-742` and password `mic-742`. ## What's in the box | Part | Advantech P/N | Notes | | - | - | - | | MIC-742 Thor system | `MIC-742-AT7A1` | Jetson T5000 128GB, SSD | | DC power adapter | `XMIC-FSP230-AAAN3` | Use only this adapter | | AC power cord | `1702002600` | | | GMSL2 frame grabber | `MIC-FG-8G2C1` | Factory-installed | | Frame grabber power cable | `1700026907-01` | Factory-installed | | Mini-FAKRA to FAKRA adapter cable | `1751000758-01` | One per 4 cameras | | Wi-Fi module | `EWM-W179M201E` | Factory-installed | | Wi-Fi antenna cables and antennas | `1751000620-01` ×2, `1751000460-01` ×2 | | Advantech fits the frame grabber and Wi-Fi at the factory. Installing them yourself voids the warranty. If your unit arrives without them, contact Almond. Don't open the case. ## Power The MIC-742 takes DC power through a **2-pin plug-in terminal block** on its case. The matching plug ships with the system. If you need a spare, or want to build your own power cable (for example, to power the Thor from Jelly Mobile), order Advantech `1652002202`. It is the same part as **Dinkle `5ESDVM-02P`** ([DigiKey](https://www.digikey.com/en/products/detail/dinkle-corporation-usa/5ESDVM-02P/14566173)). > [!NOTE] > > Cutting power to a running Jetson can corrupt its operating system. Shut it down from the operating system first, then unplug its adapter. ## Wire the cameras The Camera Kit's cables end in standard FAKRA connectors, but the MIC-742 frame grabber takes **Mini-FAKRA**. The `1751000758-01` adapter cable connects the two. Each adapter carries up to **4 cameras**, so the Camera Kit's three cameras fit on one adapter. **1. Mount the cameras on Axol** Follow [Axol Cameras](/hardware-setup/cameras) to fit the wrist and head cameras. Write down which camera serial number goes where. **2. Connect the adapter cable** Plug the adapter's Mini-FAKRA end into the frame grabber's GMSL2 port on the MIC-742. **3. Connect the cameras** Plug these three cables into the adapter's FAKRA inputs: the head camera's cable, and the two cables from the wrist-camera ports on the back of Axol. **4. Connect USB and power** Run the USB cable from the back of Axol to the MIC-742. Then connect the MIC-742's power adapter. ## Flash the OS Axol needs Advantech's MIC-742 image for **JetPack 7.2 (L4T 39.2)**. Your unit may arrive with an earlier JetPack 7 release. Reflash it unless it already reports L4T 39.2 (see [Verify](#verify)). | File | Download | MD5 | | - | - | - | | OS image (BSP), 4.2 GB | [MIC-742\_Thor\_7.2\_V1.0.0\_SDK.tbz2](https://downloads.almond.bot/mic742/jp7.2/MIC-742_Thor_7.2_V1.0.0_SDK.tbz2) | `67807ecc0d316637fecbe7b282d56c4f` | | Advantech flashing SOP | [MIC-742\_Jetpack\_7\_Flash\_SOP.pdf](https://downloads.almond.bot/mic742/jp7.2/MIC-742_Jetpack_7_Flash_SOP.pdf) | | > [!WARNING] > > Flashing erases the SSD. First copy off any datasets or calibration you want to keep. You need a separate **x86\_64 PC running Ubuntu 24.04**, a **USB-A to Micro-USB** cable, and an HDMI monitor for the MIC-742. We call that PC the host. Follow Advantech's rules for the host: * Use a physical PC, not a virtual machine. A virtual machine can drop the USB connection during the flash. * Plug the cable straight into the host, with no USB hub in between. * Run the commands as a normal user with `sudo`, not logged in as `root`. * Keep the HDMI monitor attached to the MIC-742 until the flash finishes and it boots to the desktop. **1. Download and check the image** On the host PC: ```bash theme={null} cd ~/Desktop curl -LO https://downloads.almond.bot/mic742/jp7.2/MIC-742_Thor_7.2_V1.0.0_SDK.tbz2 curl -LO https://downloads.almond.bot/mic742/jp7.2/MIC-742_Thor_7.2_V1.0.0_SDK.md5sum md5sum -c MIC-742_Thor_7.2_V1.0.0_SDK.md5sum # expect: OK ``` **2. Extract it** ```bash theme={null} sudo tar xvpf MIC-742_Thor_7.2_V1.0.0_SDK.tbz2 ``` This creates `~/Desktop/MIC-742_Thor_7.2_V1.0.0_SDK`. **3. Install the flashing prerequisites** The host needs internet access for this step. ```bash theme={null} cd ~/Desktop/MIC-742_Thor_7.2_V1.0.0_SDK sudo ./tools/l4t_flash_prerequisites.sh ``` **4. Put the MIC-742 in recovery mode** 1. Shut the MIC-742 down and unplug its power. 2. Connect the Micro-USB port next to the **REC** and **RST** buttons to the host PC. 3. Press and hold **REC**. 4. Plug in power and press **RST**, keeping **REC** held. Release **REC** 5–10 seconds after pressing **RST**. Confirm it from the host: ```bash theme={null} lsusb | grep 0955:7026 # expect: NVIDIA Corp. APX ``` If nothing shows, repeat the button sequence. **5. Flash** ```bash theme={null} cd ~/Desktop/MIC-742_Thor_7.2_V1.0.0_SDK sudo bash advantech/only_flash.sh ``` **6. Reboot** When the script reports success, press **RST**. The MIC-742 starts up with the new image. Finish the Ubuntu first-boot setup on the HDMI monitor. ## Install the camera driver Once the new image is running, install the **Stereolabs driver built for the MIC-742**: `stereolabs-advantech-mic742` release **1.4.3 for L4T 39.2.0**. It is the only driver that works with Advantech's image. Drivers for the ZED Box, the ZED Link or NVIDIA's developer kit do not work on the MIC-742. | File | Download | MD5 | | - | - | - | | Camera driver | [stereolabs-advantech-mic742\_1.4.3-L4T39.2.0\_arm64.deb](https://downloads.almond.bot/mic742/jp7.2/stereolabs-advantech-mic742_1.4.3-L4T39.2.0_arm64.deb) | `e92cdd0b2e4bb2f81a4a43eb9bda1b4d` | On the MIC-742: ```bash theme={null} curl -LO https://downloads.almond.bot/mic742/jp7.2/stereolabs-advantech-mic742_1.4.3-L4T39.2.0_arm64.deb sudo dpkg -i stereolabs-advantech-mic742_1.4.3-L4T39.2.0_arm64.deb sudo reboot ``` Then install the ZED SDK release for JetPack 7.2 (L4T 39.2) from the [Stereolabs download page](https://www.stereolabs.com/developers/release). > [!NOTE] > > The Axol installer and updater never change the MIC-742 camera driver. Upgrade it by hand, and only to a release built for the L4T version that Advantech's image runs. ## Verify Before you install the Axol software, check the L4T release and the driver: ```bash theme={null} head -1 /etc/nv_tegra_release # expect: # R39 (release), REVISION: 2.x dpkg -l | grep stereolabs # expect: stereolabs-advantech-mic742 1.4.3-L4T39.2.0 ``` If the first line doesn't say `R39` with revision `2`, reflash with Advantech's image. If the MIC-742 hangs at boot after you install the driver, it is not running Advantech's image. Reinstalling the driver won't fix it. Reflash it with [Flash the OS](#flash-the-os). ## Install Axol With the image and driver in place, run the [one-command install](/installation). On the Thor, the installer also tunes the system for real-time robot control (see [`jetson.setup`](/cli/jetson-setup)). ## Next steps > [card] [Installation](/installation) > > Install the software on the Thor and open the control panel. > [card] [Axol Cameras](/hardware-setup/cameras) > > Mount the Camera Kit's wrist and head cameras. # Almond Axol Source: https://docs.almond.bot/index Set up, drive and train the Almond Axol dual-arm robot from a browser or a terminal. ![Axol dual-arm robot](https://mintcdn.com/almondbot/QoFJerlOUFU8RmP8/assets/axol.png?fit=max\&auto=format\&n=QoFJerlOUFU8RmP8\&q=85\&s=3f2109b8fae2d4e76a8ca29061a4587e) The Axol software runs the Almond Axol dual-arm robot. You can run every operation in two ways: * From the **web control panel** in a browser. * From the **`axol` command line** in a terminal. Each operation page below shows both. > [!NOTE] > > **New here?** Start with [Hardware Setup](/hardware-setup) to mount and power Axol. Then [install the software](/installation) with one command, and go to [Teleoperation](/operations/teleop) to drive the robot from a VR headset. ## Operations Each page has a **Control Panel** tab and a **CLI** tab. Pick the one you prefer. > [card] [Teleoperation](/operations/teleop) > > Drive the robot live from a VR headset, or try it in simulation without hardware. > [card] [Gravity Compensation](/operations/gravity-comp) > > Hold the arms weightless so you can move them by hand. > [card] [Data Collection](/operations/data-collection) > > Record teleoperation episodes to a LeRobot dataset. > [card] [Replay Dataset](/operations/replay-dataset) > > Play a recorded dataset episode back onto the arms. > [card] [Run Policy](/operations/run-policy) > > Let a trained policy run the robot, on the Host Computer or on a remote server. > [card] [DAgger Collection](/operations/dagger) > > Run a policy while correcting it from VR, recording the corrections. ## Explore > [card] [Hardware Overview](/hardware) > > Axol, its mounting options, the Camera Kit, and the Compute Kit. > [card] [Hardware Setup](/hardware-setup) > > Step-by-step setup for each mount and for the cameras. > [card] [Installation](/installation) > > Install the software on the Host Computer with one command. > [card] [Remote Teleop](/guides/remote-teleop) > > Drive the robot over the internet from a Meta Quest. > [card] [Mantis](/mantis/hardware) > > Set up the handheld rigs that record demonstrations without the robot. > [card] [Web Control Panel](/guides/control-panel) > > Run every operation from a browser, without a terminal. > [card] [VR Interface](/guides/vr-interface) > > The headset app you use to drive Axol from a Meta Quest. > [card] [CLI Reference](/cli/teleop) > > Every `axol` command and flag, with examples. > [card] [Python API](/api/concepts) > > `Axol`, `KinematicsSolver`, `VRTeleop`, and the LeRobot wrappers. # Installation Source: https://docs.almond.bot/installation Install the Axol software on the Host Computer with one command, then open the control panel. Install the Axol software with one command on the computer connected to Axol. This is usually the Jetson in your Compute Kit. The command installs the `axol` command line and starts the web control panel in the background. When it finishes, you can drive Axol from a browser. > [!NOTE] > > To work on the Axol software itself, see [Development install](/advanced/development-install). ## Requirements * **Axol set up**: mounted, powered and connected to the computer. See [Hardware Setup](/hardware-setup). * **Linux** with **systemd**. * **An NVIDIA Jetson**, if you use the ZED cameras for data collection or policies. Supported models are the ZED Box Orin NX 16GB, the AGX Orin (32GB, 64GB or Industrial) and the Thor T5000. On other Linux computers the installer skips the Jetson-only steps. On the Advantech MIC-742 Thor, first install Advantech's image and camera driver. See [Advantech Thor (MIC-742)](/hardware-setup/thor). ## Default login Log in with these default credentials: | Computer | Username | Password | | - | - | - | | ZED Box Orin NX 16GB (from Almond) | `user` | `admin` | | Advantech Thor (MIC-742) | `mic-742` | `mic-742` | > [!WARNING] > > If other people can reach this computer on the network, change the password after you first log in. ## Install Run this on the Host Computer: ```bash theme={null} curl https://axol.almond.bot/install -fsS | bash ``` The command: * Installs [`uv`](https://docs.astral.sh/uv/) if it is missing. * Installs the latest release of the `axol` command line, with Python 3.13 included. * Installs the camera streaming software, `adb` for the [Quest-over-USB](/guides/quest-over-usb) link, and Lighthouse tracking for [Mantis](/mantis/tracking) (see [`axol provision`](/cli/provision)). Steps that need the ZED SDK are skipped when it is not installed. * On a **ZED Box** (Duo or Mini), upgrades an outdated GMSL camera driver (see [`zed.driver`](/cli/zed-driver)). If it upgrades the driver, the computer **restarts** at the end of the install and your SSH session closes. Reconnect after a minute or two. * On a Jetson, tunes the system for real-time robot control (see [`jetson.setup`](/cli/jetson-setup)). The tuning is applied again at every boot. * Starts the control panel as a service named `axol`, which starts at boot and restarts if it stops (see [`axol serve`](/cli/serve)). If an optional step fails, such as Lighthouse tracking, the install finishes with a warning that names it. Axol works without it. Fix the problem and run the install command again to add it. If a required step fails, the install stops with an error. The control panel then shows the failed step, and you can press **Update** to install a fixed release. > [!WARNING] > > On a Jetson, the installer sets up PyTorch without GPU support. Teleoperation, recording and remote policy inference all work. To run a policy on the Jetson's GPU with `run-policy` or `collect-dagger`, you must install a PyTorch and Torchvision build for your JetPack version yourself. Each update replaces it, so install it again after updating. Until then, use remote inference, or run on the CPU with `--device cpu`. When the install finishes, open [axol.almond.bot](https://axol.almond.bot) and connect to the computer. See [First connection](#first-connection) below. From then on, you can do everything in the browser. ### Where recordings are saved Recorded datasets are saved under `~/.cache/huggingface/lerobot` in the home folder of the user who ran the install. The control panel and the command line use the same folder, so you see the same recordings from both. You can change the folder with the control panel's **Dataset root** setting. The service runs as root, but everything it writes in that folder stays readable and writable by your user. You don't need `sudo` to read, copy or upload your recordings. Steps that need root, like starting the CAN bus, run without asking for a password. ### Staying up to date Axol updates to each new [release on GitHub](https://github.com/almond-bot/axol/releases). When a new release is out, the control panel shows a banner with your version and the latest one. * Press **Update** to install it. Axol installs the new release and restarts once no operation is running. * Axol never updates until you press **Update**. * Running the install command again also updates to the latest release. To see the service logs or restart the service, run: ```bash theme={null} journalctl -u axol -f # follow the service logs systemctl restart axol # restart manually ``` ## First connection 1. On any computer on the same network, open [axol.almond.bot](https://axol.almond.bot). 2. Enter the IP address of the Host Computer. 3. The first time, your browser warns about the robot's security certificate. Accept it. You only do this once, for both the control panel and the VR headset link. On the first connection, the control panel sets up the connection to Axol's arms for you (see [`can.setup`](/cli/can-setup)). See the [Web Control Panel guide](/guides/control-panel) for the rest of the steps. ## Next steps > [card] [Teleoperation](/operations/teleop) > > Drive the robot from a VR headset. > [card] [Web Control Panel](/guides/control-panel) > > Run every operation from a browser. # Mantis Hardware Source: https://docs.almond.bot/mantis/hardware Learn what is in the Mantis kit and set up the handheld rigs for data collection. ![A Mantis rig: gripper at the front, trigger, pistol grip, and tracker mount on top](https://mintcdn.com/almondbot/BCncnSBcFjU3F5Fc/assets/mantis_rig.png?fit=max\&auto=format\&n=BCncnSBcFjU3F5Fc\&q=85\&s=fb2426b300fe47be1d3fbcab3d6a5646) **Mantis** is a pair of handheld rigs for recording demonstrations without moving the robot. You hold one rig in each hand and do the task yourself. Axol's software tracks both rigs and records the episode in the same format as an episode recorded on Axol. A policy trained on Mantis data can run on Axol. Each rig has: * The same **gripper** that Axol uses. * An analog **trigger** that opens and closes the gripper. The further you squeeze, the further the gripper closes. * A mount for a **pose tracker**: a Meta Quest controller or a VIVE Tracker 3.0. In the control panel, Mantis appears as its own device next to Axol, with its own card and settings. Mantis supports **Teleoperation** and **Data collection**. The other operations are for Axol only. ## Overview A Mantis kit has: * **2× Mantis rigs**, one left and one right. * **1× Mantis Hub**, which connects the rigs to the computer. **L** and **R** on its case mark the left and right rig cables. A USB cable connects the hub to the computer, such as a ZED Box. * **A pose source**: one of the two tracking systems in [Mantis Tracking](/mantis/tracking). These are Quest controllers or VIVE Tracker 3.0 with 1 to 4 SteamVR base stations. * **Cameras**: up to two wrist ZED cameras and one head stereo camera. Data collection needs at least one camera. Mantis has no arms. In a recording, the arm joint positions are computed from the rig poses, as if Axol had made the motion. The gripper positions are real and come from the grippers' motors. The trigger reads `0.0` when fully released (gripper open) and `1.0` when fully squeezed (gripper closed). Each rig learns its trigger's released position when it powers on, so leave the triggers released while you power on. If a trigger doesn't reach `1.0` when you squeeze it fully, see [Testing the triggers and grippers](#testing-the-triggers-and-grippers). ### Tracker mounts The kit includes the mount for the pose source you bought: Quest or Lighthouse (VIVE Tracker 3.0). If you bought Mantis without a tracker, you can [print your own mount](#printing-your-own-mount). ![A Mantis rig grasping a part, with a VIVE Tracker 3.0 on the flat-back mount and a wrist camera fitted](https://mintcdn.com/almondbot/BCncnSBcFjU3F5Fc/assets/mantis_grasp.jpg?fit=max\&auto=format\&n=BCncnSBcFjU3F5Fc\&q=85\&s=bbaa98b9be410dc9c993cfd4efe28d92) | Pose source | Mount | Tracker-to-gripper offset | | - | - | - | | **Meta Quest** controllers | The controller is fixed to the rig. | Built in for Quest 3 (Touch Plus) controllers. Other controllers must be measured (see [Mantis Tracking](/mantis/tracking#transforms)). | | **VIVE Tracker 3.0** (Lighthouse) | Flat-back mount in place of the controller. | Built in. Nothing to measure for the standard mount. | #### Fastening a VIVE tracker to its mount To attach a VIVE Tracker 3.0 to the flat-back mount, you need: * **1× 1/4"-20 × 1/2" screw**. It goes up through the mount into the tracker's standard 1/4"-20 socket. * **1× mount pin** ([`mantis_mount_pin.stl`](https://downloads.almond.bot/resources/mantis_mount_pin.stl)), a 3D-printed pin 5 mm × 10 mm. It fits in the small hole next to the socket and stops the tracker from turning on the screw. If the tracker turns, the recorded gripper poses are wrong. Press the pin into the mount first, seat the tracker on it, then tighten the screw. #### Printing your own mount If you ordered Mantis without a tracker and use your own, 3D-print the mount for it. Download the model for your pose source: * Quest 3 controller mount, [left](https://downloads.almond.bot/resources/mantis_quest_3_mount_l.stl) and [right](https://downloads.almond.bot/resources/mantis_quest_3_mount_r.stl) (STL). The Touch controllers are mirror images, so print one of each. * [VIVE Tracker 3.0 mount](https://downloads.almond.bot/resources/mantis_vive_3_mount.step) (STEP) Each mount attaches to the rig with **M3×8 screws** ([McMaster-Carr 97763A813](https://www.mcmaster.com/97763A813/)). For a VIVE tracker, also print the mount pin, and attach the tracker as in [Fastening a VIVE tracker to its mount](#fastening-a-vive-tracker-to-its-mount). ## Installation Mantis works with or without an Axol. Install the Axol software on the computer first (see [Installation](/installation)). ### Using Mantis without a robot The rigs, the hub and a pose source are a complete data-collection setup. Besides the kit, you need a computer running Linux with systemd. Data collection needs at least one ZED camera, and the ZED cameras need GMSL inputs, so use an NVIDIA Jetson with GMSL inputs, such as a ZED Box. The grippers, triggers and tracking work on any Linux computer. When Mantis is the only hardware connected, the [control panel](/guides/control-panel) finds it and connects on its own. With **Mantis** selected, the panel shows only the two operations Mantis supports: * **Teleoperation**: the [trigger check](#testing-the-triggers-and-grippers). It drives the grippers from the triggers, without tracking. * **[Data collection](/operations/data-collection)**. Set up Mantis in this order: 1. [Install](/installation) the Axol software on the computer. 2. [Connect the hub](#connecting-the-hub). 3. [Select and connect Mantis](#selecting-and-connecting-mantis), and check the left and right sides. 4. [Test the triggers and grippers](#testing-the-triggers-and-grippers). 5. [Mount and assign the cameras](#mounting-the-cameras). 6. Set up the pose source in [Mantis Tracking](/mantis/tracking), then [collect data](/operations/data-collection). ### Connecting the hub **1. Cable the rigs to the hub** A cable comes out of the hub for each rig. Plug the **left** rig into the cable marked **L** and the **right** rig into the cable marked **R**. You can swap the sides in software later, but this wiring matches the default settings. **2. Connect the hub to the computer** Plug the hub's USB cable into the computer, then power both rigs. The computer finds the hub and works out which rig is left and which is right. If you unplug the hub and plug it back in, it reconnects on its own. **3. Let the control panel identify it** Open the [control panel](/guides/control-panel#connections) and connect to the **Host Computer**. The panel identifies a new hub on its own while both rigs are powered. If it can't, power the rigs: the panel checks again on its own and connects them. You can also run [`axol can.setup`](/cli/can-setup) in a terminal. > [!NOTE] > > `axol can.setup` resets every connected adapter, including Axol's arms, Jelly Mobile and the Mantis hub. Run it only when nothing is moving. ### Selecting and connecting Mantis **1. Select Mantis** Press **Use for operations** on the **Mantis** card. Teleoperation and data collection now run on the rigs, and the Axol-only operations are hidden until you select Axol again. The choice is saved on the computer, so everyone who uses the control panel sees it. ![The Mantis card on the control panel's Devices page, selected and waiting for hardware](https://mintcdn.com/almondbot/BBnT7TWY9oyzE1YR/assets/mantis_card.png?fit=max\&auto=format\&n=BBnT7TWY9oyzE1YR\&q=85\&s=2339ed25854740b50f581fc3ccb2f3a3) **2. Connect** When Mantis is selected and the hub is found, the panel connects on its own. If it doesn't, press **Connect** on the card. The card then shows the status of both grippers. A red square means a gripper can't be reached or has a fault. Fix it before you run an operation. **3. Check the left and right sides** Press **Open settings** on the Mantis card to open **Mantis settings**, then open **CAN**. The left and right fields must be filled in and different. The defaults are `can_mantis_l` and `can_mantis_r`. If squeezing the **left** trigger moves the **right** input, swap the two values, save and reconnect. You don't need to move any cables. ![Mantis settings CAN tab with the left and right channel fields at their defaults](https://mintcdn.com/almondbot/BCncnSBcFjU3F5Fc/assets/mantis_can.png?fit=max\&auto=format\&n=BCncnSBcFjU3F5Fc\&q=85\&s=94ed75b631207ba92eaa186f7cf5565d) ### Testing the triggers and grippers Before you set up cameras or tracking, check that each trigger drives its own gripper. Mantis teleoperation is this check. It needs only the hub, with no tracking, cameras or headset. 1. With Mantis selected, choose **Teleoperation** and press **Start**. From a terminal, run: ```bash theme={null} axol teleop --mantis ``` 2. Keep hands and objects clear of the grippers, and release both triggers. Each gripper opens fully to find its end stop. 3. Squeeze each trigger. Its gripper should close as far as you squeeze. 4. Press **Stop**, or **Ctrl-C** in the terminal, to turn both grippers off. If the triggers stop sending readings, the run stops on its own. #### If a gripper doesn't close fully If a gripper follows its trigger but stays partly open at full squeeze, adjust the trigger's end point before you change the motor torque: 1. Open **Mantis settings → Triggers**. 2. Lower **Left trigger full squeeze** or **Right trigger full squeeze** from its default of `1.0`. The range is `0.50` to `1.00`. If you know the trigger's reading at full squeeze, set it a little below the lowest reading. For example, for readings around `0.91` to `0.94`, set `0.90`. Otherwise, lower it in small steps. 3. Save, then stop and start **Teleoperation** again. 4. Squeeze each trigger fully and check that the gripper closes. If the gripper closes before the trigger reaches the end of its travel, the value is too low. Raise it. If the gripper still doesn't close when the setting is right, check the gripper's jaws, linkage and motor calibration. When both grippers close fully, record one short test take with **Collect data** before you record the rest. This setting applies to the rig triggers, used in Mantis teleoperation and in Lighthouse data collection. It does not apply to Quest controller triggers. ### Mounting the cameras Mantis can record two wrist cameras and the head stereo camera at the same time. 1. Mount up to two ZED cameras on the rigs. They mount the same way as on Axol's grippers (see [Axol Cameras](/hardware-setup/cameras)). 2. Connect each camera, including the head camera, to the computer with its GMSL2 cable. 3. Note each camera's serial number from the QR code on its back. 4. In **Mantis settings → Cameras**, assign each camera to **Head**, **Left Mantis** or **Right Mantis**. 5. Turn on **Record** for the cameras you want to record. For the head camera, turn on **Record** for both eyes to record both views. You must turn on **Record** for at least one camera before you can collect data. The Mantis camera layout is saved separately from Axol's, so changing one doesn't change the other. In the dataset, the head camera is named `overhead`. See [Cameras](/guides/control-panel#cameras) for the stream and record controls. ## Updating the firmware Each rig's trigger board can take new firmware over its CAN bus. Run [`axol mantis.update --firmware firmware.bin`](/cli/mantis-update), or use **Update Mantis firmware** under **Diagnostics → Helpers** with Mantis selected. Keep both triggers released while it runs, because each rig learns its trigger's released position when it restarts. The rigs need Mantis firmware 0.2 or newer, installed once over USB, before they can update over CAN. ## Next steps > [card] [Mantis Tracking](/mantis/tracking) > > Set up Quest or Lighthouse tracking for the rigs. > [card] [Teleoperation](/operations/teleop) > > Check the rig triggers and grippers before recording. # Mantis Tracking Source: https://docs.almond.bot/mantis/tracking Set up Meta Quest or VIVE Tracker 3.0 tracking so Mantis can record demonstrations. Mantis **data collection** needs a **pose source**: a tracking system that reports where each rig is. Mantis teleoperation doesn't use tracking. It only drives the grippers from the triggers. Mantis supports two pose sources. Choose one under **Mantis settings → Tracking** in the control panel. The default is Lighthouse. The choice and its setup are saved on the computer, so every collection run uses them. | Source | Hardware | How it tracks | What you set up | | - | - | - | - | | **Quest** | Meta Quest headset and controllers | The headset tracks the controllers. | Save the controllers' calibration key once. | | **Lighthouse** | VIVE Tracker 3.0 and 1 to 4 SteamVR base stations | The base stations sweep the room and the trackers sense them. | Install support, pair the trackers, check the base stations, identify the sides and validate tracking. | > [!NOTE] > > **VIVE Tracker 3.0** is the Lighthouse tracker. **Meta Quest** is the headset and its controllers. Before you start, finish the [Mantis hardware setup](/mantis/hardware). The hub must be connected, **Mantis** selected on its card, the left and right sides checked, and the trigger check passed. Then open **Mantis settings → Tracking** and choose the source. The choice saves right away. ## Set up the source The **Tracking** tab walks you through each source step by step: * Each step checks what the computer actually detects. * **Continue** unlocks when the current step is done. * If a finished step stops working later, the flow goes back to it. Data collection won't start until every step is done, even when you start it from the command line. Each step lists the matching CLI command. See the [tracker CLI reference](/cli/tracker) for their flags. > [tab] Quest > > The Quest headset tracks its own controllers, so there is nothing to install and no tracker to identify. The headset knows which controller is left and which is right. The only thing to save is the **calibration key**, which names the controller model. > > **1. Source** > > Choose **Quest**. The Quest headset and the computer must be on the same network. You can also use a USB cable instead (see [Quest-over-USB](/guides/quest-over-usb), set up under **General settings → Quest**). > > **2. Headset** > > 1. Start a Quest bring-up collection run. In the control panel, start **Collect data** with `mantis_allow_uncalibrated` turned on under Advanced. From a terminal, run `axol collect-data --mantis true --mantis_allow_uncalibrated true --repo_id myorg/bringup --task test`. Teleoperation doesn't work for this step. > 2. In the Quest browser, open [axol.almond.bot](https://axol.almond.bot), enter the computer's address and connect. Accept the security certificate the first time. > 3. Choose **Enter VR** and hold both controllers. > 4. The step shows each controller's model. When both match, it shows a **calibration key**, such as `quest:oculus-touch-v3:grip`. Press **Use this key**, then **Save settings**. > > The step is done when the saved key matches both live controllers and ends in `:grip`. > > Quest 3 Touch Plus controllers in the standard mount have a built-in tracker-to-gripper offset. Other controllers need a measured offset for both sides. See [Transforms](#transforms). > [tab] Lighthouse > > Lighthouse tracks two **VIVE Tracker 3.0** units with SteamVR base stations. Before you start: > > * Mount the base stations so they can't move, with the whole Mantis work area in view. > * Set each **Base Station 2.0** to a different channel. > > **1. Source** > > Choose **Lighthouse**. > > **2. Software** > > The Axol installer usually installs Lighthouse support for you. If this step is red, press **Install Lighthouse support**. From a terminal, run [`axol tracker.install`](/cli/tracker#axol-trackerinstall). It is safe to run again. > > After you update Axol: > > 1. Stop any collection run. > 2. Press **Install Lighthouse support** again, or run `axol tracker.install`. > 3. Restart the service with `sudo systemctl restart axol`. > 4. If you use the **Strict** tracking policy, run **Recalibrate Lighthouse** (see [Validate Lighthouse tracking](#validate-lighthouse-tracking)). > > **3. Trackers** > > 1. Turn on the base stations. > 2. Pair each tracker. Unplug the tracker from USB so it blinks blue, plug its dongle into the computer, and press **Pair tracker**. From a terminal, run `axol tracker.pair`. > 3. With both trackers on and in view of the base stations, press **Check base stations**. From a terminal, run [`axol tracker.lighthouse.check`](/cli/tracker#axol-trackerlighthousecheck). > > The check listens for about 20 seconds, or up to 150 seconds while it waits for the trackers to report a position. It checks that every base station and tracker is heard. It does not measure tracking quality. > > Under the **Standard** policy, this check also calibrates a new or moved setup. Under **Strict**, it doesn't, so on a new computer run **Recalibrate Lighthouse** first. > > A green tracker light means the tracker is working normally. If only one tracker reports a position, the cause can be tracking or calibration rather than pairing. > > **4. Identify sides** > > Press **Identify trackers**. From a terminal, run [`axol tracker.identify --backend survive`](/cli/tracker#axol-trackeridentify). For each side, move **only the rig it asks for** during the 3-second capture. Axol saves each tracker's serial number for its side. > > When the sides are identified, [validate tracking](#validate-lighthouse-tracking). Validation is required under the **Strict** policy and optional under **Standard**. ## Validate Lighthouse tracking The **Lighthouse tracking quality** card is always shown in the **Tracking** tab for Lighthouse. Use it to choose a tracking policy and check tracking before you collect. ### Choose a tracking policy In the card, set the number of base stations you installed (1 to 4). Then choose a **Tracking policy**: | | **Standard** (default) | **Strict** | | - | - | - | | Use it for | Portable setups, rooms with two base stations, and first setup. | Fixed installations where the base stations never move. | | Base station calibration | Keeps improving while you work. | Changes only when you run **Recalibrate Lighthouse**. | | Before collecting | Validation is optional. | You must pass validation. A pass lasts 12 hours. | | While collecting | Each take is judged when you save it (see [`--qa_gate`](/operations/data-collection-config)). | Axol watches tracking live. A take with a tracking fault must be recorded again. | Change the policy only while no operation is running. See [Lighthouse tracking policy](/cli/tracker#lighthouse-tracking-policy) for details. ### Run the check 1. Press **Validate tracking**. 2. Place both rigs **still on the table**, with their trackers in view of the base stations. 3. Wait for the first prompt. Finding the base stations can take **up to two minutes**. Keep both trackers in view, and don't restart the check, or it starts over. 4. Follow the prompts: * Hold both rigs still for **5 seconds**. * Move both rigs slowly through the work area for **12 seconds**. Move each rig at least **10 cm** and turn its wrist at least **15°**. * Hold both rigs still at another working position for **5 seconds**. The result shows whether the trackers were seen and tracked consistently. It doesn't measure absolute accuracy. You don't need a fixture or measured positions. Under the **Strict** policy, validate before the first session each day. Collection is blocked if the last check is missing, failed or older than 12 hours, or if the setup changed since. Fix the problem the check reports, then run it again. ### Recalibrate Lighthouse Run **Recalibrate Lighthouse** if a base station or tripod moved, if the calibration seems wrong, or if **Identify trackers** fails because tracking is unstable. Stop any running operation first. 1. Press **Recalibrate Lighthouse**. 2. Follow the prompts. Rest both rigs at **three different positions and angles** in the work area, **eight seconds** each, with their trackers in view. 3. Complete the hold, move and hold steps of the check, as in [Run the check](#run-the-check). The new calibration replaces the old one only if the check passes. If it fails, the old calibration stays and the card shows what went wrong. * If both sides were already identified, a passed recalibration counts as a validation. You don't need to press **Validate tracking** again. * If the sides were not identified, the card asks you to identify the sides and then validate tracking. Do both before you record. An error that a base station's identity wasn't received doesn't mean the stations moved. Keep the trackers in view and run the check again. ## Start gesture and recovery > [tab] Quest > > To start tracking, hold both rigs at the start pose. **Release both controller grips, then press both grips together.** The controller triggers open and close the grippers. In data collection, **A** starts and confirms a take, the same as on Axol. > > If either controller loses tracking, both sides freeze. Fix the tracking, then release and press both grips again. Tracking never restarts on its own. **Reset** returns to the rest pose and also needs the gesture to start again. > [tab] Lighthouse > > A run waits until both trackers report a position and both triggers are sending readings. Then: > > 1. Hold both rigs where the session should begin. > 2. **Squeeze both rig triggers together, then release both.** Tracking starts when you release. > > In data collection, the same gesture also starts the take. While recording, quickly squeeze and release either trigger fully **three times** to save the take, or **four times** to discard it. > > The side button on either rig works without moving the grippers. A short press does the start gesture, or saves the take while recording. Hold it for 1 second to discard the take. > > If a tracker loses its position or a trigger stops sending readings, both sides freeze. Fix the problem, then repeat the squeeze and release. Tracking never restarts on its own. **Reset** returns to the rest pose and also needs the gesture to start again. > > A Quest headset can still connect to watch the video and status. Its controllers are ignored. By default, the 3D robot overlay is hidden in the headset with Lighthouse. ## Transforms When tracking starts, Axol works out where the rigs are relative to the robot. It still needs to know where the gripper sits relative to the tracker on each rig. This fixed offset is the **tracker-to-gripper transform**. | Source | Transform | | - | - | | Lighthouse (Tracker 3.0) | Built in for the standard flat-back mount: `[0, 0.035, 0.047, 0, 1, 0, 0]` for both sides. The tracker sits 47 mm behind and 35 mm above the gripper motor face. | | Quest 3 (Touch Plus) | Built in for `quest:meta-quest-touch-plus:grip`, mirrored between the left and right mounts. The grip point sits 62 mm behind and 45 mm above the gripper motor face. Used when no Quest value is saved. | | Other Quest controllers | Not built in. Measure the gripper position in each controller's grip frame, and save it for both sides under the controller's `quest::grip` key. | To use a different value, or to save a Quest measurement, edit `~/.almond/mantis/tcp_transform.json`. The control panel doesn't edit this file. For each side, `pos` is the gripper position in the tracker's frame, in **metres**. `quat` is the gripper rotation in that frame, as **`[qx, qy, qz, qw]`**. See [Transform file](/cli/tracker#transform-file) for the full format and how to measure a missing value. Data collection won't start if either side's transform is missing or out of date. > [!WARNING] > > Mantis datasets recorded with Axol 0.2.4 or earlier have the gripper rotated about 90°, and Axol can't replay them. Repair them with [`axol migrate-dataset --mantis-tcp-rotation`](/cli/migrate-dataset#mantis-tracker-gripper-rotation) before replay or training. > > Mantis datasets recorded with Axol 0.2.5 to 0.2.16 place the tracker 92 mm in front of the gripper instead of 47 mm behind it. `collect-data` won't add episodes to these datasets. Record to a new `repo_id`. ## Acceptance Check the setup before you record training data. **Lighthouse:** pass **Validate tracking** (see [Run the check](#run-the-check)). Under the **Strict** policy, this is required before the first session each day. **All sources:** run a short bring-up collection run and discard every take. Clear the work area, then start **Collect data** with `mantis_allow_uncalibrated` turned on, or run: ```bash theme={null} axol collect-data --mantis true --mantis_allow_uncalibrated true --repo_id myorg/bringup --task test ``` Check these with the real pose source: 1. **Movement.** Left and right are on the correct sides. Motion has the right scale in every direction, wrist rotation follows, and the gripper lines up with the tracker. With Quest, watch the virtual arms in the headset. With Lighthouse, watch the robot view in the control panel. 2. **Recovery.** Cover one tracker, or move it out of tracking, and check that both sides freeze. Restore tracking and check that nothing moves until you repeat the start gesture. A source that jumps, drifts, swaps sides or doesn't recover cleanly is not ready for collection. `axol teleop --sim --teleop.absolute_mode true` is only a demo of the mapping. Check the real source with Mantis selected, in a collection run. ### Hold the rigs correctly **Identify trackers** assigns each tracker to a side by which one you move, not by which rig it is on. If the left tracker is on the rig in your right hand, every recorded pose is turned 180° and left and right are swapped. To catch this, Axol refuses to start tracking when both grippers point away from the robot. This check needs a tracker-to-gripper transform on both sides. The log shows `Teleop engage rejected: both grippers face away from the robot's rest heading`, and nothing is recorded. Swap the rigs between your hands, or identify the trackers again. Then release and squeeze both triggers again. When you start tracking, hold each rig the way the robot holds its gripper at rest: fingers down, tracker up, handle toward you. A rig pointing straight up or down is not checked. ### During recording * **Out of reach.** If a rig moves somewhere Axol's arm can't reach, the recording counts those frames as `out_of_reach` and shows a warning. Axol can't follow those poses on replay. * **Rejected takes.** When you save, Axol checks the take's tracking and camera frames. If it rejects the take, a red alert shows the reason. The alert stays until you start a new recording or save an episode. The saved count goes up only after a successful save. * **Standard policy.** There are no live tracking checks. Axol judges each take when you save it, on stale poses, frames without tracking and restarts of tracking (see [`--qa_gate`](/operations/data-collection-config)). * **Strict policy.** The episode controls show the live tracking status. Recording waits until tracking is ready. A warning about reduced coverage still lets you record, but fix the coverage. A serious tracking fault marks the take for a retake and turns off **Save**, even if tracking recovers. You can still discard the take and record it again. ### If tracking fails | Problem | What to do | | - | - | | A tracker was briefly out of view | Restore its view and wait for the live checks to pass, then start a new take. | | The calibration is wrong | Stop collection and run **Recalibrate Lighthouse**. It includes the validation. | | The tracking process stopped | Stop the session and read the error. Recalibrating won't fix a crash. Press **Install Lighthouse support** to repair it, and keep the session log if it keeps crashing. | Smooth poses don't prove that tracking is accurate. Use the acceptance checks above. ## Automatic Lighthouse fault captures Under the **Strict** policy, Lighthouse collection records tracking data in the background once tracking is ready. The episode panel says that automatic fault capture is ready. You don't need to do anything else. When a tracking fault happens, Axol saves the 10 seconds before it and the 3 seconds after it. Faults include a pose jump, a stalled pose stream or a timing problem between the two trackers. 1. Keep the session open until the panel says **Tracking diagnostics saved**. 2. Stop the session. 3. Keep the capture shown in the panel and share it with Almond. Captures are saved under `~/.almond/tracker/diagnostics/fault-*/`. They stay even if you discard the take. A session saves at most three captures, at least 30 seconds apart. Capturing doesn't affect tracking or the grippers. ## Next steps > [card] [Teleoperation](/operations/teleop) > > Check the grippers from the rig triggers, without tracking. > [card] [Data Collection](/operations/data-collection) > > Record Mantis episodes to a LeRobot dataset. # Run Your Own Policy Source: https://docs.almond.bot/operations/custom-policy Drive Axol with your own model by serving it behind a small policy server. Run Policy and DAgger collection can drive the arms with **your own model**, in any framework. It can be a JAX model, a different PyTorch version, a VLA served elsewhere or a hand-written controller. 1. Wrap the model in a small server with the [`almond_axol.policy`](/api/policy) SDK. 2. Start Run Policy or DAgger collection with `--policy_type custom`. The robot sends your server the arm state and camera frames, and runs the action chunks it returns. The robot never loads the model. ```mermaid theme={null} flowchart LR subgraph robot [Robot host] sensors[Cameras and joint sensors] client[Network client] control[Control loop] motors[IK, speed limits and motors] sensors --> client control -->|current plan| client control --> motors end endpoint[Your policy server] client -->|observations and current plan| endpoint endpoint -->|action plan| client client -->|checked reply| control ``` Your server handles preprocessing, inference, instructions, postprocessing and any blending between chunks. While the server works on a new plan, the robot keeps running the current one. When the new plan arrives, the robot switches to it at the row that is due, so a slow network doesn't stall the arms. See [Timing and continuity](/api/policy-plan#robot-control-loop) for details. ## Write the policy Install `almond-axol` wherever the model runs. The base install is enough. LeRobot and PyTorch aren't needed. Subclass [`Policy`](/api/policy) and start it with `serve()`: ```python theme={null} # my_policy.py import numpy as np from almond_axol.policy import Observation, Policy, PolicySpec, serve class MyPolicy(Policy): fps = 30 # optional: refuse a robot running at another rate def __init__(self, checkpoint: str, task: str) -> None: self.checkpoint, self.task = checkpoint, task def setup(self, spec: PolicySpec) -> None: # spec.state_names / spec.action_names / spec.cameras say exactly # what the robot will send and expect. self.model = load_my_model(self.checkpoint) def reset(self) -> None: self.model.reset() # episode start, or the robot discarded its plan def infer(self, obs: Observation) -> np.ndarray: # obs.state float32, spec.state_names order (radians; gripper 0-1) # obs.images {"overhead": (H, W, 3) uint8 RGB, ...} # obs.plan rows of the current plan still to run, or None return self.model.predict(obs.state, obs.images, self.task) # (T, D) serve(MyPolicy("myorg/my-model", "pick the red cube"), host="127.0.0.1", port=8765) ``` `infer` returns `T` future targets, one row per control tick, in `spec.action_names` order. See [Action chunks](/api/policy#action-chunks) for the accepted shapes and [State and action names](/api/policy#state-and-action-names) for the layout. If you trained on a dataset from [Data Collection](/operations/data-collection), the names match its `observation.state` and `action` features. The robot runs each chunk as sent and switches to a new one at the row that is due when it arrives. To keep that switch smooth, do one of these: * **Continue the motion in progress.** Condition on `obs.plan`, or at least start near `obs.plan[0]`. * **Ensemble on the server.** Use `serve(..., ensemble=0.01)` for an ACT-style chunked policy trained with temporal ensembling. `serve()` handles the rest of the [interface](/api/policy-plan). It confirms the session settings, keeps the plans it sent so `obs.plan` works, clears them on reset, and shows your exceptions to the operator. To write the server in another language, follow the [interface reference](/api/policy-plan). Your policy chooses the model, checkpoint and instruction. On the robot, `--task` only labels recorded episodes, and `--policy_path` is not used. ## Check it without the robot With the server running, play the robot's side of a session against it: ```bash theme={null} axol policy.check --delay_steps 3 ``` [`policy.check`](/cli/policy-check) runs the robot's scheduler on a simulated clock, here with 3 ticks of reply delay. It reports: * replies that arrive too late, * the server's round-trip time, and * the largest jumps where one plan hands over to the next. Match `--cameras`, `--cartesian` and the chunk settings to your robot. `check_policy()` does the same from Python, for unit tests. ## Run on the robot host Replace the endpoint address and camera serial with your configuration: ```bash theme={null} axol run-policy --policy_type custom \ --server_host 192.0.2.10 --server_port 8765 \ --task "Pick the red cube" \ --fps 30 --actions_per_chunk 30 \ --robot_config.cameras "{overhead: {serial: 41234567}}" ``` The command connects to your server. It doesn't start one. Without `--server_host`, it connects to `127.0.0.1`. An episode can start only when the robot and the server agree on the cameras, state and actions. To run it from the control panel: 1. Start your `serve()` process. The panel doesn't start it. 2. Assign the cameras. 3. Select **Run policy** and choose policy type **custom**. 4. Enter the task label and leave the policy path blank. 5. Set the server's host and port under **Settings → Inference**. A blank host means this computer, on port 8765 by default. 6. Press **Start**. The usual episode controls and recording options work. See [`run-policy`](/cli/run-policy) for the controls and settings. Two settings control timing for custom policies: * `plan_config.request_interval` (default 5) sets how many actions run between requests. * `plan_config.max_adoption_offset_steps` (default 6) sets how late a reply may arrive. The LeRobot chunk settings (`aggregate_fn`, `chunk_size_threshold`, temporal ensembling and chunk alignment) don't change a custom policy's plans. Do any blending on your server. The robot still limits joint speed and acceleration. ## Collect corrections with DAgger ```bash theme={null} axol collect-dagger --policy_type custom \ --server_host 192.0.2.10 --server_port 8765 \ --task "Pick the red cube" --repo_id myorg/policy-corrections \ --hold_to_intervene true --record_joint_actions true \ --home_on_start true --start_from_current_pose true \ --robot_config.cameras "{overhead: {serial: 41234567}}" ``` * Hold either grip to drive that arm. * Release both grips to hand back. The robot holds your last command until the policy's new plan arrives, then blends into it. * The policy can keep predicting while you drive, but its predictions never move the arms. * Taking over and handing back stay within the same episode, and your frames are labeled as interventions. DAgger has separate server settings. It reads its shared settings from data collection, not from the **Inference** settings that Run Policy uses. See [`collect-dagger`](/cli/collect-dagger#remote-policies-through-the-custom-policy-interface) for settings, recording, startup homing and shutdown. ## Failure behavior * A malformed reply, a mismatch in cameras, state or actions, or a lost connection stops the policy. * When the plan runs out, `plan_config.late_policy` decides what happens. The default holds the arms and requests a new plan. `abort` ends the session. * The robot never stretches an old plan to fill a gap. * The robot doesn't reconnect automatically to resume motion. See [Lifecycle and failure](/api/policy-plan#lifecycle-and-failure) for details. # DAgger Collection Source: https://docs.almond.bot/operations/dagger Run a trained policy, correct it from VR, and record the corrections to retrain it. DAgger collection runs a trained policy on Axol while you watch in VR. When the policy goes wrong, you take over with the controllers and correct it. Axol records both the policy's motion and your corrections into a [LeRobot](/api/lerobot) dataset. Retraining on that data teaches the policy the cases where it struggles. The method is called [DAgger](https://arxiv.org/abs/1011.0686). The policy drives the arms as in [Run Policy](/operations/run-policy), and you take over as in [Data Collection](/operations/data-collection). Run it on the same computer: the one wired to the robot with the ZED cameras attached. Start it from the web control panel or with `axol collect-dagger`. ## Before you start * Install Axol with the [one-command install](/installation). Bring up CAN and check the motors. * Connect at least one of the ZED cameras the policy was trained on, and have their serial numbers ready. See the [Data Collection](/operations/data-collection#before-you-start) tip for how to list them. Use the **same** cameras, resolution, stereo setting and recording rate the policy was trained on. * Have a trained checkpoint and its policy type (`act`, `smolvla`, `pi0` and so on). The checkpoint can be a local path or a HuggingFace repo. * Inference runs on this computer. You need a PyTorch build with CUDA, or pass `--device cpu`. On a Jetson, the hosted install comes with the CPU-only PyTorch build. Axol's updater doesn't replace a JetPack-compatible build you installed yourself. * [Authorize the VR certificate](/operations/teleop#authorize-the-tls-certificate) and have the headset ready. You correct the policy from it. > [!WARNING] > > Load only checkpoints and datasets that you made or got from a source you trust. Model and dataset loading is not sandboxed. ## Run it > [tab] Control Panel > > **1. Connect the robot and assign cameras** > > Connect the **Host Computer** and **Axol**. Under **Axol settings → Cameras**, assign at least one of the cameras the policy was trained on, with recording on. See [Cameras](/guides/control-panel#cameras). > > **2. Select Collect DAgger data and fill in the fields** > > Pick **Collect DAgger data** and fill in **Policy path**, **Policy type**, **Task** and **Repo ID**. To add to an existing DAgger dataset, enter its repo ID. Stiffness, rates and inference settings are in the [Settings](/guides/control-panel#settings) tabs. > > **3. Start, then correct from the headset** > > Press **Start** and connect the headset. Start and end episodes from the **Episode control** box. Use the **grips** to take over and hand back during an episode, as described in [Intervening](#intervening). The panel shows the camera feeds and episode state, so you can follow along with the headset off. > [tab] CLI > > On the Host Computer: > > ```bash theme={null} > axol collect-dagger \ > --policy_path myorg/pick-place-policy \ > --policy_type act \ > --task "Pick the red cube and place it in the bin" \ > --repo_id myorg/pick-place-dagger \ > --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" > ``` > > For CPU inference, add `--device cpu`. Replace the serial numbers with your cameras' and assign the cameras the policy was trained on. The `cameras` value is one inline YAML dictionary. See [Command configuration](/cli/configuration#field-name-conventions). > > Connect the headset and correct the policy from the controllers. In the terminal, `s` saves, `r` discards and `q` quits. Press `Ctrl+C` to finish. See [`collect-dagger`](/cli/collect-dagger) for every field. ## Intervening During an episode, the policy drives the arms. Use the VR grip buttons to take over when it needs help, and to hand back when it has recovered: | When | Press | Result | Recording | | - | - | - | - | | The **policy** is driving | **Either** grip | **Freeze**: the robot holds its pose. | Pauses | | The arms are **frozen** | **Both** grips | **Take over**: you drive from where the arms are. | Resumes | | **You** are driving | **Either** grip | **Hand back**: the policy drives again. | Continues | * Tracking starts from where the arms are, so the arms don't jump when you take over. * The grippers follow your triggers as soon as you take over. Set the triggers before you press the grips. To keep a part held, hold the trigger down. * When you hand back, the policy plans from where you left the arms. * Nothing is recorded while the arms are frozen. The episode runs straight from the policy's motion into your correction and back. With a custom policy, the grips work differently. Hold a grip to drive that arm, and release both to hand back. See [Run Your Own Policy](/operations/custom-policy#collect-corrections-with-dagger). > [!NOTE] > > If the headset link drops while you drive, tracking disengages and the policy takes over again. ## Episodes You start and end episodes from VR, as in [data collection](/operations/data-collection#recording-an-episode): * Press **Record** (**A**) to start an episode. The policy starts driving and recording begins. * Press **Record** again to save the episode. * Hold **Reset** (**X**) and press **Record** to discard the episode and record it again. * In the terminal, `s` saves, `r` discards and `q` discards and quits. * `--episode_time_s` limits each episode, 600 s by default. When it runs out, the episode is saved. * With `--subtasks` set, type a number from 1 to N to switch the policy's instruction during the episode. The dataset keeps `--task` as its task. The panel's **Episode control** box has the same **Start episode**, **Save**, **Discard** and **Return to rest** buttons as [run policy](/guides/control-panel#episode-controls), so you can run a session with the headset off. ### Between episodes Between episodes, the arms return to the rest pose, so every episode starts in the same place. * The grips work as plain teleoperation, so you can reset the scene with the arms. Press both grips to engage and one to release. Nothing is recorded. * Press **Reset** in VR to send the arms home. If you leave the arms away from rest, they also return home when you press **Record**. Every return to rest is guarded, as in [data collection](/operations/data-collection) and [run policy](/operations/run-policy). If an arm meets resistance, the move stops and the arms go limp in a **gravity-compensation hold**. Move them clear by hand, then press **Reset** in VR or **Return to rest** in the panel. Set the sensitivity with **Return-to-rest contact stop** in the panel, or `--teleop_config.vr_teleop_config.reset_torque_threshold` (default `6.0` Nm, `0` turns it off). ## What gets recorded Each saved episode is one continuous take: the policy's motion, your correction, then the policy again, with the frozen gaps left out. Each frame has an **`intervention`** flag. It is `True` on frames you drove and `False` on the policy's frames, so training can weight or filter your corrections. DAgger datasets save and resume like [`collect-data`](/cli/collect-data) datasets. You can resume only a dataset that has the `intervention` flag, which means one recorded with `collect-dagger`. ## Next steps > [card] [Config Parameters](/operations/dagger-config) > > Every setting for DAgger collection, with its default. > [card] [Train a Policy](/operations/train-policy) > > Retrain on the combined demonstrations and corrections. > [card] [Run Policy](/operations/run-policy) > > Run the retrained policy without corrections. > [card] [collect-dagger reference](/cli/collect-dagger) > > Every flag for DAgger collection. > [card] [Data Collection](/operations/data-collection) > > Record new teleoperation episodes from scratch. # DAgger Collection Config Parameters Source: https://docs.almond.bot/operations/dagger-config Every setting for axol collect-dagger, what it does and its default. Every setting for `axol collect-dagger`. 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. The [shared settings file](/guides/control-panel-settings) (`~/.almond/settings.json`) is read by default. It stores these flags in the same sections as for [data collection](/operations/data-collection-config), without this command's prefixes. | Flag | Section in the settings file | | - | - | | `robot_config.axol_config.*` | `axol` | | `robot_config.left_channel`, `robot_config.right_channel` | `robot` | | Other `robot_config.*` fields | `lerobot` | | `teleop_config.vr_teleop_config.*` | `teleop` | | `teleop_config.kinematics_config.*` | `kinematics` | | Recording flags | `recording` | ```bash theme={null} axol collect-dagger --policy_path myorg/pick-act --policy_type act \ --repo_id myorg/pick-dagger --task "pick up the cup" \ --robot_config.axol_config.left_stiffness 0.8 ``` > [!WARNING] > > Use the **same** stiffness, gripper torque, `observe_torques`, `observe_cartesian`, `fps` and cameras as when the policy's training data was recorded. A policy only works with the settings it was trained on. ## Policy | Flag | Default | Description | | - | - | - | | `--policy_path` | required for local policies | Checkpoint, as a HuggingFace Hub repo ID or a local path. Not used with `custom`. | | `--policy_type` | required | `act`, `smolvla`, `diffusion`, `tdmpc`, `vqbet`, `pi0`, `pi05`, `groot` or `custom` ([your own model](/operations/custom-policy)). | | `--device` | `cuda` | `cuda`, `cpu` or `mps`. Local policies only. | | `--episode_time_s` | `600` | Maximum episode length (s), including interventions. `0` removes the cap. | | `--policy_max_vel` | `6.283` | Local policies: speed limit (rad/s) on joint actions. `0` turns it off. | | `--policy_max_accel` | `21.99` | Local policies: acceleration limit (rad/s²) on joint actions. | | `--subtasks` | `null` | Local policies: a list of instructions, such as `["reach","grasp","lift"]`. Type a number from 1 to N to switch instruction during an episode. Not allowed with `custom`. | ## Custom policy interface These fields apply with `--policy_type custom`, which uses the [custom policy interface](/api/policy-plan). Set them on the `collect-dagger` command. DAgger reads its shared settings from data collection, not from the **Inference** settings that run policy uses. | Flag | Default | Description | | - | - | - | | `--server_host` | `127.0.0.1` | Address of the existing policy endpoint. | | `--server_port` | `8765` | Policy endpoint port. | | `--actions_per_chunk` | `30` | Maximum number of actions in each plan. | | `--plan_config.request_interval` | `5` | Run this many actions between policy requests. | | `--plan_config.max_adoption_offset_steps` | `6` | How many control steps a reply may arrive after its request. Must be shorter than the plan. | | `--plan_config.late_policy` | `blocking_refresh` | When the plan runs out, hold and request a new one. `abort` ends the session instead. | | `--hold_to_intervene` | `false` | Must be `true` with `custom`. Hold a grip to take control, and release both to hand back. | | `--shadow_inference` | `true` | Keep the policy predicting while you drive. Its replies are ignored. | | `--handover_duration_s` | `0.2667` | Time (s) to blend from your last command back to the policy when you hand back. | | `--record_joint_actions` | `false` | Record joint commands as the actions, whatever action layout the policy uses. | | `--start_from_current_pose` | `false` | Skip the move to rest at startup and after teleoperating between episodes. | | `--home_on_start` | `false` | With `--start_from_current_pose`, still move to rest at startup. | ## Recording | Flag | Default | Description | | - | - | - | | `--repo_id` | required | Dataset ID, `/`. | | `--task` | required | Task description saved with every frame and sent to local policies. A custom policy chooses instructions on its server. | | `--fps` | `30` | Recording rate and control rate. Must match the policy's training rate. Cameras capture at 60 and drop frames to match. | | `--teleop_hz` | `120` | Motor command rate (Hz) while you intervene, independent of `fps`. | | `--policy_fps` | `20` | Rate of new camera images for the policy, up to the capture rate. Between images the policy reuses the last ones. Recording and control stay at `fps`. | | `--dataset_resolution` | `SVGA` | Resolution of the recorded video and of the images the policy sees: `SVGA`, `HD1080` or `HD1200`. | | `--vcodec` | per platform | Dataset video codec: `h264` on Jetson, `auto` elsewhere. | | `--root` | `null` | Local dataset directory. Default is the LeRobot cache, `~/.cache/huggingface/lerobot`. | | `--push_to_hub` | `false` | Upload the dataset to the HuggingFace Hub when done. Log in first. See [Upload to the HuggingFace Hub](/operations/data-collection#upload-to-the-huggingface-hub). | | `--rerun_ip` | `null` (off) | Stream live visualisation to a [Rerun](https://rerun.io) viewer at this address. | | `--rerun_port` | `9876` | Rerun viewer port. | | `--log_level` | `INFO` | `DEBUG`, `INFO`, `WARNING`, or `ERROR`. | | `--config_path` | none | Load a JSON or YAML config file. Flags override it. | | `--settings_path` / `--no_settings` | `~/.almond/settings.json` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. The config file and flags override it. | ## Robot CAN buses, cameras and what goes into observations. | Flag | Default | Description | | - | - | - | | `\--robot_config.left_channel` | `can_alm_axol_l` | CAN interface for the left arm. | | `\--robot_config.right_channel` | `can_alm_axol_r` | CAN interface for the right arm. | | `\--robot_config.cameras` | 3 unassigned slots | Camera slots `overhead`, `left_arm` and `right_arm`, passed inline: `--robot_config.cameras "{overhead: {serial: 41234567}}"`. Slots left at serial `0` are dropped. | | `\--robot_config.video_backend` | `auto` | Camera backend: `gst` (GPU pipeline, low latency), `sdk` (ZED SDK), or `auto` (prefers `gst`). Must match between collection and inference. | | `\--robot_config.observe_torques` | `false` | Include joint torques in observations. Must match between collection and inference. | | `\--robot_config.observe_cartesian` | `false` | Use end-effector poses instead of joint angles for observations and actions. Must match between collection and inference. | | `\--robot_config.id` | `null` | LeRobot bookkeeping, unused by Axol. | | `\--robot_config.calibration_dir` | `null` | LeRobot bookkeeping, unused by Axol. | ### Cameras One ZED camera per slot: `overhead`, `left_arm`, `right_arm`. Flags are shown for `overhead`; swap in the other slot names. Stereo ZED X cameras are detected from their serial. The [control panel's Cameras tab](/guides/control-panel#cameras) edits all of this visually. | Flag | Default | Description | | - | - | - | | `\--robot_config.cameras.overhead.serial` | `0` (unassigned) | Serial number of the ZED camera. `0` leaves the slot unused. | | `\--robot_config.cameras.overhead.fps` | `60` | Capture rate. Raised automatically if the recording `fps` is higher. | | `\--robot_config.cameras.overhead.width` | `960` | Capture width. With `height`, must be a ZED resolution: `SVGA` 960×600, `HD1080` 1920×1080, `HD1200` 1920×1200. | | `\--robot_config.cameras.overhead.height` | `600` | Capture height. | | `\--robot_config.cameras.overhead.color_mode` | `RGB` | `RGB` or `BGR`. | | `\--robot_config.cameras.overhead.warmup_s` | `1` | Seconds of frames discarded on connect. | | `\--robot_config.cameras.overhead.stereo` | `false` (auto) | Force stereo on or off instead of detecting it from the serial. | | `\--robot_config.cameras.overhead.eyes` | `both` | Which eye(s) to **record**: `both` (`overhead_left` + `overhead_right`), `left`, or `right`. | | `\--robot_config.cameras.overhead.stream_eyes` | `null` | Which eye(s) to **stream** to the headset. `null` follows `eyes`. Not used by run-policy. | | `\--robot_config.cameras.overhead.record` | `true` | Write this camera to the dataset. | | `\--robot_config.cameras.overhead.stream` | `true` | Show this camera in the headset. Not used by run-policy. | ### Arm gains Arm stiffness, gripper limits and per-joint gains. | Flag | Default | Description | | - | - | - | | `\--robot_config.axol_config.left_stiffness` | `1.0` | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). One number sets every joint, and a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. | | `\--robot_config.axol_config.right_stiffness` | `1.0` | Same, for the right arm. | | `\--robot_config.axol_config.has_gripper` | `true` | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8. | | `\--robot_config.axol_config.gripper` | `parallel` | Which gripper is fitted: `parallel` (the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Box mode works only with `parcel`. | | `\--robot_config.axol_config.max_step_rad` | `0.5` | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables. | | `\--robot_config.axol_config.controller` | `impedance` | Control law for the arms. `impedance` is compliant and runs at 240 Hz, and `position` hands each joint to its motor's own position loop at 400 Hz (see the notes below). | | `\--robot_config.axol_config.impedance_hz` | `240.0` | Command rate (Hz) of the MyActuator impedance joints: `240.0` or the experimental `480.0`. The gains were tuned at 240 Hz. | | `\--robot_config.axol_config.wrist_thermal.enabled` | `true` | Lower a wrist's torque while it cools down when `wrist_2` or `wrist_3` gets hot. See the notes below. `false` turns it off. | | `\--robot_config.axol_config.wrist_thermal.coil_limit_c` | `75.0` | Motor coil temperature (°C) at which the wrist's torque starts to come down. The motor turns itself off at 100 °C. | | `\--robot_config.axol_config.wrist_thermal.coil_resume_c` | `65.0` | Coil temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.driver_limit_c` | `105.0` | Motor driver temperature (°C) at which the torque starts to come down. The driver turns itself off at 120 °C. | | `\--robot_config.axol_config.wrist_thermal.driver_resume_c` | `95.0` | Driver temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.cool_torque_nm` | `1.5` | Torque (Nm) the wrist is held to while it cools. The motor is rated for 3.5 Nm continuous. | | `\--robot_config.axol_config.wrist_thermal.ramp_s` | `0.25` | Seconds over which the torque comes down, and later comes back. | | `\--robot_config.axol_config.left.gripper.torque_limit` | `0.5` | Grip force: peak gripper torque (Nm), at most `5`. | | `\--robot_config.axol_config.left.gripper.max_speed` | `10.0` | Maximum gripper speed (rad/s). | | `\--robot_config.axol_config.left.elbow.kp` | per joint | Position stiffness of one joint at stiffness `1`, in `[0, 500]`. | | `\--robot_config.axol_config.left.elbow.kd` | per joint | Velocity damping in the motor firmware, in `[0, 5]`. | | `\--robot_config.axol_config.left.elbow.kd_host` | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. `0` on joints whose firmware damping is enough. | | `\--robot_config.axol_config.left.elbow.kd_host_hz` | `null` | Centre frequency (Hz) of the band the host damping acts in. `null` follows the arm's pose. | | `\--robot_config.axol_config.left.elbow.kd_host_q` | `null` | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`. | | `\--robot_config.axol_config.left.elbow.j_eff` | per joint | Effective inertia (kg·m²) used for acceleration feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_gain` | `0.0` | Push toward the target while the joint is stuck, as a fraction of `friction.fc`. It fades out once the joint slides, and `0` turns it off. | | `\--robot_config.axol_config.left.elbow.stiction_load_gain` | `0.0` | Part of that push that grows with load, in Nm per Nm of the joint's gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_err_deg` | `0.1` | Position error (degrees) at which that push reaches full strength. | | `\--robot_config.axol_config.left.elbow.dither_nm` | `0.0` | Peak amplitude (Nm) of a sinusoidal torque dither that keeps a geared joint from sticking. `0` is off. | | `\--robot_config.axol_config.left.elbow.dither_hz` | `60.0` | Dither frequency (Hz). Keep it above the arm's structural modes (about 35 Hz) and below the core's 120 Hz Nyquist limit. | | `\--robot_config.axol_config.left.elbow.stribeck_gain` | `0.0` | Friction cancellation based on measured velocity, as a fraction of the measured static-minus-sliding friction excess. `0` is off. | | `\--robot_config.axol_config.left.elbow.stribeck_dfs` | `0.3` | Static-minus-sliding friction excess (Nm) at zero gravity load. | | `\--robot_config.axol_config.left.elbow.stribeck_load_gain` | `0.1` | Growth of that excess per Nm of gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stribeck_vs` | `0.1` | Speed (rad/s) at which the excess has fallen to 1/e. | | `\--robot_config.axol_config.left.elbow.stribeck_pole` | `20.0` | Low-pass pole (rad/s) on the measured velocity the term uses. Higher values follow fast changes better but add encoder noise to the torque. | | `\--robot_config.axol_config.left.elbow.wire_mode` | `mit` | How the core commands the joint while tracking: `mit` (impedance), `a4` (a MyActuator joint's own position loop) or `pv` (a Damiao wrist's position-velocity mode). | | `\--robot_config.axol_config.left.elbow.mass` | 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). | | `\--robot_config.axol_config.left.elbow.com` | per joint | Centre of mass `[x, y, z]` (m) of the link. | | `\--robot_config.axol_config.left.elbow.friction.fc` | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction). | | `\--robot_config.axol_config.left.elbow.friction.k` | per motor | Friction curve sharpness. | | `\--robot_config.axol_config.left.elbow.friction.fv` | per motor | Viscous friction (Nm·s/rad). | | `\--robot_config.axol_config.left.elbow.friction.fo` | per motor | Constant torque offset (Nm). | | `\--robot_config.axol_config.left.elbow.friction.fl` | `0.0` | Coulomb friction that grows with load, in Nm per Nm of gravity feed-forward. The effective `fc` is `fc + fl × abs(gravity)`, and `0` keeps `fc` constant. | | `\--robot_config.axol_config.left.elbow.firmware.position_kp` | `null` | Proportional gain of the firmware position loop (MyActuator 0x30 index 0x07, Damiao register KP\_APR). `null` keeps the motor's stored value. | | `\--robot_config.axol_config.left.elbow.firmware.position_ki` | `null` | Integral gain of the firmware position loop. Leave it at the stock `0`, because together with the speed integrator it hunts around the target. | | `\--robot_config.axol_config.left.elbow.firmware.position_kd` | `null` | Derivative gain of the firmware position loop (protocol V4.2 and later). The 0xA4 loop on the X8-P20 doesn't respond to it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_kp` | `null` | Proportional gain of the firmware speed loop. Higher values make the loop's resonance (about 100 Hz on the X8-P20, 135 Hz on the X6-P20) louder until it goes unstable, so lower is quieter. | | `\--robot_config.axol_config.left.elbow.firmware.profile_acc` | `null` | **Damiao wrists only.** Acceleration (rad/s²) of the position-velocity profiler. The stock `2` can't keep up with the 200 Hz stream, and `50` follows it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_ki` | `null` | Integral gain of the firmware speed loop. Values below the stock `1e-4` are smoother on a geared joint, because the integrator winds up while the joint is stuck. | | `\--robot_config.axol_config.left.elbow.firmware.planner_accel` | `null` | **MyActuator `a4` joints only.** Acceleration and deceleration (dps/s) of the 0xA4 position planner. Only `0` (direct tracking) and `60000` (each step finished within one tick) are accepted. | | `\--robot_config.axol_config.left.elbow.firmware.cap_track` | `null` | **0xA4 joints with the planner on.** Sets each tick's speed cap to this multiple of the commanded speed (`1.1` to `1.2` works well). Leave it unset for direct tracking. | | `\--robot_config.axol_config.left.elbow.firmware.tf_rated_current_a` | `null` | **MyActuator `a4` joints.** The motor's rated current (A), from the datasheet or [`tune.a4 --tf-probe`](/cli/tune-a4). When set, the core adds gravity and inertia torque feed-forward to the position command. | | `\--robot_config.axol_config.left.elbow.impedance_hz` | `null` | This joint's impedance command rate: `480.0`, `240.0`, or `null` to follow `impedance_hz` above. | 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. > [accordion] Controller and command rates > > **Position controller.** `controller` `position` sets every joint to its firmware position loop (`a4` on the MyActuator joints, `pv` on the Damiao wrists) and uses the `firmware.*` gains. It is stiff: there is no compliance and no host feed-forward. Teleop takes `--axol.controller position`, and recorded-motion replays take `--controller` ([`tune.motion`](/cli/tune-motion)). > > At 400 Hz the bus can't carry every motor every tick: > > * The MyActuator joints are commanded every tick. > * The two wrists are commanded on alternate ticks, 200 Hz each. > * One precise position read per tick rotates through the MyActuator joints and the gripper, about 67 Hz each. > > **Impedance rates.** Impedance joints run at 240 Hz. An arm that mixes impedance joints with firmware-loop joints runs its core at 480 Hz, with each impedance joint on alternate ticks. Any other core rate with an impedance joint on the arm is refused. Under `impedance`, a `wire_mode` you set on a joint is kept. > > With `impedance_hz` at `480.0`, or any joint's own `impedance_hz` at `480.0`, the arm's core runs at 480 Hz. The 480 Hz joints are commanded every tick, and the other impedance joints, including the Damiao wrists, on alternate ticks. `tune.motion --impedance-hz 480` and `tune.motion --fast-impedance right.shoulder_1` set these for one run. > [accordion] Wrist temperature limit > > The wrist motors (`wrist_2` and `wrist_3`) are rated for 3.5 Nm continuous. Held harder for long, for example pressing on something or squeezing a box, they heat up until the motor turns itself off and the wrist goes limp. The temperature limit prevents that: > > 1. When a wrist's coil reaches `coil_limit_c`, or its driver reaches `driver_limit_c`, its torque comes down to `cool_torque_nm` over `ramp_s`. > 2. The torque stays low until both have cooled to their resume temperatures. Expect a few minutes. > 3. Then the full torque comes back over `ramp_s`. > > While a wrist cools it gives way to anything it pushes on, and it still holds the gripper up. The session log shows a warning when its torque comes down, and a second one if it keeps heating. If you see the second, let the arm rest. > > The limit works on wrists running the default `mit` mode. A wrist on `pv` has no limit. > [accordion] Firmware position loops (a4 and pv) > > * A joint on `a4` or `pv` has no compliance and no host feed-forward. > * An `a4` joint's torque reads NaN, so the contact stop can't see that joint. A `pv` wrist keeps its torque reading. > * The gripper, gravity compensation and the limp fallback always use `mit`. On X6-P20 motors with the 2025-07 firmware, an `a4` joint that was hand-guided needs a re-enable before it tracks again. > * On `pv`, the core sets the Damiao control mode at bring-up and switches it back to MIT for limp and gravity compensation. > > **Firmware gains.** The `firmware.*` fields are the motor's own position and speed loops. They act only while a joint runs a firmware loop, so every joint leaves them `null` by default and bring-up keeps the motors' stored values. When set, a gain is written to the motor's ROM at enable. Find values with [`tune.a4`](/cli/tune-a4). > > * `planner_accel` at `60000` works best with `cap_track`. Values in between would re-plan every target so the joint barely moves, and are refused. > * `cap_track` is sent to the realtime core, not written to the motor. > * `tf_rated_current_a` needs firmware with command 0x73 (VersionDate 2026042402 or later) and direct tracking (`planner_accel` `0`). Elsewhere the joint stays on plain 0xA4 and the core logs why. > [accordion] Stiction, dither and Stribeck terms > > These feed-forward terms target slow-motion stick-slip on geared joints. All are off by default. > > * **Stiction push.** The peak push is `stiction_gain × fc + stiction_load_gain × abs(gravity)`. It fades on measured velocity and is gone above about 0.05 rad/s, so it never drives the slip. Keep `stiction_gain` below the breakaway-to-`fc` ratio that [`tune.breakaway`](/cli/tune-breakaway) measures. > * **Dither.** Start `dither_nm` at 1 to 2 Nm on a shoulder. The dither is audible. > * **Stribeck cancellation.** The term is `stribeck_gain × (stribeck_dfs + stribeck_load_gain × abs(gravity)) × exp(−(v/stribeck_vs)²) × tanh(v/0.02)`, so it is zero at rest. Raise `stribeck_gain` from 0.5 toward 0.9, and stop when the arm's 3 Hz mode grows. > * **Stribeck pole.** `20` is smooth but lags a fast surge. `40` to `80` follows it more closely but adds encoder noise to the torque. > [accordion] Per-joint defaults > > Both arms share these. `kp` and `kd` are the values at stiffness `1` (the default), and the **soft** columns are what stiffness `0` blends toward. `shoulder_1` sets `kd_host_q` to 3, and every other joint leaves `kd_host_hz` and `kd_host_q` at `null`. No joint runs the Stribeck cancellation by default. > > | 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 | 2.25 | 0 | 0 | 0.65 | 25 | 1.5 | > | `wrist_3` | 130 | 2.0 | 0 | 0 | 0.75 | 25 | 0.9 | > > **Slow-motion gains.** A joint whose calibration includes its own slow-profile friction fit runs the stiffer set below. [`tune.factory`](/cli/tune-factory) writes that fit by default, and so does [`tune.friction --profile slow --save`](/cli/tune-friction). These gains oscillate on a joint that still uses the fallback friction, so an uncalibrated joint keeps the table above. > > | Joint | `kp` | `kd` | `kd_host` | `kd_host_hz` / `kd_host_q` | `stribeck_gain` / `stribeck_pole` | > | - | - | - | - | - | - | > | `shoulder_1` | 450 | 5.0 | 110 | 2.6 / 1.0 | 0.8 / 40 | > | `shoulder_2` | 500 | 5.0 | 70 | `null` / `null` | 0.8 / 40 | > | `elbow` | 200 | 5.0 | 10 | 1.6 / 1.5 | 0.8 / 40 | > > Gains saved in the joint's own calibration entry still override these, for example from `tune.pid --save` or the friction fit's `stribeck_gain`. > [accordion] Per-motor friction defaults > > Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on a reference robot with [`tune.friction`](/cli/tune-friction). A joint's slow-profile friction (`fl` and the Stribeck excess) comes only from its own calibration. There is no fallback for it, so calibrate each robot. > > | 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` | ## Teleop session How VR controller motion becomes arm motion while you intervene. | Flag | Default | Description | | - | - | - | | `\--teleop_config.vr_teleop_config.rest_pose_left` | `[−0.157, 0, 0, 0.314, 0, 0, −0.157]` | Left arm rest pose (rad, 7 joints). The arms start here and return here on reset. Edit it visually in the control panel's **Rest pose** tab. | | `\--teleop_config.vr_teleop_config.rest_pose_right` | `[0.157, 0, 0, −0.314, 0, 0, 0.157]` | Right arm rest pose. | | `\--teleop_config.vr_teleop_config.frequency` | `120` | Motor command rate (Hz). Data collection sets this from `teleop_hz`. | | `\--teleop_config.vr_teleop_config.ik_frequency` | `120` | How often VR poses are sent to the IK solver (Hz). The control loop interpolates between solutions. | | `\--teleop_config.vr_teleop_config.position_multiplier` | `1.0` | Scales hand movement. `2` moves the arm twice as far as your hand. Ignored in `absolute_mode`. | | `\--teleop_config.vr_teleop_config.rotation_multiplier` | `1.0` | Scales hand rotation the same way. Ignored in `absolute_mode`. | | `\--teleop_config.vr_teleop_config.hold_to_engage` | `false` | `false`: click both grips to engage, then click a grip to freeze or unfreeze that arm. `true`: each arm tracks only while you hold its own grip, from rest too, and freezes when you release it. | | `\--teleop_config.vr_teleop_config.park_to_zero` | `true` | On Stop / `Ctrl+C` the arms return to rest and then continue to the all-zero joint pose (hanging straight down), holding their grasp, before the motors are released. `false` stops the park at the rest pose. | | `\--teleop_config.vr_teleop_config.disengage_timeout` | `0.5` | Seconds without a VR frame before tracking disengages and the arms hold position. `0` disables. | | `\--teleop_config.vr_teleop_config.record` | `null` | Record every stage of the teleop pipeline to `~/.almond/recordings/_*.npz` for [`motion.build`](/cli/motion-build) and [`diag.offline`](/cli/diag-offline). A bare name like `rec1` goes in that folder; a path is used as-is. | | `\--teleop_config.vr_teleop_config.reset_speed` | `0.628` | Speed (rad/s) of the return-to-rest move. | | `\--teleop_config.vr_teleop_config.reset_min_duration` | `1.5` | Minimum duration (s) of a return-to-rest move. | | `\--teleop_config.vr_teleop_config.reset_rest_weight` | `50.0` | IK weight toward the rest pose when planning a return. | | `\--teleop_config.vr_teleop_config.reset_limit_weight` | `100.0` | IK weight against joint limits when planning a return. | | `\--teleop_config.vr_teleop_config.reset_collision_margin` | `0.025` | Minimum self-collision clearance (m) when planning a return. | | `\--teleop_config.vr_teleop_config.reset_collision_weight` | `100.0` | IK weight on self-collision when planning a return. | | `\--teleop_config.vr_teleop_config.reset_max_iterations` | `10` | IK iterations per return waypoint. | | `\--teleop_config.vr_teleop_config.reset_torque_threshold` | `6.0` | **Contact stop during return-to-rest**, in Nm of unexpected torque. If an arm hits something, the move stops and the arms go limp until you press reset. `0` disables (hardware only). | | `\--teleop_config.vr_teleop_config.teleop_torque_threshold` | `0` (off) | **Contact stop while tracking.** It works the same way and discards a running episode. The control panel sets it to `16` (hardware only). | | `\--teleop_config.vr_teleop_config.reset_gravity_comp_kd` | `0.25` | Damping (Nm·s/rad) of the limp hold after a contact stop. | | `\--teleop_config.vr_teleop_config.engage_max_vel` | `0.628` | Joint speed cap (rad/s) right after engaging, so the first move is gentle. | | `\--teleop_config.vr_teleop_config.engage_duration` | `1.0` | Seconds to ramp from `engage_max_vel` up to `teleop_max_vel`. | | `\--teleop_config.vr_teleop_config.teleop_max_vel` | `6.283` | Maximum joint speed (rad/s) while tracking. | | `\--teleop_config.vr_teleop_config.teleop_max_accel` | `9.42` | Maximum joint acceleration (rad/s²) while tracking. | | `\--teleop_config.vr_teleop_config.ik_alpha` | `0.3` | Smoothing on the IK output, `(0, 1]`. `1` is no smoothing; lower is smoother but adds lag. See [Latency tuning](/operations/teleop#latency-tuning). | | `\--teleop_config.vr_teleop_config.pose_cutoff` | `2.5` | Low-pass cutoff (Hz) on raw controller poses before IK. Lower rejects more hand tremor but adds lag. | | `\--teleop_config.vr_teleop_config.absolute_mode` | `false` | Mantis mapping: track controller poses 1:1 in a fixed world frame instead of relative to where you engaged. Forced `true` by `--mantis`. | | `\--teleop_config.vr_teleop_config.base_height` | `null` | In `absolute_mode`, fix the robot base this many metres above the VR floor instead of inferring it. Keeps datasets consistent across operators. | | `\--teleop_config.vr_teleop_config.tcp_transform_left` | `null` | *Mantis data collection.* Transform from tracker to gripper, `[x, y, z, qx, qy, qz, qw]`, for the left rig. It is read from the saved calibration, so set it only to override. See [`tracker`](/cli/tracker#transform-file). | | `\--teleop_config.vr_teleop_config.tcp_transform_right` | `null` | *Mantis data collection.* Same for the right rig. | | `\--teleop_config.vr_teleop_config.tracker_key` | `null` | *Mantis data collection, Quest.* Which saved calibration to use, e.g. `quest:oculus-touch-v3:grip`. Set from **Mantis settings** in the panel. | | `\--teleop_config.vr_teleop_config.quest_controller_profile` | `null` | *Mantis data collection, Quest.* Expected controller profile. Filled from `tracker_key`. | | `\--teleop_config.vr_teleop_config.quest_pose_space` | `null` | *Mantis data collection, Quest.* Expected pose datum, `grip` or `target-ray`. Filled from `tracker_key`. | | `\--teleop_config.vr_teleop_config.urdf_viewer_world_aligned` | `null` | *Mantis data collection.* Whether the pose source shares the viewer headset's floor. `null` means `true` for Quest, `false` for Lighthouse. | > [!NOTE] > > **Mantis mode** (`--mantis`) forces `absolute_mode: true`, `hold_to_engage: false`, `ik_alpha: 1.0`, `pose_cutoff: 5.0`, and removes the speed and acceleration limits. Your values for these keys are ignored in Mantis mode. ## Kinematics The IK solver that turns hand targets into joint angles. A higher weight means the solver cares more about that term. | Flag | Default | Description | | - | - | - | | `\--teleop_config.kinematics_config.pos_weight` | `50.0` | Weight on end-effector position error. | | `\--teleop_config.kinematics_config.ori_weight` | `10.0` | Weight on end-effector orientation error. | | `\--teleop_config.kinematics_config.elbow_weight` | `0` (off) | Weight on the headset's elbow-position hint. Off by default because the hint is unreliable on hardware. | | `\--teleop_config.kinematics_config.rest_weight` | `15.0` | Damping toward the current pose. Higher is steadier, lower tracks faster. | | `\--teleop_config.kinematics_config.posture_weight` | `5.0` | Pull toward the home posture, preventing slow drift. | | `\--teleop_config.kinematics_config.manipulability_weight` | `0.05` | Keeps the arm away from singular poses. Forced `0` in Mantis mode. | | `\--teleop_config.kinematics_config.limit_weight` | `75.0` | Penalty on joint-limit violations. | | `\--teleop_config.kinematics_config.self_collision_margin` | `0.025` | Distance (m) at which self-collision avoidance starts. Keep below the arm–torso clearance of normal poses. | | `\--teleop_config.kinematics_config.self_collision_weight` | `150.0` | Weight on self-collision avoidance. | | `\--teleop_config.kinematics_config.max_iterations` | `8` | Solver iterations per IK call. | | `\--teleop_config.kinematics_config.cost_tolerance` | `1e-4` | Convergence tolerance. Keep small. | | `\--teleop_config.kinematics_config.lambda_initial` | `1e-2` | Initial Levenberg–Marquardt damping. | | `\--teleop_config.kinematics_config.lambda_factor` | `10.0` | Damping multiplier after a rejected solver step. | | `\--teleop_config.kinematics_config.max_joint_delta` | `0.0346` | Largest joint change (rad) per IK call. Raise for faster tracking, lower for gentler motion. | | `\--teleop_config.kinematics_config.max_reach` | `0.82` | Maximum shoulder-to-target distance (m). Targets beyond it are pulled in. | | `\--teleop_config.kinematics_config.reach_soft_start` | `0.78` | Distance (m) at which the reach limit starts to act. | | `\--teleop_config.kinematics_config.manip_damping_threshold` | `0.015` | Below this manipulability, extra damping starts (near full extension). | | `\--teleop_config.kinematics_config.manip_damping_boost` | `60.0` | Extra damping at zero manipulability. `0` disables. | | `\--teleop_config.kinematics_config.limit_damping_margin` | `0.12` | Distance (rad) from a joint limit inside which the joint is damped while moving toward it. | | `\--teleop_config.kinematics_config.elbow_fade_band` | `0.15` | Height (m) above the shoulder over which the elbow hint fades out. | | `\--teleop_config.kinematics_config.robot_model` | `None` | Axol version to solve for: `classic`, `standalone`, `ox_cart`, `owl` or `mobile` (Axol on Jelly). It sets the joint limits and the body the arms are kept clear of, and `None` picks `mobile` when Jelly is enabled, else `mount`. | | `\--teleop_config.kinematics_config.mount` | `None` | What Axol is mounted on when Jelly isn't enabled: `classic` (Legacy), `standalone`, `ox_cart` or `owl`, as picked under **Mount** in the control panel. `None` reads `kinematics.mount` from the shared settings, or Legacy if it is unset. | | `\--teleop_config.kinematics_config.gripper` | `None` | Fitted gripper, `parallel` or `parcel`. Teleop sets it from `--axol.gripper`, and only Axol on Jelly uses it to pick a model. `None` reads `axol.gripper` from the shared settings. | > [!NOTE] > > **Mantis mode** replaces any of these still at their default with `pos_weight 200`, `ori_weight 120`, `manipulability_weight 0`, `self_collision_margin 0.02`, `max_joint_delta 0.05`, `max_iterations 12`. A value you set explicitly still wins. ## VR server The connection the headset streams poses over. | Flag | Default | Description | | - | - | - | | `\--teleop_config.vr_server_config.port` | `8000` | Port the headset connects to. [Quest-over-USB](/guides/quest-over-usb) uses the same port. | | `\--teleop_config.vr_server_config.certfile` | `null` | TLS certificate. `null` uses the auto-generated one in `~/.almond/vr/certs/`. | | `\--teleop_config.vr_server_config.keyfile` | `null` | TLS private key. `null` as above. | | `\--teleop_config.vr_server_config.interp_enabled` | `true` | Smooth out jittery or batched pose arrivals. `false` uses the latest raw frame. | | `\--teleop_config.vr_server_config.interp_min_delay_s` | `0` | Minimum playout delay (s). | | `\--teleop_config.vr_server_config.interp_max_delay_s` | `0.15` | Maximum playout delay (s) spent absorbing network jitter. | | `\--teleop_config.vr_server_config.interp_smooth_window_s` | `0.12` | Smoothing window (s). Adds about half of it as latency. `0` disables. See [Latency tuning](/operations/teleop#latency-tuning). | | `\--teleop_config.vr_server_config.interp_outlier_k` | `4.0` | Glitch-rejection threshold. Lower is more aggressive; `≤ 0` disables. | | `\--teleop_config.vr_server_config.interp_max_lag_s` | `0.5` | Pose frames arriving more than this (s) later than normal are skipped, so the arms hold through a network stall instead of replaying it late. `≤ 0` disables. | | `\--teleop_config.vr_server_config.pose_source_kind` | `null` | Which pose source may drive: `webxr` (Quest), `tracker` (Lighthouse), or `null` for whichever connects first. Set automatically for Mantis. | | `\--teleop_config.vr_server_config.expected_pose_source_id` | `null` | *Mantis data collection.* Exact pose-source ID accepted. Set automatically. | ## Jelly Jelly Mobile, the optional powered base. You drive it from the headset thumbsticks between episodes. Jelly motion is never recorded. Jelly is detected from the CAN devices present, so you never enable it by hand. | Flag | Default | Description | | - | - | - | | `\--teleop_config.jelly.wheels` | `true` | Drive the wheels with the thumbsticks when their CAN interface is attached. `false` leaves attached wheels off. | | `\--teleop_config.jelly.channel` | `can_alm_axol_b` | CAN interface of the wheel motors. `null` means lift only. | | `\--teleop_config.jelly.max_speed` | `20.0` | Peak wheel speed (rad/s) at full stick. | | `\--teleop_config.jelly.turn_scale` | `1.0` | Rotation speed relative to driving speed, `[0, 1]`. | | `\--teleop_config.jelly.slew` | `0.25` | Acceleration ramp, the same both ways. The default takes 4 s from rest to full speed, and as long to stop from it. | | `\--teleop_config.jelly.axis_snap_deg` | `15.0` | Stick directions within this many degrees of straight or sideways snap to exact. `0` disables. | | `\--teleop_config.jelly.deadzone` | `0.15` | Thumbstick deadzone, as a fraction of full deflection. | | `\--teleop_config.jelly.stick_expo` | `0.6` | Thumbstick response curve, `[0, 1]`. `0` is linear; higher keeps more of the stick's travel for slow, fine moves, with full deflection still full speed. At `0.6`, half the travel gives \~28% speed (linear: 50%). | | `\--teleop_config.jelly.imu` | `false` | Use the board IMU to hold a straight heading. | | `\--teleop_config.jelly.yaw_hold_gain` | `2.0` | Heading-hold strength. `0` disables. | | `\--teleop_config.jelly.yaw_hold_max` | `0.3` | Maximum heading-hold correction. | | `\--teleop_config.jelly.yaw_log` | `false` | Log heading-hold data at 10 Hz, for diagnosing drift. | | `\--teleop_config.jelly.hold_kp` | `60.0` | Stiffness (Nm/rad) holding parked wheels in place. `0` only brakes them. | | `\--teleop_config.jelly.hold_kd` | `1.5` | How strongly parked wheels resist rolling (Nm·s/rad), up to `5`. `0` leaves them idle. | | `\--teleop_config.jelly.frequency` | `50.0` | Wheel command rate (Hz). | | `\--teleop_config.jelly.command_timeout` | `0.2` | Seconds without a stick command before Jelly stops. | | `\--teleop_config.jelly.can_timeout_ms` | `200.0` | Motor-side loss-of-comms timeout (ms). Stops the wheels even if the host hangs. | | `\--teleop_config.jelly.lift` | `true` | Run the lift when its CAN bus is attached (right thumbstick, forward and back). `false` leaves an attached lift off. | | `\--teleop_config.jelly.lift_channel` | `null` (auto) | CAN interface of the lift controller. `null` uses the chest bus `can_alm_axol_c` if it exists, otherwise the wheel bus `can_alm_axol_b`. | | `\--teleop_config.jelly.lift_speed` | `650` | Lift speed (encoder counts/s). | ## Teleoperator | Flag | Default | Description | | - | - | - | | `--teleop_config.has_gripper` | `true` | Set automatically from `--robot_config.axol_config.has_gripper`. | | `--teleop_config.vr_teleop_config.gripper` | `parallel` | Set automatically from `--robot_config.axol_config.gripper`. Box mode is available only with `parcel`. | | `--teleop_config.id` | `null` | Used by LeRobot only. Axol ignores it. | | `--teleop_config.calibration_dir` | `null` | Used by LeRobot only. Axol ignores it. | # Data Collection Source: https://docs.almond.bot/operations/data-collection Record teleoperation episodes with camera video to a LeRobot dataset for training. Data collection records teleoperation episodes and camera video into a [LeRobot](/api/lerobot) dataset you can train on. Start it from the web control panel or with `axol collect-data`. * **Axol** records joint positions by default. Turn on **Observe Cartesian** to record gripper poses instead. * **Mantis** records gripper poses from Quest or Lighthouse tracking. Run it on the computer that is wired to the hardware and has the ZED cameras attached, usually a ZED Box or Jetson. Images and actions then share one clock. ## Before you start * Install Axol with the [one-command install](/installation) and connect the device you selected. * For **Axol**, connect the robot. * For **Mantis**, finish its [hardware](/mantis/hardware) and [pose source](/mantis/tracking) setup. **Mantis settings → Tracking** must show setup complete, with an approved tracker-to-gripper transform for both sides. * Connect at least one ZED camera over GMSL. Assign it to a slot with **Record** turned on. * Axol uses the overhead, left arm and right arm slots. * Mantis uses separate Head, Left Mantis and Right Mantis slots. * Both can record the stereo head camera and both wrist cameras together. * For Axol, and for Mantis with the Quest source, have a Meta Quest with the [TLS certificate authorized](/operations/teleop#authorize-the-tls-certificate). Mantis with Lighthouse needs no headset. > [!TIP] > > To list the connected cameras and their serial numbers, run: > > ```bash theme={null} > python -c "from almond_axol.zed import list_zed_devices; print(list_zed_devices())" > ``` > > If a camera plugged in after boot doesn't show up, press **Restart camera service** under **Axol settings → Cameras** or **Mantis settings → Cameras**. On the CLI, run `sudo systemctl restart zed_x_daemon`. ## Run it > [tab] Axol > > **1. Connect the robot and assign cameras** > > Connect the **Host Computer** and, with **Axol** selected, the robot. Open **Axol settings → Cameras** and assign each camera to the overhead, left arm or right arm slot. Turn on **Record** for at least one. Axol detects stereo ZED X cameras automatically. See [Cameras](/guides/control-panel#cameras). > > **2. Select Collect data and fill in the fields** > > Pick **Collect data** and fill in: > > * **Repo ID**: type a new name such as `myorg/pick-place`, or pick an existing dataset from the list to add to it. The list shows each dataset's episode count. > * **Task**: a description of the task. > > Recording rate, teleoperation rate, stiffness and upload settings are in the [Settings](/guides/control-panel#settings) tabs. > > **3. Start and record from the headset** > > Press **Start**, connect the headset and drive the arms. Record with the controllers, as described in [Recording an episode](#recording-an-episode). The panel shows the camera feeds and episode state, and has buttons for the same actions. See [Driving from the panel](#driving-from-the-panel). > > **From the CLI**, on the Host Computer: > > ```bash theme={null} > axol collect-data \ > --repo_id myorg/pick-place \ > --task "Pick the red cube and place it in the bin" \ > --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" > ``` > > Replace the serial numbers with your cameras'. Assign at least one slot. Slots you leave out aren't recorded, so `--robot_config.cameras "{overhead: {serial: 41234567}}"` records the overhead camera only. > > The `cameras` value is one inline YAML dictionary. See [Command configuration](/cli/configuration#field-name-conventions). > > Axol detects stereo ZED X cameras from their serial number: > > * A stereo **overhead** camera records both eyes, as `overhead_left` and `overhead_right`. > * A stereo **wrist** camera records its left eye under the slot name, like a mono camera. > > To override the detection, set `stereo: true` and choose the eyes: > > * `eyes: both` records `X_left` and `X_right`. > * `eyes: left` or `eyes: right` records one eye under the slot name `X`. A forced stereo wrist camera needs `eyes: left` to stay single-eye. > > For example, to force a stereo overhead camera: > > ```bash theme={null} > --robot_config.cameras "{overhead: {serial: 41234567, stereo: true}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" > ``` > > Connect the headset and record from the controllers. See [Recording an episode](#recording-an-episode). Press `Ctrl+C` to finish. See [`collect-data`](/cli/collect-data) for every field, including `--fps`, `--teleop_hz`, stiffness and `--push_to_hub`. > [tab] Mantis > > Before you record training data, pass the [Mantis tracking acceptance](/mantis/tracking#acceptance) with the same pose source. Collection refuses to start with a missing or unapproved tracker-to-gripper transform. The built-in VIVE factory transforms count as approved. > > **1. Select Mantis and check its settings** > > Press **Use for operations** on the **Mantis** card and let it connect. Press **Open settings** on the card to open **Mantis settings**, then check: > > * **Tracking**: the pose source's setup is complete. See [Mantis Tracking](/mantis/tracking). > * **CAN**: the two channels are different. > * **Triggers**: the [trigger endpoints](/mantis/hardware#testing-the-triggers-and-grippers) are checked. > * **Cameras**: at least one **Head**, **Left Mantis** or **Right Mantis** camera has **Record** on. For stereo head video, turn on both **L** and **R** under **Record**. > > **2. Select Collect data and fill in the fields** > > Pick **Collect data** and fill in **Repo ID** and **Task** as for Axol. **Start** stays unavailable until the pose source, both transforms, the Mantis link and the cameras are ready. The **Before you start** list names what is missing. > > `mantis_allow_uncalibrated` is only for a calibration capture that won't be used for training. > > **3. Start and bring up the pose source** > > Press **Start**. > > * **Quest**: open [axol.almond.bot](https://axol.almond.bot) and enter VR. Left and right come from the controllers. > * **Lighthouse**: power on both trackers inside the tracked area. Wait until both trackers report a pose and both triggers report in. No headset is needed. > > **4. Record with the source's controls** > > > [tab] Quest > > > > Hold the rigs at the start pose and release both controller grips. Press both grips to align and engage. Then record with **A** and **X** as on Axol (see [Recording an episode](#recording-an-episode)), or with the panel's episode buttons. > > > [tab] Lighthouse > > > > Hold the rigs where the take should begin. **Squeeze both rig triggers together, then release both.** This aligns the rigs to the robot, engages tracking and starts the take. The grippers are powered only during a take. > > > > While recording, fully squeeze and release either trigger quickly: > > > > * **Three times** to end and save the take. > > * **Four times** to end and discard it, like the panel's **Discard episode**. > > > > After three squeezes, Axol waits a moment in case a fourth follows. The saved take ends where the first squeeze began, so the gesture doesn't appear in the data. Squeezing three times while idle does nothing. The panel's **Start recording** needs an engaged rig. > > > > The side button on either rig does the same with one thumb, and the grippers stay where they are: > > > > | Press | When idle | While recording | > > | - | - | - | > > | Short press | Align, engage and start a take, like the start gesture | End and save the take | > > | Hold for 1 second | Nothing | End and discard the take | > > > > A saved take ends where the button press began. > > **5. Re-record after any tracking break** > > If a tracker loses its pose, a trigger stops reporting or tracking disengages, the rig freezes and the take fails its quality check. The panel shows why the take wasn't saved. See [Driving from the panel](#driving-from-the-panel). > > After every take, tracking disengages and the grippers turn off. To start the next take, restore both sides if needed, then repeat the start gesture wherever the rigs are. Nothing resumes automatically. > > **From the CLI**, `collect-data` starts the tracker bridge and trigger readers itself. Without `--mantis_source`, it uses the source saved in the settings. > > ```bash theme={null} > axol collect-data --mantis true --mantis_source lighthouse \ > --repo_id myorg/mantis-pick --task "Pick the part" \ > --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" > ``` > > The `overhead` slot is the head camera. It records both stereo eyes as `overhead_left` and `overhead_right`. Leave out any slots you don't use. > > Set the source to `quest` for Quest tracking. Don't start a second `tracker.bridge`. See [`collect-data`](/cli/collect-data) and the [tracker reference](/cli/tracker). ## Quest controller layout With Axol, and with Mantis on the Quest source, you record from the Quest controllers. The arm controls are the same as in [teleoperation](/operations/teleop). Data collection adds the **A** button for recording. The control panel can take the same actions. See [Driving from the panel](#driving-from-the-panel). ![Quest controller diagram](https://mintcdn.com/almondbot/QoFJerlOUFU8RmP8/assets/quest.png?fit=max\&auto=format\&n=QoFJerlOUFU8RmP8\&q=85\&s=5e7d85aeb3afa2639107ac9ebc6bdd8f) | # | Button | Action | | - | - | - | | 1 | Left grip | Press both grips together to **engage**. After that, each grip freezes or resumes the arm on its side. With **Hold grips to engage** on, hold a grip to move that arm. | | 2 | Right grip | Same as the left grip. | | 3 | Left trigger | Close the left gripper. While disengaged, point at a camera screen and hold to **move** it. Use both triggers on one screen to **resize** it. | | 4 | Right trigger | Close the right gripper. While disengaged, moves and resizes camera screens like the left trigger. | | 5 | X | **Reset** the arms to the rest pose, including out of a contact hold. Cancels the countdown. During a take, asks **Discard episode?** | | 6 | A | **Record**: start a take after a 3-second countdown. During a take, asks **Save episode?** | | 7 | Y | **Exit** the VR session. | | | Right **B** | **Reset the camera screens** to where you are looking. See [Camera views](/guides/vr-interface#camera-views). | | | Thumbsticks | **Drive [Jelly](/guides/vr-interface#jelly)** between takes, on Axol on Jelly. To record the lift and wheels, see [Record Jelly](#record-jelly). | The camera feeds are shown in the headset, so you can line up takes from the robot's view. ## Recording an episode **1. Drive to the start pose** Put on the headset, engage tracking and drive the arms to where the take should begin. **2. Start a take** Press **A**. Recording starts after a 3-second countdown. Press **A** again or **X** to cancel the countdown. **3. End the take** The first press asks for confirmation in the headset, so a stray press never loses a take. * Press **A** for **Save episode?** Press **A** again to save, or **X** to keep recording. * Press **X** for **Discard episode?** Press **X** again to discard and re-record, or **A** to keep recording. After you confirm a save, the headset shows **Saving** and only **Y** works until the episode is written. **4. Let the arms return to rest** After each take, the arms return to the rest pose on their own. The move is guarded: if an arm meets resistance, such as a gripper caught on a handle or a person, the move stops. 1. The arms go limp in a **gravity-compensation hold**. The episode keeps saving. 2. Guide the arms clear by hand. 3. Press **X** to plan a new return from where they are. You can't record while the arms are limp. Pressing **A** reminds you to reset first. The grips don't engage tracking until the arms are home and the episode is saved or discarded. Then release both grips and squeeze both again. A grip held through the save doesn't count. The HUD shows **Episode N** at the top right: the number of the episode you are about to record, counting from 1. | Headset state | Meaning | | - | - | | `Data collection` | Driving the arms, ready to record | | `Recording` | Recording frames to the dataset | | `Saving` | Writing the episode to disk. Controls are blocked. | If `--root` already holds the dataset, collection adds to it. If you stop a new session before saving any episode, Axol deletes the empty dataset. ### Contact stops Every return to rest is guarded, including the **X** reset and the first move at startup. Set the sensitivity with **Return-to-rest contact stop** in **Axol settings → Robot** (`--teleop_config.vr_teleop_config.reset_torque_threshold`). Raise it if normal returns stop for no reason. Set `0` to turn it off. You can also stop the arms when they push hard during a take. This check is off by default, because recording often pushes on the scene on purpose. Set **Teleop contact stop** in **Axol settings → Robot** (`--teleop_config.vr_teleop_config.teleop_torque_threshold`). The panel suggests `16` Nm. When it trips, tracking disengages, the take is discarded and the arms go limp. Guide them clear, then press **X** and record again. [Teleoperation](/operations/teleop) uses the same settings. These stops apply to Axol's arms. Mantis has no arms to return home. Each Mantis take starts with the source's [start gesture](/mantis/tracking#start-gesture-and-recovery), and the grippers are off between takes. ## Driving from the panel When you start from the [control panel](/guides/control-panel), it also works as an operator display. It shows the camera feeds the headset receives, with a full-screen option. The **Episode control** box shows the phase, the episode number and the saved count, with these buttons: * **Start recording** starts the same 3-second countdown as the headset. Click it again to cancel. * **Save episode** and **Discard episode** ask you to click again to confirm. * **Return to rest** appears during a contact hold. It does the same as **X**. The controllers keep working. Whichever input arrives first ends the take. Anything you start on the controllers, such as a confirmation or a countdown, also shows in the panel. See [Episode controls](/guides/control-panel#episode-controls). When a take ends without being saved, the **Episode control** box shows the reason in red, and the log shows it too. The message stays until the next take starts recording. A take isn't saved when: * the Mantis quality check rejects it, * a camera fails during capture, * it ends before its first frame is recorded, or * the recorder refuses it at save. ## Saved data * **Each episode is on disk as soon as it is saved.** If the recorder stops unexpectedly, you lose at most the take being written. * **Resuming checks the dataset.** If the saved episodes have a gap, Axol keeps the complete episodes before the gap, removes the rest and continues from there. If no complete episode is left, it asks you to delete the dataset. * **Takes with dropped video frames are discarded.** If the camera encoder drops frames under heavy load, the video doesn't match the recorded rows. Axol discards that take and logs why. The session keeps running, so record the take again. See the [VR Interface](/guides/vr-interface) guide for every controller binding and headset state. ## Record Jelly On Axol on Jelly, turn on **Record Jelly** in the **Recording** settings to also record the lift and the wheels (`--record_jelly true` on the command line). It is off by default. Each frame then has an `observation.jelly` column next to `observation.state`: | Name | Value | | - | - | | `jelly_lift.pos` | Lift height as a fraction of its travel. `0` is fully lowered and `1` is fully raised. | | `jelly_wheel_1.pos` to `jelly_wheel_4.pos` | Angle of each wheel in radians since the episode started. Each episode starts at `0`. Wheel 1 is front-left, 2 front-right, 3 back-left and 4 back-right. | `observation.state` doesn't change, so a policy trained on the arms alone still runs with [Run Policy](/operations/run-policy). The session won't start unless Jelly's wheels and lift are both on and reporting. If the lift has never been homed, run **Home the lift** first. Keep the setting the same for every session that adds to one dataset. ## Upload to the HuggingFace Hub Turn on **Push to HuggingFace Hub** to upload the dataset when the session ends. The upload runs only if the session saved at least one episode. It uploads the whole dataset, including episodes from earlier sessions. Log in to HuggingFace on the robot first. Run this as the user who installed Axol, and use a token with write access: ```bash theme={null} /opt/axol/uv/tools/almond-axol/bin/hf auth login ``` If `hf` is on your `PATH`, `hf auth login` works too. The session checks the login when it starts. If the login is missing, rejected or read-only, the session stops and the error says what to fix. ## Mix Axol and Mantis episodes Axol and Mantis episodes can go in one dataset. For each Axol run: * Turn on **Observe Cartesian**, so the recorded state and actions match Mantis. * Keep the gripper setting, camera slots, image resolution and recording rate the same as the Mantis runs. A dataset started on Mantis may have an `observation.pose_lag` column, which Axol fills in automatically. A dataset started on Axol without that column keeps its layout, and Mantis leaves the column out. ## Next steps > [card] [Config Parameters](/operations/data-collection-config) > > Every setting for data collection, with its default. > [card] [Run Policy](/operations/run-policy) > > Run a trained policy on the same computer. > [card] [collect-data reference](/cli/collect-data) > > Every flag for data collection. # Data Collection Config Parameters Source: https://docs.almond.bot/operations/data-collection-config Every setting for axol collect-data, what it does and its default. Every setting for `axol collect-data`. 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. The [shared settings file](/guides/control-panel-settings) (`~/.almond/settings.json`) is read by default. It stores these flags in the sections below, without this command's prefixes. | Flag | Section in the settings file | | - | - | | `robot_config.axol_config.*` | `axol` | | `robot_config.left_channel`, `robot_config.right_channel` | `robot` | | Other `robot_config.*` fields | `lerobot` | | `teleop_config.vr_teleop_config.*` | `teleop` | | `teleop_config.kinematics_config.*` | `kinematics` | | `teleop_config.vr_server_config.*` | `vr_server` | | `teleop_config.jelly.*` | `jelly` | | `fps`, `root`, `vcodec`, `push_to_hub`, `record_jelly`, `rerun_*` | `recording` | ```bash theme={null} axol collect-data --repo_id myorg/pick --task "pick up the cup" \ --robot_config.axol_config.left_stiffness 0.8 \ --teleop_config.vr_teleop_config.position_multiplier 1.5 ``` > [!WARNING] > > Use the **same** stiffness, gripper torque, `observe_torques`, `observe_cartesian`, `fps` and cameras here and in [Run Policy](/operations/run-policy-config). A policy only works with the settings it was trained on. ## Recording | Flag | Default | Description | | - | - | - | | `--repo_id` | required | Dataset ID, `/`. | | `--task` | required | Task description stored with every frame. | | `--fps` | `30` | Recording rate. Cameras capture at 60 and drop frames to match. `60` doubles the recording load on a Jetson. | | `--teleop_hz` | `120` | Motor command rate (Hz) while teleoperating, independent of `fps`. | | `--dataset_resolution` | `SVGA` | Resolution of the recorded video: `SVGA`, `HD1080` or `HD1200`. The headset stream keeps the capture resolution. | | `--vcodec` | per platform | Dataset video codec: `h264` on Jetson, `auto` elsewhere. | | `--root` | `null` | Local dataset directory. Default is the LeRobot cache, `~/.cache/huggingface/lerobot`. | | `--push_to_hub` | `false` | Upload the dataset to the HuggingFace Hub when done. Log in first. See [Upload to the HuggingFace Hub](/operations/data-collection#upload-to-the-huggingface-hub). | | `--record_jelly` | `false` | Also record Jelly's lift height and wheel positions, as the `observation.jelly` column. Needs Axol on Jelly with its wheels and lift on. See [Record Jelly](/operations/data-collection#record-jelly). | | `--qa_gate` | `true` | Don't save Mantis episodes that fail the quality check. `false` saves them anyway, except takes with a tracking fault under the [strict Lighthouse policy](/cli/tracker#lighthouse-tracking-policy). | | `--rerun_ip` | `null` (off) | Stream live visualisation to a [Rerun](https://rerun.io) viewer at this address. | | `--rerun_port` | `9876` | Rerun viewer port. | | `--log_level` | `INFO` | `DEBUG`, `INFO`, `WARNING`, or `ERROR`. | | `--config_path` | none | Load a JSON or YAML config file. Flags override it. | | `--settings_path` / `--no_settings` | `~/.almond/settings.json` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. The config file and flags override it. | ## Mantis Only used with `--mantis`. | Flag | Default | Description | | - | - | - | | `--mantis` | `false` | Record with the Mantis rigs instead of the robot: tracked gripper poses plus head and wrist cameras. | | `--mantis_source` | `lighthouse` | Pose source: `quest` or `lighthouse`. Defaults to the source chosen in **Mantis settings → Tracking**. | | `--mantis_allow_uncalibrated` | `false` | Record without a tracker-to-gripper calibration. For bring-up only. Don't train on the result. | | `--mantis_smooth_hz` | `10.0` | Smooths the recorded poses when the take is saved (cutoff in Hz). `0` turns it off. | ## Robot CAN buses, cameras and what goes into observations. | Flag | Default | Description | | - | - | - | | `\--robot_config.left_channel` | `can_alm_axol_l` | CAN interface for the left arm. | | `\--robot_config.right_channel` | `can_alm_axol_r` | CAN interface for the right arm. | | `\--robot_config.cameras` | 3 unassigned slots | Camera slots `overhead`, `left_arm` and `right_arm`, passed inline: `--robot_config.cameras "{overhead: {serial: 41234567}}"`. Slots left at serial `0` are dropped. | | `\--robot_config.video_backend` | `auto` | Camera backend: `gst` (GPU pipeline, low latency), `sdk` (ZED SDK), or `auto` (prefers `gst`). Must match between collection and inference. | | `\--robot_config.observe_torques` | `false` | Include joint torques in observations. Must match between collection and inference. | | `\--robot_config.observe_cartesian` | `false` | Use end-effector poses instead of joint angles for observations and actions. Must match between collection and inference. | | `\--robot_config.id` | `null` | LeRobot bookkeeping, unused by Axol. | | `\--robot_config.calibration_dir` | `null` | LeRobot bookkeeping, unused by Axol. | ### Cameras One ZED camera per slot: `overhead`, `left_arm`, `right_arm`. Flags are shown for `overhead`; swap in the other slot names. Stereo ZED X cameras are detected from their serial. The [control panel's Cameras tab](/guides/control-panel#cameras) edits all of this visually. | Flag | Default | Description | | - | - | - | | `\--robot_config.cameras.overhead.serial` | `0` (unassigned) | Serial number of the ZED camera. `0` leaves the slot unused. | | `\--robot_config.cameras.overhead.fps` | `60` | Capture rate. Raised automatically if the recording `fps` is higher. | | `\--robot_config.cameras.overhead.width` | `960` | Capture width. With `height`, must be a ZED resolution: `SVGA` 960×600, `HD1080` 1920×1080, `HD1200` 1920×1200. | | `\--robot_config.cameras.overhead.height` | `600` | Capture height. | | `\--robot_config.cameras.overhead.color_mode` | `RGB` | `RGB` or `BGR`. | | `\--robot_config.cameras.overhead.warmup_s` | `1` | Seconds of frames discarded on connect. | | `\--robot_config.cameras.overhead.stereo` | `false` (auto) | Force stereo on or off instead of detecting it from the serial. | | `\--robot_config.cameras.overhead.eyes` | `both` | Which eye(s) to **record**: `both` (`overhead_left` + `overhead_right`), `left`, or `right`. | | `\--robot_config.cameras.overhead.stream_eyes` | `null` | Which eye(s) to **stream** to the headset. `null` follows `eyes`. Not used by run-policy. | | `\--robot_config.cameras.overhead.record` | `true` | Write this camera to the dataset. | | `\--robot_config.cameras.overhead.stream` | `true` | Show this camera in the headset. Not used by run-policy. | ### Arm gains Arm stiffness, gripper limits and per-joint gains. | Flag | Default | Description | | - | - | - | | `\--robot_config.axol_config.left_stiffness` | `1.0` | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). One number sets every joint, and a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. | | `\--robot_config.axol_config.right_stiffness` | `1.0` | Same, for the right arm. | | `\--robot_config.axol_config.has_gripper` | `true` | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8. | | `\--robot_config.axol_config.gripper` | `parallel` | Which gripper is fitted: `parallel` (the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Box mode works only with `parcel`. | | `\--robot_config.axol_config.max_step_rad` | `0.5` | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables. | | `\--robot_config.axol_config.controller` | `impedance` | Control law for the arms. `impedance` is compliant and runs at 240 Hz, and `position` hands each joint to its motor's own position loop at 400 Hz (see the notes below). | | `\--robot_config.axol_config.impedance_hz` | `240.0` | Command rate (Hz) of the MyActuator impedance joints: `240.0` or the experimental `480.0`. The gains were tuned at 240 Hz. | | `\--robot_config.axol_config.wrist_thermal.enabled` | `true` | Lower a wrist's torque while it cools down when `wrist_2` or `wrist_3` gets hot. See the notes below. `false` turns it off. | | `\--robot_config.axol_config.wrist_thermal.coil_limit_c` | `75.0` | Motor coil temperature (°C) at which the wrist's torque starts to come down. The motor turns itself off at 100 °C. | | `\--robot_config.axol_config.wrist_thermal.coil_resume_c` | `65.0` | Coil temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.driver_limit_c` | `105.0` | Motor driver temperature (°C) at which the torque starts to come down. The driver turns itself off at 120 °C. | | `\--robot_config.axol_config.wrist_thermal.driver_resume_c` | `95.0` | Driver temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.cool_torque_nm` | `1.5` | Torque (Nm) the wrist is held to while it cools. The motor is rated for 3.5 Nm continuous. | | `\--robot_config.axol_config.wrist_thermal.ramp_s` | `0.25` | Seconds over which the torque comes down, and later comes back. | | `\--robot_config.axol_config.left.gripper.torque_limit` | `0.5` | Grip force: peak gripper torque (Nm), at most `5`. | | `\--robot_config.axol_config.left.gripper.max_speed` | `10.0` | Maximum gripper speed (rad/s). | | `\--robot_config.axol_config.left.elbow.kp` | per joint | Position stiffness of one joint at stiffness `1`, in `[0, 500]`. | | `\--robot_config.axol_config.left.elbow.kd` | per joint | Velocity damping in the motor firmware, in `[0, 5]`. | | `\--robot_config.axol_config.left.elbow.kd_host` | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. `0` on joints whose firmware damping is enough. | | `\--robot_config.axol_config.left.elbow.kd_host_hz` | `null` | Centre frequency (Hz) of the band the host damping acts in. `null` follows the arm's pose. | | `\--robot_config.axol_config.left.elbow.kd_host_q` | `null` | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`. | | `\--robot_config.axol_config.left.elbow.j_eff` | per joint | Effective inertia (kg·m²) used for acceleration feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_gain` | `0.0` | Push toward the target while the joint is stuck, as a fraction of `friction.fc`. It fades out once the joint slides, and `0` turns it off. | | `\--robot_config.axol_config.left.elbow.stiction_load_gain` | `0.0` | Part of that push that grows with load, in Nm per Nm of the joint's gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_err_deg` | `0.1` | Position error (degrees) at which that push reaches full strength. | | `\--robot_config.axol_config.left.elbow.dither_nm` | `0.0` | Peak amplitude (Nm) of a sinusoidal torque dither that keeps a geared joint from sticking. `0` is off. | | `\--robot_config.axol_config.left.elbow.dither_hz` | `60.0` | Dither frequency (Hz). Keep it above the arm's structural modes (about 35 Hz) and below the core's 120 Hz Nyquist limit. | | `\--robot_config.axol_config.left.elbow.stribeck_gain` | `0.0` | Friction cancellation based on measured velocity, as a fraction of the measured static-minus-sliding friction excess. `0` is off. | | `\--robot_config.axol_config.left.elbow.stribeck_dfs` | `0.3` | Static-minus-sliding friction excess (Nm) at zero gravity load. | | `\--robot_config.axol_config.left.elbow.stribeck_load_gain` | `0.1` | Growth of that excess per Nm of gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stribeck_vs` | `0.1` | Speed (rad/s) at which the excess has fallen to 1/e. | | `\--robot_config.axol_config.left.elbow.stribeck_pole` | `20.0` | Low-pass pole (rad/s) on the measured velocity the term uses. Higher values follow fast changes better but add encoder noise to the torque. | | `\--robot_config.axol_config.left.elbow.wire_mode` | `mit` | How the core commands the joint while tracking: `mit` (impedance), `a4` (a MyActuator joint's own position loop) or `pv` (a Damiao wrist's position-velocity mode). | | `\--robot_config.axol_config.left.elbow.mass` | 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). | | `\--robot_config.axol_config.left.elbow.com` | per joint | Centre of mass `[x, y, z]` (m) of the link. | | `\--robot_config.axol_config.left.elbow.friction.fc` | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction). | | `\--robot_config.axol_config.left.elbow.friction.k` | per motor | Friction curve sharpness. | | `\--robot_config.axol_config.left.elbow.friction.fv` | per motor | Viscous friction (Nm·s/rad). | | `\--robot_config.axol_config.left.elbow.friction.fo` | per motor | Constant torque offset (Nm). | | `\--robot_config.axol_config.left.elbow.friction.fl` | `0.0` | Coulomb friction that grows with load, in Nm per Nm of gravity feed-forward. The effective `fc` is `fc + fl × abs(gravity)`, and `0` keeps `fc` constant. | | `\--robot_config.axol_config.left.elbow.firmware.position_kp` | `null` | Proportional gain of the firmware position loop (MyActuator 0x30 index 0x07, Damiao register KP\_APR). `null` keeps the motor's stored value. | | `\--robot_config.axol_config.left.elbow.firmware.position_ki` | `null` | Integral gain of the firmware position loop. Leave it at the stock `0`, because together with the speed integrator it hunts around the target. | | `\--robot_config.axol_config.left.elbow.firmware.position_kd` | `null` | Derivative gain of the firmware position loop (protocol V4.2 and later). The 0xA4 loop on the X8-P20 doesn't respond to it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_kp` | `null` | Proportional gain of the firmware speed loop. Higher values make the loop's resonance (about 100 Hz on the X8-P20, 135 Hz on the X6-P20) louder until it goes unstable, so lower is quieter. | | `\--robot_config.axol_config.left.elbow.firmware.profile_acc` | `null` | **Damiao wrists only.** Acceleration (rad/s²) of the position-velocity profiler. The stock `2` can't keep up with the 200 Hz stream, and `50` follows it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_ki` | `null` | Integral gain of the firmware speed loop. Values below the stock `1e-4` are smoother on a geared joint, because the integrator winds up while the joint is stuck. | | `\--robot_config.axol_config.left.elbow.firmware.planner_accel` | `null` | **MyActuator `a4` joints only.** Acceleration and deceleration (dps/s) of the 0xA4 position planner. Only `0` (direct tracking) and `60000` (each step finished within one tick) are accepted. | | `\--robot_config.axol_config.left.elbow.firmware.cap_track` | `null` | **0xA4 joints with the planner on.** Sets each tick's speed cap to this multiple of the commanded speed (`1.1` to `1.2` works well). Leave it unset for direct tracking. | | `\--robot_config.axol_config.left.elbow.firmware.tf_rated_current_a` | `null` | **MyActuator `a4` joints.** The motor's rated current (A), from the datasheet or [`tune.a4 --tf-probe`](/cli/tune-a4). When set, the core adds gravity and inertia torque feed-forward to the position command. | | `\--robot_config.axol_config.left.elbow.impedance_hz` | `null` | This joint's impedance command rate: `480.0`, `240.0`, or `null` to follow `impedance_hz` above. | 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. > [accordion] Controller and command rates > > **Position controller.** `controller` `position` sets every joint to its firmware position loop (`a4` on the MyActuator joints, `pv` on the Damiao wrists) and uses the `firmware.*` gains. It is stiff: there is no compliance and no host feed-forward. Teleop takes `--axol.controller position`, and recorded-motion replays take `--controller` ([`tune.motion`](/cli/tune-motion)). > > At 400 Hz the bus can't carry every motor every tick: > > * The MyActuator joints are commanded every tick. > * The two wrists are commanded on alternate ticks, 200 Hz each. > * One precise position read per tick rotates through the MyActuator joints and the gripper, about 67 Hz each. > > **Impedance rates.** Impedance joints run at 240 Hz. An arm that mixes impedance joints with firmware-loop joints runs its core at 480 Hz, with each impedance joint on alternate ticks. Any other core rate with an impedance joint on the arm is refused. Under `impedance`, a `wire_mode` you set on a joint is kept. > > With `impedance_hz` at `480.0`, or any joint's own `impedance_hz` at `480.0`, the arm's core runs at 480 Hz. The 480 Hz joints are commanded every tick, and the other impedance joints, including the Damiao wrists, on alternate ticks. `tune.motion --impedance-hz 480` and `tune.motion --fast-impedance right.shoulder_1` set these for one run. > [accordion] Wrist temperature limit > > The wrist motors (`wrist_2` and `wrist_3`) are rated for 3.5 Nm continuous. Held harder for long, for example pressing on something or squeezing a box, they heat up until the motor turns itself off and the wrist goes limp. The temperature limit prevents that: > > 1. When a wrist's coil reaches `coil_limit_c`, or its driver reaches `driver_limit_c`, its torque comes down to `cool_torque_nm` over `ramp_s`. > 2. The torque stays low until both have cooled to their resume temperatures. Expect a few minutes. > 3. Then the full torque comes back over `ramp_s`. > > While a wrist cools it gives way to anything it pushes on, and it still holds the gripper up. The session log shows a warning when its torque comes down, and a second one if it keeps heating. If you see the second, let the arm rest. > > The limit works on wrists running the default `mit` mode. A wrist on `pv` has no limit. > [accordion] Firmware position loops (a4 and pv) > > * A joint on `a4` or `pv` has no compliance and no host feed-forward. > * An `a4` joint's torque reads NaN, so the contact stop can't see that joint. A `pv` wrist keeps its torque reading. > * The gripper, gravity compensation and the limp fallback always use `mit`. On X6-P20 motors with the 2025-07 firmware, an `a4` joint that was hand-guided needs a re-enable before it tracks again. > * On `pv`, the core sets the Damiao control mode at bring-up and switches it back to MIT for limp and gravity compensation. > > **Firmware gains.** The `firmware.*` fields are the motor's own position and speed loops. They act only while a joint runs a firmware loop, so every joint leaves them `null` by default and bring-up keeps the motors' stored values. When set, a gain is written to the motor's ROM at enable. Find values with [`tune.a4`](/cli/tune-a4). > > * `planner_accel` at `60000` works best with `cap_track`. Values in between would re-plan every target so the joint barely moves, and are refused. > * `cap_track` is sent to the realtime core, not written to the motor. > * `tf_rated_current_a` needs firmware with command 0x73 (VersionDate 2026042402 or later) and direct tracking (`planner_accel` `0`). Elsewhere the joint stays on plain 0xA4 and the core logs why. > [accordion] Stiction, dither and Stribeck terms > > These feed-forward terms target slow-motion stick-slip on geared joints. All are off by default. > > * **Stiction push.** The peak push is `stiction_gain × fc + stiction_load_gain × abs(gravity)`. It fades on measured velocity and is gone above about 0.05 rad/s, so it never drives the slip. Keep `stiction_gain` below the breakaway-to-`fc` ratio that [`tune.breakaway`](/cli/tune-breakaway) measures. > * **Dither.** Start `dither_nm` at 1 to 2 Nm on a shoulder. The dither is audible. > * **Stribeck cancellation.** The term is `stribeck_gain × (stribeck_dfs + stribeck_load_gain × abs(gravity)) × exp(−(v/stribeck_vs)²) × tanh(v/0.02)`, so it is zero at rest. Raise `stribeck_gain` from 0.5 toward 0.9, and stop when the arm's 3 Hz mode grows. > * **Stribeck pole.** `20` is smooth but lags a fast surge. `40` to `80` follows it more closely but adds encoder noise to the torque. > [accordion] Per-joint defaults > > Both arms share these. `kp` and `kd` are the values at stiffness `1` (the default), and the **soft** columns are what stiffness `0` blends toward. `shoulder_1` sets `kd_host_q` to 3, and every other joint leaves `kd_host_hz` and `kd_host_q` at `null`. No joint runs the Stribeck cancellation by default. > > | 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 | 2.25 | 0 | 0 | 0.65 | 25 | 1.5 | > | `wrist_3` | 130 | 2.0 | 0 | 0 | 0.75 | 25 | 0.9 | > > **Slow-motion gains.** A joint whose calibration includes its own slow-profile friction fit runs the stiffer set below. [`tune.factory`](/cli/tune-factory) writes that fit by default, and so does [`tune.friction --profile slow --save`](/cli/tune-friction). These gains oscillate on a joint that still uses the fallback friction, so an uncalibrated joint keeps the table above. > > | Joint | `kp` | `kd` | `kd_host` | `kd_host_hz` / `kd_host_q` | `stribeck_gain` / `stribeck_pole` | > | - | - | - | - | - | - | > | `shoulder_1` | 450 | 5.0 | 110 | 2.6 / 1.0 | 0.8 / 40 | > | `shoulder_2` | 500 | 5.0 | 70 | `null` / `null` | 0.8 / 40 | > | `elbow` | 200 | 5.0 | 10 | 1.6 / 1.5 | 0.8 / 40 | > > Gains saved in the joint's own calibration entry still override these, for example from `tune.pid --save` or the friction fit's `stribeck_gain`. > [accordion] Per-motor friction defaults > > Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on a reference robot with [`tune.friction`](/cli/tune-friction). A joint's slow-profile friction (`fl` and the Stribeck excess) comes only from its own calibration. There is no fallback for it, so calibrate each robot. > > | 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` | ## Teleop session How VR controller motion becomes arm motion. | Flag | Default | Description | | - | - | - | | `\--teleop_config.vr_teleop_config.rest_pose_left` | `[−0.157, 0, 0, 0.314, 0, 0, −0.157]` | Left arm rest pose (rad, 7 joints). The arms start here and return here on reset. Edit it visually in the control panel's **Rest pose** tab. | | `\--teleop_config.vr_teleop_config.rest_pose_right` | `[0.157, 0, 0, −0.314, 0, 0, 0.157]` | Right arm rest pose. | | `\--teleop_config.vr_teleop_config.frequency` | `120` | Motor command rate (Hz). Data collection sets this from `teleop_hz`. | | `\--teleop_config.vr_teleop_config.ik_frequency` | `120` | How often VR poses are sent to the IK solver (Hz). The control loop interpolates between solutions. | | `\--teleop_config.vr_teleop_config.position_multiplier` | `1.0` | Scales hand movement. `2` moves the arm twice as far as your hand. Ignored in `absolute_mode`. | | `\--teleop_config.vr_teleop_config.rotation_multiplier` | `1.0` | Scales hand rotation the same way. Ignored in `absolute_mode`. | | `\--teleop_config.vr_teleop_config.hold_to_engage` | `false` | `false`: click both grips to engage, then click a grip to freeze or unfreeze that arm. `true`: each arm tracks only while you hold its own grip, from rest too, and freezes when you release it. | | `\--teleop_config.vr_teleop_config.park_to_zero` | `true` | On Stop / `Ctrl+C` the arms return to rest and then continue to the all-zero joint pose (hanging straight down), holding their grasp, before the motors are released. `false` stops the park at the rest pose. | | `\--teleop_config.vr_teleop_config.disengage_timeout` | `0.5` | Seconds without a VR frame before tracking disengages and the arms hold position. `0` disables. | | `\--teleop_config.vr_teleop_config.record` | `null` | Record every stage of the teleop pipeline to `~/.almond/recordings/_*.npz` for [`motion.build`](/cli/motion-build) and [`diag.offline`](/cli/diag-offline). A bare name like `rec1` goes in that folder; a path is used as-is. | | `\--teleop_config.vr_teleop_config.reset_speed` | `0.628` | Speed (rad/s) of the return-to-rest move. | | `\--teleop_config.vr_teleop_config.reset_min_duration` | `1.5` | Minimum duration (s) of a return-to-rest move. | | `\--teleop_config.vr_teleop_config.reset_rest_weight` | `50.0` | IK weight toward the rest pose when planning a return. | | `\--teleop_config.vr_teleop_config.reset_limit_weight` | `100.0` | IK weight against joint limits when planning a return. | | `\--teleop_config.vr_teleop_config.reset_collision_margin` | `0.025` | Minimum self-collision clearance (m) when planning a return. | | `\--teleop_config.vr_teleop_config.reset_collision_weight` | `100.0` | IK weight on self-collision when planning a return. | | `\--teleop_config.vr_teleop_config.reset_max_iterations` | `10` | IK iterations per return waypoint. | | `\--teleop_config.vr_teleop_config.reset_torque_threshold` | `6.0` | **Contact stop during return-to-rest**, in Nm of unexpected torque. If an arm hits something, the move stops and the arms go limp until you press reset. `0` disables (hardware only). | | `\--teleop_config.vr_teleop_config.teleop_torque_threshold` | `0` (off) | **Contact stop while tracking.** It works the same way and discards a running episode. The control panel sets it to `16` (hardware only). | | `\--teleop_config.vr_teleop_config.reset_gravity_comp_kd` | `0.25` | Damping (Nm·s/rad) of the limp hold after a contact stop. | | `\--teleop_config.vr_teleop_config.engage_max_vel` | `0.628` | Joint speed cap (rad/s) right after engaging, so the first move is gentle. | | `\--teleop_config.vr_teleop_config.engage_duration` | `1.0` | Seconds to ramp from `engage_max_vel` up to `teleop_max_vel`. | | `\--teleop_config.vr_teleop_config.teleop_max_vel` | `6.283` | Maximum joint speed (rad/s) while tracking. | | `\--teleop_config.vr_teleop_config.teleop_max_accel` | `9.42` | Maximum joint acceleration (rad/s²) while tracking. | | `\--teleop_config.vr_teleop_config.ik_alpha` | `0.3` | Smoothing on the IK output, `(0, 1]`. `1` is no smoothing; lower is smoother but adds lag. See [Latency tuning](/operations/teleop#latency-tuning). | | `\--teleop_config.vr_teleop_config.pose_cutoff` | `2.5` | Low-pass cutoff (Hz) on raw controller poses before IK. Lower rejects more hand tremor but adds lag. | | `\--teleop_config.vr_teleop_config.absolute_mode` | `false` | Mantis mapping: track controller poses 1:1 in a fixed world frame instead of relative to where you engaged. Forced `true` by `--mantis`. | | `\--teleop_config.vr_teleop_config.base_height` | `null` | In `absolute_mode`, fix the robot base this many metres above the VR floor instead of inferring it. Keeps datasets consistent across operators. | | `\--teleop_config.vr_teleop_config.tcp_transform_left` | `null` | *Mantis data collection.* Transform from tracker to gripper, `[x, y, z, qx, qy, qz, qw]`, for the left rig. It is read from the saved calibration, so set it only to override. See [`tracker`](/cli/tracker#transform-file). | | `\--teleop_config.vr_teleop_config.tcp_transform_right` | `null` | *Mantis data collection.* Same for the right rig. | | `\--teleop_config.vr_teleop_config.tracker_key` | `null` | *Mantis data collection, Quest.* Which saved calibration to use, e.g. `quest:oculus-touch-v3:grip`. Set from **Mantis settings** in the panel. | | `\--teleop_config.vr_teleop_config.quest_controller_profile` | `null` | *Mantis data collection, Quest.* Expected controller profile. Filled from `tracker_key`. | | `\--teleop_config.vr_teleop_config.quest_pose_space` | `null` | *Mantis data collection, Quest.* Expected pose datum, `grip` or `target-ray`. Filled from `tracker_key`. | | `\--teleop_config.vr_teleop_config.urdf_viewer_world_aligned` | `null` | *Mantis data collection.* Whether the pose source shares the viewer headset's floor. `null` means `true` for Quest, `false` for Lighthouse. | > [!NOTE] > > **Mantis mode** (`--mantis`) forces `absolute_mode: true`, `hold_to_engage: false`, `ik_alpha: 1.0`, `pose_cutoff: 5.0`, and removes the speed and acceleration limits. Your values for these keys are ignored in Mantis mode. ## Kinematics The IK solver that turns hand targets into joint angles. A higher weight means the solver cares more about that term. | Flag | Default | Description | | - | - | - | | `\--teleop_config.kinematics_config.pos_weight` | `50.0` | Weight on end-effector position error. | | `\--teleop_config.kinematics_config.ori_weight` | `10.0` | Weight on end-effector orientation error. | | `\--teleop_config.kinematics_config.elbow_weight` | `0` (off) | Weight on the headset's elbow-position hint. Off by default because the hint is unreliable on hardware. | | `\--teleop_config.kinematics_config.rest_weight` | `15.0` | Damping toward the current pose. Higher is steadier, lower tracks faster. | | `\--teleop_config.kinematics_config.posture_weight` | `5.0` | Pull toward the home posture, preventing slow drift. | | `\--teleop_config.kinematics_config.manipulability_weight` | `0.05` | Keeps the arm away from singular poses. Forced `0` in Mantis mode. | | `\--teleop_config.kinematics_config.limit_weight` | `75.0` | Penalty on joint-limit violations. | | `\--teleop_config.kinematics_config.self_collision_margin` | `0.025` | Distance (m) at which self-collision avoidance starts. Keep below the arm–torso clearance of normal poses. | | `\--teleop_config.kinematics_config.self_collision_weight` | `150.0` | Weight on self-collision avoidance. | | `\--teleop_config.kinematics_config.max_iterations` | `8` | Solver iterations per IK call. | | `\--teleop_config.kinematics_config.cost_tolerance` | `1e-4` | Convergence tolerance. Keep small. | | `\--teleop_config.kinematics_config.lambda_initial` | `1e-2` | Initial Levenberg–Marquardt damping. | | `\--teleop_config.kinematics_config.lambda_factor` | `10.0` | Damping multiplier after a rejected solver step. | | `\--teleop_config.kinematics_config.max_joint_delta` | `0.0346` | Largest joint change (rad) per IK call. Raise for faster tracking, lower for gentler motion. | | `\--teleop_config.kinematics_config.max_reach` | `0.82` | Maximum shoulder-to-target distance (m). Targets beyond it are pulled in. | | `\--teleop_config.kinematics_config.reach_soft_start` | `0.78` | Distance (m) at which the reach limit starts to act. | | `\--teleop_config.kinematics_config.manip_damping_threshold` | `0.015` | Below this manipulability, extra damping starts (near full extension). | | `\--teleop_config.kinematics_config.manip_damping_boost` | `60.0` | Extra damping at zero manipulability. `0` disables. | | `\--teleop_config.kinematics_config.limit_damping_margin` | `0.12` | Distance (rad) from a joint limit inside which the joint is damped while moving toward it. | | `\--teleop_config.kinematics_config.elbow_fade_band` | `0.15` | Height (m) above the shoulder over which the elbow hint fades out. | | `\--teleop_config.kinematics_config.robot_model` | `None` | Axol version to solve for: `classic`, `standalone`, `ox_cart`, `owl` or `mobile` (Axol on Jelly). It sets the joint limits and the body the arms are kept clear of, and `None` picks `mobile` when Jelly is enabled, else `mount`. | | `\--teleop_config.kinematics_config.mount` | `None` | What Axol is mounted on when Jelly isn't enabled: `classic` (Legacy), `standalone`, `ox_cart` or `owl`, as picked under **Mount** in the control panel. `None` reads `kinematics.mount` from the shared settings, or Legacy if it is unset. | | `\--teleop_config.kinematics_config.gripper` | `None` | Fitted gripper, `parallel` or `parcel`. Teleop sets it from `--axol.gripper`, and only Axol on Jelly uses it to pick a model. `None` reads `axol.gripper` from the shared settings. | > [!NOTE] > > **Mantis mode** replaces any of these still at their default with `pos_weight 200`, `ori_weight 120`, `manipulability_weight 0`, `self_collision_margin 0.02`, `max_joint_delta 0.05`, `max_iterations 12`. A value you set explicitly still wins. ## VR server The connection the headset streams poses over. | Flag | Default | Description | | - | - | - | | `\--teleop_config.vr_server_config.port` | `8000` | Port the headset connects to. [Quest-over-USB](/guides/quest-over-usb) uses the same port. | | `\--teleop_config.vr_server_config.certfile` | `null` | TLS certificate. `null` uses the auto-generated one in `~/.almond/vr/certs/`. | | `\--teleop_config.vr_server_config.keyfile` | `null` | TLS private key. `null` as above. | | `\--teleop_config.vr_server_config.interp_enabled` | `true` | Smooth out jittery or batched pose arrivals. `false` uses the latest raw frame. | | `\--teleop_config.vr_server_config.interp_min_delay_s` | `0` | Minimum playout delay (s). | | `\--teleop_config.vr_server_config.interp_max_delay_s` | `0.15` | Maximum playout delay (s) spent absorbing network jitter. | | `\--teleop_config.vr_server_config.interp_smooth_window_s` | `0.12` | Smoothing window (s). Adds about half of it as latency. `0` disables. See [Latency tuning](/operations/teleop#latency-tuning). | | `\--teleop_config.vr_server_config.interp_outlier_k` | `4.0` | Glitch-rejection threshold. Lower is more aggressive; `≤ 0` disables. | | `\--teleop_config.vr_server_config.interp_max_lag_s` | `0.5` | Pose frames arriving more than this (s) later than normal are skipped, so the arms hold through a network stall instead of replaying it late. `≤ 0` disables. | | `\--teleop_config.vr_server_config.pose_source_kind` | `null` | Which pose source may drive: `webxr` (Quest), `tracker` (Lighthouse), or `null` for whichever connects first. Set automatically for Mantis. | | `\--teleop_config.vr_server_config.expected_pose_source_id` | `null` | *Mantis data collection.* Exact pose-source ID accepted. Set automatically. | ## Jelly Jelly Mobile, the optional powered base. You drive it from the headset thumbsticks between takes. Jelly isn't recorded unless you turn on `--record_jelly`. Jelly is detected from the CAN devices present, so you never enable it by hand. | Flag | Default | Description | | - | - | - | | `\--teleop_config.jelly.wheels` | `true` | Drive the wheels with the thumbsticks when their CAN interface is attached. `false` leaves attached wheels off. | | `\--teleop_config.jelly.channel` | `can_alm_axol_b` | CAN interface of the wheel motors. `null` means lift only. | | `\--teleop_config.jelly.max_speed` | `20.0` | Peak wheel speed (rad/s) at full stick. | | `\--teleop_config.jelly.turn_scale` | `1.0` | Rotation speed relative to driving speed, `[0, 1]`. | | `\--teleop_config.jelly.slew` | `0.25` | Acceleration ramp, the same both ways. The default takes 4 s from rest to full speed, and as long to stop from it. | | `\--teleop_config.jelly.axis_snap_deg` | `15.0` | Stick directions within this many degrees of straight or sideways snap to exact. `0` disables. | | `\--teleop_config.jelly.deadzone` | `0.15` | Thumbstick deadzone, as a fraction of full deflection. | | `\--teleop_config.jelly.stick_expo` | `0.6` | Thumbstick response curve, `[0, 1]`. `0` is linear; higher keeps more of the stick's travel for slow, fine moves, with full deflection still full speed. At `0.6`, half the travel gives \~28% speed (linear: 50%). | | `\--teleop_config.jelly.imu` | `false` | Use the board IMU to hold a straight heading. | | `\--teleop_config.jelly.yaw_hold_gain` | `2.0` | Heading-hold strength. `0` disables. | | `\--teleop_config.jelly.yaw_hold_max` | `0.3` | Maximum heading-hold correction. | | `\--teleop_config.jelly.yaw_log` | `false` | Log heading-hold data at 10 Hz, for diagnosing drift. | | `\--teleop_config.jelly.hold_kp` | `60.0` | Stiffness (Nm/rad) holding parked wheels in place. `0` only brakes them. | | `\--teleop_config.jelly.hold_kd` | `1.5` | How strongly parked wheels resist rolling (Nm·s/rad), up to `5`. `0` leaves them idle. | | `\--teleop_config.jelly.frequency` | `50.0` | Wheel command rate (Hz). | | `\--teleop_config.jelly.command_timeout` | `0.2` | Seconds without a stick command before Jelly stops. | | `\--teleop_config.jelly.can_timeout_ms` | `200.0` | Motor-side loss-of-comms timeout (ms). Stops the wheels even if the host hangs. | | `\--teleop_config.jelly.lift` | `true` | Run the lift when its CAN bus is attached (right thumbstick, forward and back). `false` leaves an attached lift off. | | `\--teleop_config.jelly.lift_channel` | `null` (auto) | CAN interface of the lift controller. `null` uses the chest bus `can_alm_axol_c` if it exists, otherwise the wheel bus `can_alm_axol_b`. | | `\--teleop_config.jelly.lift_speed` | `650` | Lift speed (encoder counts/s). | ## Teleoperator | Flag | Default | Description | | - | - | - | | `--teleop_config.has_gripper` | `true` | Set automatically from `--robot_config.axol_config.has_gripper`. | | `--teleop_config.vr_teleop_config.gripper` | `parallel` | Set automatically from `--robot_config.axol_config.gripper`. Box mode is available only with `parcel`. | | `--teleop_config.id` | `null` | Used by LeRobot only. Axol ignores it. | | `--teleop_config.calibration_dir` | `null` | Used by LeRobot only. Axol ignores it. | # Gravity Compensation Source: https://docs.almond.bot/operations/gravity-comp Make Axol's arms weightless so you can move them by hand. Gravity compensation holds both arms weightless so you can move them by hand. The arms don't sag and don't spring back. Use it to pose the robot, check its range of motion or guide it by hand. Start it from the web control panel or with `axol gravity-comp`. ## Before you start * Install Axol with the [one-command install](/installation) and power on the robot. * Bring up CAN and check the motors. The control panel does this when it connects. On the CLI, run [`axol can.setup`](/cli/can-setup) once, then check a motor with [`axol motor.info`](/cli/motor-info). > [!WARNING] > > The arms go limp as soon as gravity compensation starts. Be ready to support them so they don't drop. ## Run it > [tab] Control Panel > > **1. Connect the robot** > > Connect the **Host Computer**. The panel connects the robot. If it doesn't, press **Connect** on the **Axol** card. No cameras are needed. See [Connections](/guides/control-panel#connections). > > **2. Select Gravity compensation and Start** > > Pick **Gravity compensation** from the operation selector and press **Start**. The arms go weightless. Press **Stop** to hold them stiff again. > > To record what you do by hand, fill in **Record** before you start. The recording is saved when you stop. Press **Build motion** in the diagnostics dashboard to turn it into a [reference motion](/cli/motion-build) you can replay. > [tab] CLI > > On the Host Computer: > > ```bash theme={null} > axol gravity-comp # all 7 joints free, both arms > axol gravity-comp --right_channel null # left arm only > axol gravity-comp --kd 1.0 # heavier damping (less floppy) > axol gravity-comp --free_joints [WRIST_3] # only WRIST_3 free; the rest held rigid > axol gravity-comp --record demo1 # capture the hand-guided motion > ``` > > Press `Ctrl+C` to stop. > > * `--free_joints` frees only the joints you name. The rest of the arm holds its pose, so you can test one joint at a time. > * `--record` saves the session so [`motion.build`](/cli/motion-build) can turn it into a reference motion. > > See [`gravity-comp`](/cli/gravity-comp) for every flag. > [!TIP] > > If an arm sags or pushes back, adjust the per-joint `mass` and `com` fields on `AxolConfig`. See [Gravity compensation](/api/robot#gravity-compensation). ## Next steps > [card] [Config Parameters](/operations/gravity-comp-config) > > Every setting for gravity comp, with its default. > [card] [Teleoperation](/operations/teleop) > > Drive the arms from a VR headset instead of by hand. > [card] [gravity-comp reference](/cli/gravity-comp) > > Every flag, including free joints, damping and per-arm channels. # Gravity Compensation Config Parameters Source: https://docs.almond.bot/operations/gravity-comp-config Every setting for axol gravity-comp, what it does and its default. 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. The [shared settings file](/guides/control-panel-settings) (`~/.almond/settings.json`) is read by default. In it, the `axol` section holds the robot settings below. `--left_channel` and `--right_channel` live under `robot`, and `--kd` and `--rate_hz` under `gravity`. ```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 free, such as `[WRIST_3]` or `[SHOULDER_1,ELBOW]`. The other joints hold their pose. `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/_*.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` | none | Load a JSON or YAML config file. Flags override it. | | `--settings_path` / `--no_settings` | `~/.almond/settings.json` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. The config file and flags override it. | ## Robot Arm stiffness, gripper limits and per-joint gains. Gravity compensation uses the `mass` and `com` values to hold the arm weightless. Adjust them if an arm sags or pushes back. | Flag | Default | Description | | - | - | - | | `\--axol.left_stiffness` | `1.0` | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). One number sets every joint, and a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. | | `\--axol.right_stiffness` | `1.0` | Same, for the right arm. | | `\--axol.has_gripper` | `true` | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8. | | `\--axol.gripper` | `parallel` | Which gripper is fitted: `parallel` (the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Box mode works only with `parcel`. | | `\--axol.max_step_rad` | `0.5` | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables. | | `\--axol.controller` | `impedance` | Control law for the arms. `impedance` is compliant and runs at 240 Hz, and `position` hands each joint to its motor's own position loop at 400 Hz (see the notes below). | | `\--axol.impedance_hz` | `240.0` | Command rate (Hz) of the MyActuator impedance joints: `240.0` or the experimental `480.0`. The gains were tuned at 240 Hz. | | `\--axol.wrist_thermal.enabled` | `true` | Lower a wrist's torque while it cools down when `wrist_2` or `wrist_3` gets hot. See the notes below. `false` turns it off. | | `\--axol.wrist_thermal.coil_limit_c` | `75.0` | Motor coil temperature (°C) at which the wrist's torque starts to come down. The motor turns itself off at 100 °C. | | `\--axol.wrist_thermal.coil_resume_c` | `65.0` | Coil temperature (°C) the wrist must cool to before its full torque comes back. | | `\--axol.wrist_thermal.driver_limit_c` | `105.0` | Motor driver temperature (°C) at which the torque starts to come down. The driver turns itself off at 120 °C. | | `\--axol.wrist_thermal.driver_resume_c` | `95.0` | Driver temperature (°C) the wrist must cool to before its full torque comes back. | | `\--axol.wrist_thermal.cool_torque_nm` | `1.5` | Torque (Nm) the wrist is held to while it cools. The motor is rated for 3.5 Nm continuous. | | `\--axol.wrist_thermal.ramp_s` | `0.25` | Seconds over which the torque comes down, and later comes back. | | `\--axol.left.gripper.torque_limit` | `0.5` | Grip force: peak gripper torque (Nm), at most `5`. | | `\--axol.left.gripper.max_speed` | `10.0` | Maximum gripper speed (rad/s). | | `\--axol.left.elbow.kp` | per joint | Position stiffness of one joint at stiffness `1`, in `[0, 500]`. | | `\--axol.left.elbow.kd` | per joint | Velocity damping in the motor firmware, in `[0, 5]`. | | `\--axol.left.elbow.kd_host` | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. `0` on joints whose firmware damping is enough. | | `\--axol.left.elbow.kd_host_hz` | `null` | Centre frequency (Hz) of the band the host damping acts in. `null` follows the arm's pose. | | `\--axol.left.elbow.kd_host_q` | `null` | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`. | | `\--axol.left.elbow.j_eff` | per joint | Effective inertia (kg·m²) used for acceleration feed-forward. | | `\--axol.left.elbow.stiction_gain` | `0.0` | Push toward the target while the joint is stuck, as a fraction of `friction.fc`. It fades out once the joint slides, and `0` turns it off. | | `\--axol.left.elbow.stiction_load_gain` | `0.0` | Part of that push that grows with load, in Nm per Nm of the joint's gravity feed-forward. | | `\--axol.left.elbow.stiction_err_deg` | `0.1` | Position error (degrees) at which that push reaches full strength. | | `\--axol.left.elbow.dither_nm` | `0.0` | Peak amplitude (Nm) of a sinusoidal torque dither that keeps a geared joint from sticking. `0` is off. | | `\--axol.left.elbow.dither_hz` | `60.0` | Dither frequency (Hz). Keep it above the arm's structural modes (about 35 Hz) and below the core's 120 Hz Nyquist limit. | | `\--axol.left.elbow.stribeck_gain` | `0.0` | Friction cancellation based on measured velocity, as a fraction of the measured static-minus-sliding friction excess. `0` is off. | | `\--axol.left.elbow.stribeck_dfs` | `0.3` | Static-minus-sliding friction excess (Nm) at zero gravity load. | | `\--axol.left.elbow.stribeck_load_gain` | `0.1` | Growth of that excess per Nm of gravity feed-forward. | | `\--axol.left.elbow.stribeck_vs` | `0.1` | Speed (rad/s) at which the excess has fallen to 1/e. | | `\--axol.left.elbow.stribeck_pole` | `20.0` | Low-pass pole (rad/s) on the measured velocity the term uses. Higher values follow fast changes better but add encoder noise to the torque. | | `\--axol.left.elbow.wire_mode` | `mit` | How the core commands the joint while tracking: `mit` (impedance), `a4` (a MyActuator joint's own position loop) or `pv` (a Damiao wrist's position-velocity mode). | | `\--axol.left.elbow.mass` | 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). | | `\--axol.left.elbow.com` | per joint | Centre of mass `[x, y, z]` (m) of the link. | | `\--axol.left.elbow.friction.fc` | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction). | | `\--axol.left.elbow.friction.k` | per motor | Friction curve sharpness. | | `\--axol.left.elbow.friction.fv` | per motor | Viscous friction (Nm·s/rad). | | `\--axol.left.elbow.friction.fo` | per motor | Constant torque offset (Nm). | | `\--axol.left.elbow.friction.fl` | `0.0` | Coulomb friction that grows with load, in Nm per Nm of gravity feed-forward. The effective `fc` is `fc + fl × abs(gravity)`, and `0` keeps `fc` constant. | | `\--axol.left.elbow.firmware.position_kp` | `null` | Proportional gain of the firmware position loop (MyActuator 0x30 index 0x07, Damiao register KP\_APR). `null` keeps the motor's stored value. | | `\--axol.left.elbow.firmware.position_ki` | `null` | Integral gain of the firmware position loop. Leave it at the stock `0`, because together with the speed integrator it hunts around the target. | | `\--axol.left.elbow.firmware.position_kd` | `null` | Derivative gain of the firmware position loop (protocol V4.2 and later). The 0xA4 loop on the X8-P20 doesn't respond to it. | | `\--axol.left.elbow.firmware.speed_kp` | `null` | Proportional gain of the firmware speed loop. Higher values make the loop's resonance (about 100 Hz on the X8-P20, 135 Hz on the X6-P20) louder until it goes unstable, so lower is quieter. | | `\--axol.left.elbow.firmware.profile_acc` | `null` | **Damiao wrists only.** Acceleration (rad/s²) of the position-velocity profiler. The stock `2` can't keep up with the 200 Hz stream, and `50` follows it. | | `\--axol.left.elbow.firmware.speed_ki` | `null` | Integral gain of the firmware speed loop. Values below the stock `1e-4` are smoother on a geared joint, because the integrator winds up while the joint is stuck. | | `\--axol.left.elbow.firmware.planner_accel` | `null` | **MyActuator `a4` joints only.** Acceleration and deceleration (dps/s) of the 0xA4 position planner. Only `0` (direct tracking) and `60000` (each step finished within one tick) are accepted. | | `\--axol.left.elbow.firmware.cap_track` | `null` | **0xA4 joints with the planner on.** Sets each tick's speed cap to this multiple of the commanded speed (`1.1` to `1.2` works well). Leave it unset for direct tracking. | | `\--axol.left.elbow.firmware.tf_rated_current_a` | `null` | **MyActuator `a4` joints.** The motor's rated current (A), from the datasheet or [`tune.a4 --tf-probe`](/cli/tune-a4). When set, the core adds gravity and inertia torque feed-forward to the position command. | | `\--axol.left.elbow.impedance_hz` | `null` | This joint's impedance command rate: `480.0`, `240.0`, or `null` to follow `impedance_hz` above. | 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. > [accordion] Controller and command rates > > **Position controller.** `controller` `position` sets every joint to its firmware position loop (`a4` on the MyActuator joints, `pv` on the Damiao wrists) and uses the `firmware.*` gains. It is stiff: there is no compliance and no host feed-forward. Teleop takes `--axol.controller position`, and recorded-motion replays take `--controller` ([`tune.motion`](/cli/tune-motion)). > > At 400 Hz the bus can't carry every motor every tick: > > * The MyActuator joints are commanded every tick. > * The two wrists are commanded on alternate ticks, 200 Hz each. > * One precise position read per tick rotates through the MyActuator joints and the gripper, about 67 Hz each. > > **Impedance rates.** Impedance joints run at 240 Hz. An arm that mixes impedance joints with firmware-loop joints runs its core at 480 Hz, with each impedance joint on alternate ticks. Any other core rate with an impedance joint on the arm is refused. Under `impedance`, a `wire_mode` you set on a joint is kept. > > With `impedance_hz` at `480.0`, or any joint's own `impedance_hz` at `480.0`, the arm's core runs at 480 Hz. The 480 Hz joints are commanded every tick, and the other impedance joints, including the Damiao wrists, on alternate ticks. `tune.motion --impedance-hz 480` and `tune.motion --fast-impedance right.shoulder_1` set these for one run. > [accordion] Wrist temperature limit > > The wrist motors (`wrist_2` and `wrist_3`) are rated for 3.5 Nm continuous. Held harder for long, for example pressing on something or squeezing a box, they heat up until the motor turns itself off and the wrist goes limp. The temperature limit prevents that: > > 1. When a wrist's coil reaches `coil_limit_c`, or its driver reaches `driver_limit_c`, its torque comes down to `cool_torque_nm` over `ramp_s`. > 2. The torque stays low until both have cooled to their resume temperatures. Expect a few minutes. > 3. Then the full torque comes back over `ramp_s`. > > While a wrist cools it gives way to anything it pushes on, and it still holds the gripper up. The session log shows a warning when its torque comes down, and a second one if it keeps heating. If you see the second, let the arm rest. > > The limit works on wrists running the default `mit` mode. A wrist on `pv` has no limit. > [accordion] Firmware position loops (a4 and pv) > > * A joint on `a4` or `pv` has no compliance and no host feed-forward. > * An `a4` joint's torque reads NaN, so the contact stop can't see that joint. A `pv` wrist keeps its torque reading. > * The gripper, gravity compensation and the limp fallback always use `mit`. On X6-P20 motors with the 2025-07 firmware, an `a4` joint that was hand-guided needs a re-enable before it tracks again. > * On `pv`, the core sets the Damiao control mode at bring-up and switches it back to MIT for limp and gravity compensation. > > **Firmware gains.** The `firmware.*` fields are the motor's own position and speed loops. They act only while a joint runs a firmware loop, so every joint leaves them `null` by default and bring-up keeps the motors' stored values. When set, a gain is written to the motor's ROM at enable. Find values with [`tune.a4`](/cli/tune-a4). > > * `planner_accel` at `60000` works best with `cap_track`. Values in between would re-plan every target so the joint barely moves, and are refused. > * `cap_track` is sent to the realtime core, not written to the motor. > * `tf_rated_current_a` needs firmware with command 0x73 (VersionDate 2026042402 or later) and direct tracking (`planner_accel` `0`). Elsewhere the joint stays on plain 0xA4 and the core logs why. > [accordion] Stiction, dither and Stribeck terms > > These feed-forward terms target slow-motion stick-slip on geared joints. All are off by default. > > * **Stiction push.** The peak push is `stiction_gain × fc + stiction_load_gain × abs(gravity)`. It fades on measured velocity and is gone above about 0.05 rad/s, so it never drives the slip. Keep `stiction_gain` below the breakaway-to-`fc` ratio that [`tune.breakaway`](/cli/tune-breakaway) measures. > * **Dither.** Start `dither_nm` at 1 to 2 Nm on a shoulder. The dither is audible. > * **Stribeck cancellation.** The term is `stribeck_gain × (stribeck_dfs + stribeck_load_gain × abs(gravity)) × exp(−(v/stribeck_vs)²) × tanh(v/0.02)`, so it is zero at rest. Raise `stribeck_gain` from 0.5 toward 0.9, and stop when the arm's 3 Hz mode grows. > * **Stribeck pole.** `20` is smooth but lags a fast surge. `40` to `80` follows it more closely but adds encoder noise to the torque. > [accordion] Per-joint defaults > > Both arms share these. `kp` and `kd` are the values at stiffness `1` (the default), and the **soft** columns are what stiffness `0` blends toward. `shoulder_1` sets `kd_host_q` to 3, and every other joint leaves `kd_host_hz` and `kd_host_q` at `null`. No joint runs the Stribeck cancellation by default. > > | 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 | 2.25 | 0 | 0 | 0.65 | 25 | 1.5 | > | `wrist_3` | 130 | 2.0 | 0 | 0 | 0.75 | 25 | 0.9 | > > **Slow-motion gains.** A joint whose calibration includes its own slow-profile friction fit runs the stiffer set below. [`tune.factory`](/cli/tune-factory) writes that fit by default, and so does [`tune.friction --profile slow --save`](/cli/tune-friction). These gains oscillate on a joint that still uses the fallback friction, so an uncalibrated joint keeps the table above. > > | Joint | `kp` | `kd` | `kd_host` | `kd_host_hz` / `kd_host_q` | `stribeck_gain` / `stribeck_pole` | > | - | - | - | - | - | - | > | `shoulder_1` | 450 | 5.0 | 110 | 2.6 / 1.0 | 0.8 / 40 | > | `shoulder_2` | 500 | 5.0 | 70 | `null` / `null` | 0.8 / 40 | > | `elbow` | 200 | 5.0 | 10 | 1.6 / 1.5 | 0.8 / 40 | > > Gains saved in the joint's own calibration entry still override these, for example from `tune.pid --save` or the friction fit's `stribeck_gain`. > [accordion] Per-motor friction defaults > > Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on a reference robot with [`tune.friction`](/cli/tune-friction). A joint's slow-profile friction (`fl` and the Stribeck excess) comes only from its own calibration. There is no fallback for it, so calibrate each robot. > > | 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` | # Mink IK Source: https://docs.almond.bot/operations/mink Use the Mink IK solver for teleoperation, data collection and custom policies. Axol ships with two IK solvers: JAX (Pyroki), the default, and Mink, which uses MuJoCo. Every install has both, and you switch between them with one setting. In a Mink session, Mink handles tracking, the move to rest at startup, returns to rest between episodes and parking at shutdown. ## Select the backend In the control panel, open **Settings → Kinematics → IK solver** and choose `mink`. Choose `jax` to switch back. The setting applies to every operation you start from the panel. It is stored as `kinematics.backend` in `~/.almond/settings.json`. On the CLI or in a `--config_path` file, set these fields yourself: | Operation | Fields to set | | - | - | | `teleop` | `kinematics.backend` | | `collect-data`, `collect-dagger` | `teleop_config.kinematics_config.backend` and `robot_config.cartesian_controller` | | `run-policy`, `replay-dataset` | `robot_config.cartesian_controller` | For example, `axol teleop --kinematics.backend mink`. Data collection and DAgger refuse to start when `kinematics_config.backend` and `cartesian_controller` differ. In the SDK, pass `KinematicsConfig(backend="mink")` to teleop and `AxolRobotConfig(cartesian_controller="mink")` to `AxolRobot`. ## What changes with Mink * **Solver settings.** The JAX solver settings don't apply to Mink. These include the position, orientation and elbow weights, `max_joint_delta` and the Mantis profile. A nonzero `elbow_weight` is ignored with a warning, and box mode runs without its elbow hints. * **Policy commands.** With Mink, policy commands go straight to the realtime controller, without the extra joint filtering JAX uses. The arms follow the targets as sent. The controller's watchdog and command checks still apply. Expect the arms to move differently than with JAX, and test on the robot after you switch. * **Solve rate.** Mink is tuned for 30 Hz by default. `run-policy` and `collect-dagger` pass their `fps` to Mink, and teleop passes its IK rate. In the SDK, pass `AxolRobot(config, mink_solve_hz=60)` for a 60 Hz policy. The rate is fixed when the robot is created. Check on the robot that the solver keeps up at your rate. * **Coordinate frames.** Cartesian actions and observations use Axol's world frame and the gripper-link pose. ## Run a Cartesian custom policy A Cartesian policy needs `robot_config.action_space: "cartesian"`. `observe_cartesian` sets how observations are recorded, separately from the actions. For example, a custom Cartesian policy can use this configuration: ```json theme={null} { "policy_type": "custom", "task": "local recording label", "server_host": "gpu-desktop", "server_port": 8765, "fps": 30, "actions_per_chunk": 30, "episode_time_s": 0, "soft_park_on_quit": true, "reset_torque_threshold": 4.0, "plan_config": { "request_interval": 10, "max_adoption_offset_steps": 6 }, "robot_config": { "type": "axol", "observe_cartesian": false, "action_space": "cartesian", "cartesian_controller": "mink" } } ``` Add the camera assignments your policy expects. With `soft_park_on_quit: true`, pressing `q` parks the arms through rest and zero before the motors turn off. Other exits, such as an error, keep the motors holding the arms. For DAgger, also set `hold_to_intervene`, `record_joint_actions`, the Mink teleop backend and a dataset `repo_id`. Rest poses and contact thresholds for DAgger and data collection are under `teleop_config.vr_teleop_config`. Episodes record actions in the configured action space. For Mink Cartesian actions, run policy and DAgger record the pose of the joint commands that were sent. If the policy asks for a pose the arm can't reach, Axol records the pose it commanded, not the one requested. With `record_joint_actions: true`, DAgger records joint actions instead, whatever the policy's action space. To reproduce a setup on another robot, write down every setting it uses. Don't rely on defaults. Include: * camera order and resizing, * the world frame, * control rates and the request interval, * rest poses, gains and gripper torque limits, and * contact thresholds. For example, the configuration above uses a request interval of 10 and a reset contact threshold of 4 Nm. The defaults are 5 and 6 Nm. ## Returning to rest and parking With Mink, the move to rest at startup, every return to rest and the park at shutdown follow a straight path for the gripper. Axol plans the whole path before anything moves. The path must end in the configured joint pose, not only the right gripper pose. Axol rejects a path that would: * pass a joint limit, * make the robot collide with itself, * aim for a pose the arm can't reach, * take too many steps, or * stop short of its goal. Axol never retries a rejected path with the collision checks turned off. The collision model doesn't include objects on the table, so the contact stop still guards every move. A rejected path moves nothing. What happens next depends on when it is rejected: * **During a session**, the arms go limp as after a contact, and the prompt reads **Return path rejected**. Guide the arms to a better spot by hand, then return to rest again. * **While parking at shutdown**, the park ends. * **At startup**, the session doesn't start, and the error gives the reason. Set the clearance the path must keep with `vr_teleop_config.mink_reset_collision_margin`, or `mink_reset_collision_margin` in `run-policy`. The default is 0.01 m. If the arms start closer together than that, the path must move them apart. A start in collision is rejected. The JAX settings `reset_collision_margin` and the reset penalty weights don't affect Mink. Mink plans different return paths than JAX, so test returns to rest on the robot after you switch. ## Test before you deploy Before you rely on Mink, test these on the robot: * data collection with one arm and with two arms, * DAgger takeover and handback, * a remote Cartesian policy, * a return to rest that is blocked or interrupted, and * parking from rest to zero. # Replay Dataset Source: https://docs.almond.bot/operations/replay-dataset Play a recorded LeRobot dataset episode back on Axol's arms. Replay plays one episode of a recorded [LeRobot](/api/lerobot) dataset back on the arms. Axol moves to the rest pose, sends the episode's recorded actions to the motors frame by frame, then returns to rest. Episodes are recorded from rest, so playback starts without a jump. Start it from the web control panel or with `axol replay-dataset`. Replay drives only the arms. It uses no headset, cameras or policy server. > [!WARNING] > > Replay doesn't watch the scene. It plays the recorded actions as they are. > > * Clear the workspace and set it up like it was when you recorded the episode. > * Keep **Stop** or `Ctrl+C` within reach. > * Use the same arm stiffness you recorded with, so the arms follow the actions the same way. ## Before you start * Install Axol with the [one-command install](/installation). Bring up CAN and check the motors. * Have a recorded dataset that you made or got from a source you trust. Dataset loading is not sandboxed. The dataset can be: * a local dataset under `--root` (`$HF_LEROBOT_HOME` by default), * a path to a dataset folder anywhere on disk, or * a dataset on the HuggingFace Hub, by its repo ID. See [Data Collection](/operations/data-collection) to record one. > [!WARNING] > > Datasets recorded with these versions need converting once before you replay them: > > * Cartesian datasets recorded with axol 0.1.31 or earlier replay about 90° off. Run [`axol migrate-dataset`](/cli/migrate-dataset). Joint-space datasets don't need this. > * **Mantis** datasets recorded with axol 0.2.4 or earlier barely move the arms. Run [`axol migrate-dataset --mantis-tcp-rotation`](/cli/migrate-dataset#mantis-tracker-gripper-rotation). ## Run it > [tab] Control Panel > > **1. Connect the robot** > > Connect the **Host Computer** and **Axol**. No cameras are needed. > > **2. Select Replay dataset and fill in the fields** > > Pick **Replay dataset** and fill in: > > * **Repo ID**: pick a dataset found on the host from the list, which shows each one's episode count. You can also type a repo ID or a folder path. > * **Episode**: the episode number, counting from 0. > * **Loop**: repeat the episode until you press **Stop**. > * **Interpolate** (optional): smooth playback by filling in commands at about 120 Hz. Timing stays the same. > > Playback rate and stiffness are in the [Settings](/guides/control-panel#settings) tabs. > > **3. Start** > > Clear the workspace, then press **Start**. The arms move to rest, play the episode at its recorded speed, and return to rest. With **Loop** on, they return to rest between takes and repeat until you press **Stop**. > [tab] CLI > > On the Host Computer: > > ```bash theme={null} > axol replay-dataset --repo_id myorg/pick-place --episode 0 > axol replay-dataset --repo_id myorg/pick-place --episode 0 --loop true # loop until Ctrl+C > ``` > > Press `Ctrl+C` to stop. The arms return to rest before the command exits. > > * `--fps 0`, the default, plays at the dataset's recorded rate. Set a positive value to change it. > * Set the stiffness you recorded with using `--robot_config.axol_config.left_stiffness` and `right_stiffness`. > * `--repo_id` also takes a path to a dataset folder. If it can't find the dataset, it lists the ones it can find. > > See [`replay-dataset`](/cli/replay-dataset) for every field and [Command configuration](/cli/configuration) for the flag syntax. ## Contact stops Every return to rest is guarded. If an arm meets resistance, the move stops and the arms go limp. You can also stop playback when a joint pushes hard against something. This check is off by default. Set **Teleop contact stop** in **Axol settings → Robot** (`--teleop_torque_threshold` on the CLI). The panel suggests `16` Nm. When it trips, playback stops and the arms go limp until you stop the run. Replay can't resume after a contact stop. ## Next steps > [card] [Config Parameters](/operations/replay-dataset-config) > > Every setting for replay, with its default. > [card] [Data Collection](/operations/data-collection) > > Record the episodes you replay here. > [card] [replay-dataset reference](/cli/replay-dataset) > > Every flag for replay. # Replay Dataset Config Parameters Source: https://docs.almond.bot/operations/replay-dataset-config Every setting for axol replay-dataset, what it does and its default. Every setting for `axol replay-dataset`. 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. The [shared settings file](/guides/control-panel-settings) (`~/.almond/settings.json`) is read by default. It stores these flags in the sections below. | Flag | Section in the settings file | | - | - | | `robot_config.axol_config.*` | `axol` | | `robot_config.left_channel`, `robot_config.right_channel` | `robot` | | Other `robot_config.*` fields | `lerobot` | | `--root` | `recording.root` | | `--fps` | `recording.replay_fps` | Replay's `--fps` is separate from the recording rate that data collection uses. ```bash theme={null} axol replay-dataset --repo_id myorg/pick --episode 3 --interpolate true ``` ## Playback | Flag | Default | Description | | - | - | - | | `--repo_id` | required | Dataset ID (`/`) or a path to a dataset folder. | | `--episode` | required | Episode index to replay. | | `--fps` | `0` | Playback rate. `0` uses the dataset's recorded rate. | | `--root` | `null` | Local dataset directory. Default is the LeRobot cache, `~/.cache/huggingface/lerobot`. | | `--interpolate` | `false` | Smooth playback by interpolating between recorded actions at \~120 Hz. | | `--loop` | `false` | Replay the episode until stopped, returning to rest between takes. | | `--log_level` | `INFO` | `DEBUG`, `INFO`, `WARNING`, or `ERROR`. | | `--config_path` | none | Load a JSON or YAML config file. Flags override it. | | `--settings_path` / `--no_settings` | `~/.almond/settings.json` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. The config file and flags override it. | ## Contact safety A contact stop trips when a joint pushes harder than the arm's weight explains, which means the arm hit something. The arms then go limp instead of pushing through. | Flag | Default | Description | | - | - | - | | `--reset_torque_threshold` | `6.0` | Contact stop during a return to rest (Nm). `0` turns it off. | | `--teleop_torque_threshold` | `0` (off) | Contact stop during playback (Nm). A trip stops playback. The control panel suggests `16`. | | `--reset_gravity_comp_kd` | `0.25` | Damping (Nm·s/rad) of the limp hold. | | `--park_to_zero` | `true` | On stop, move to rest and then to zero, holding the grasp, before the motors turn off. `false` stops at rest. | ## Robot Replay uses the arms only. Camera and observation settings have no effect. | Flag | Default | Description | | - | - | - | | `\--robot_config.left_channel` | `can_alm_axol_l` | CAN interface for the left arm. | | `\--robot_config.right_channel` | `can_alm_axol_r` | CAN interface for the right arm. | | `\--robot_config.cameras` | 3 unassigned slots | Camera slots `overhead`, `left_arm` and `right_arm`, passed inline: `--robot_config.cameras "{overhead: {serial: 41234567}}"`. Slots left at serial `0` are dropped. | | `\--robot_config.video_backend` | `auto` | Camera backend: `gst` (GPU pipeline, low latency), `sdk` (ZED SDK), or `auto` (prefers `gst`). Must match between collection and inference. | | `\--robot_config.observe_torques` | `false` | Include joint torques in observations. Must match between collection and inference. | | `\--robot_config.observe_cartesian` | `false` | Use end-effector poses instead of joint angles for observations and actions. Must match between collection and inference. | | `\--robot_config.id` | `null` | LeRobot bookkeeping, unused by Axol. | | `\--robot_config.calibration_dir` | `null` | LeRobot bookkeeping, unused by Axol. | ### Arm gains Arm stiffness, gripper limits and per-joint gains. | Flag | Default | Description | | - | - | - | | `\--robot_config.axol_config.left_stiffness` | `1.0` | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). One number sets every joint, and a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. | | `\--robot_config.axol_config.right_stiffness` | `1.0` | Same, for the right arm. | | `\--robot_config.axol_config.has_gripper` | `true` | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8. | | `\--robot_config.axol_config.gripper` | `parallel` | Which gripper is fitted: `parallel` (the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Box mode works only with `parcel`. | | `\--robot_config.axol_config.max_step_rad` | `0.5` | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables. | | `\--robot_config.axol_config.controller` | `impedance` | Control law for the arms. `impedance` is compliant and runs at 240 Hz, and `position` hands each joint to its motor's own position loop at 400 Hz (see the notes below). | | `\--robot_config.axol_config.impedance_hz` | `240.0` | Command rate (Hz) of the MyActuator impedance joints: `240.0` or the experimental `480.0`. The gains were tuned at 240 Hz. | | `\--robot_config.axol_config.wrist_thermal.enabled` | `true` | Lower a wrist's torque while it cools down when `wrist_2` or `wrist_3` gets hot. See the notes below. `false` turns it off. | | `\--robot_config.axol_config.wrist_thermal.coil_limit_c` | `75.0` | Motor coil temperature (°C) at which the wrist's torque starts to come down. The motor turns itself off at 100 °C. | | `\--robot_config.axol_config.wrist_thermal.coil_resume_c` | `65.0` | Coil temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.driver_limit_c` | `105.0` | Motor driver temperature (°C) at which the torque starts to come down. The driver turns itself off at 120 °C. | | `\--robot_config.axol_config.wrist_thermal.driver_resume_c` | `95.0` | Driver temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.cool_torque_nm` | `1.5` | Torque (Nm) the wrist is held to while it cools. The motor is rated for 3.5 Nm continuous. | | `\--robot_config.axol_config.wrist_thermal.ramp_s` | `0.25` | Seconds over which the torque comes down, and later comes back. | | `\--robot_config.axol_config.left.gripper.torque_limit` | `0.5` | Grip force: peak gripper torque (Nm), at most `5`. | | `\--robot_config.axol_config.left.gripper.max_speed` | `10.0` | Maximum gripper speed (rad/s). | | `\--robot_config.axol_config.left.elbow.kp` | per joint | Position stiffness of one joint at stiffness `1`, in `[0, 500]`. | | `\--robot_config.axol_config.left.elbow.kd` | per joint | Velocity damping in the motor firmware, in `[0, 5]`. | | `\--robot_config.axol_config.left.elbow.kd_host` | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. `0` on joints whose firmware damping is enough. | | `\--robot_config.axol_config.left.elbow.kd_host_hz` | `null` | Centre frequency (Hz) of the band the host damping acts in. `null` follows the arm's pose. | | `\--robot_config.axol_config.left.elbow.kd_host_q` | `null` | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`. | | `\--robot_config.axol_config.left.elbow.j_eff` | per joint | Effective inertia (kg·m²) used for acceleration feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_gain` | `0.0` | Push toward the target while the joint is stuck, as a fraction of `friction.fc`. It fades out once the joint slides, and `0` turns it off. | | `\--robot_config.axol_config.left.elbow.stiction_load_gain` | `0.0` | Part of that push that grows with load, in Nm per Nm of the joint's gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_err_deg` | `0.1` | Position error (degrees) at which that push reaches full strength. | | `\--robot_config.axol_config.left.elbow.dither_nm` | `0.0` | Peak amplitude (Nm) of a sinusoidal torque dither that keeps a geared joint from sticking. `0` is off. | | `\--robot_config.axol_config.left.elbow.dither_hz` | `60.0` | Dither frequency (Hz). Keep it above the arm's structural modes (about 35 Hz) and below the core's 120 Hz Nyquist limit. | | `\--robot_config.axol_config.left.elbow.stribeck_gain` | `0.0` | Friction cancellation based on measured velocity, as a fraction of the measured static-minus-sliding friction excess. `0` is off. | | `\--robot_config.axol_config.left.elbow.stribeck_dfs` | `0.3` | Static-minus-sliding friction excess (Nm) at zero gravity load. | | `\--robot_config.axol_config.left.elbow.stribeck_load_gain` | `0.1` | Growth of that excess per Nm of gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stribeck_vs` | `0.1` | Speed (rad/s) at which the excess has fallen to 1/e. | | `\--robot_config.axol_config.left.elbow.stribeck_pole` | `20.0` | Low-pass pole (rad/s) on the measured velocity the term uses. Higher values follow fast changes better but add encoder noise to the torque. | | `\--robot_config.axol_config.left.elbow.wire_mode` | `mit` | How the core commands the joint while tracking: `mit` (impedance), `a4` (a MyActuator joint's own position loop) or `pv` (a Damiao wrist's position-velocity mode). | | `\--robot_config.axol_config.left.elbow.mass` | 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). | | `\--robot_config.axol_config.left.elbow.com` | per joint | Centre of mass `[x, y, z]` (m) of the link. | | `\--robot_config.axol_config.left.elbow.friction.fc` | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction). | | `\--robot_config.axol_config.left.elbow.friction.k` | per motor | Friction curve sharpness. | | `\--robot_config.axol_config.left.elbow.friction.fv` | per motor | Viscous friction (Nm·s/rad). | | `\--robot_config.axol_config.left.elbow.friction.fo` | per motor | Constant torque offset (Nm). | | `\--robot_config.axol_config.left.elbow.friction.fl` | `0.0` | Coulomb friction that grows with load, in Nm per Nm of gravity feed-forward. The effective `fc` is `fc + fl × abs(gravity)`, and `0` keeps `fc` constant. | | `\--robot_config.axol_config.left.elbow.firmware.position_kp` | `null` | Proportional gain of the firmware position loop (MyActuator 0x30 index 0x07, Damiao register KP\_APR). `null` keeps the motor's stored value. | | `\--robot_config.axol_config.left.elbow.firmware.position_ki` | `null` | Integral gain of the firmware position loop. Leave it at the stock `0`, because together with the speed integrator it hunts around the target. | | `\--robot_config.axol_config.left.elbow.firmware.position_kd` | `null` | Derivative gain of the firmware position loop (protocol V4.2 and later). The 0xA4 loop on the X8-P20 doesn't respond to it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_kp` | `null` | Proportional gain of the firmware speed loop. Higher values make the loop's resonance (about 100 Hz on the X8-P20, 135 Hz on the X6-P20) louder until it goes unstable, so lower is quieter. | | `\--robot_config.axol_config.left.elbow.firmware.profile_acc` | `null` | **Damiao wrists only.** Acceleration (rad/s²) of the position-velocity profiler. The stock `2` can't keep up with the 200 Hz stream, and `50` follows it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_ki` | `null` | Integral gain of the firmware speed loop. Values below the stock `1e-4` are smoother on a geared joint, because the integrator winds up while the joint is stuck. | | `\--robot_config.axol_config.left.elbow.firmware.planner_accel` | `null` | **MyActuator `a4` joints only.** Acceleration and deceleration (dps/s) of the 0xA4 position planner. Only `0` (direct tracking) and `60000` (each step finished within one tick) are accepted. | | `\--robot_config.axol_config.left.elbow.firmware.cap_track` | `null` | **0xA4 joints with the planner on.** Sets each tick's speed cap to this multiple of the commanded speed (`1.1` to `1.2` works well). Leave it unset for direct tracking. | | `\--robot_config.axol_config.left.elbow.firmware.tf_rated_current_a` | `null` | **MyActuator `a4` joints.** The motor's rated current (A), from the datasheet or [`tune.a4 --tf-probe`](/cli/tune-a4). When set, the core adds gravity and inertia torque feed-forward to the position command. | | `\--robot_config.axol_config.left.elbow.impedance_hz` | `null` | This joint's impedance command rate: `480.0`, `240.0`, or `null` to follow `impedance_hz` above. | 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. > [accordion] Controller and command rates > > **Position controller.** `controller` `position` sets every joint to its firmware position loop (`a4` on the MyActuator joints, `pv` on the Damiao wrists) and uses the `firmware.*` gains. It is stiff: there is no compliance and no host feed-forward. Teleop takes `--axol.controller position`, and recorded-motion replays take `--controller` ([`tune.motion`](/cli/tune-motion)). > > At 400 Hz the bus can't carry every motor every tick: > > * The MyActuator joints are commanded every tick. > * The two wrists are commanded on alternate ticks, 200 Hz each. > * One precise position read per tick rotates through the MyActuator joints and the gripper, about 67 Hz each. > > **Impedance rates.** Impedance joints run at 240 Hz. An arm that mixes impedance joints with firmware-loop joints runs its core at 480 Hz, with each impedance joint on alternate ticks. Any other core rate with an impedance joint on the arm is refused. Under `impedance`, a `wire_mode` you set on a joint is kept. > > With `impedance_hz` at `480.0`, or any joint's own `impedance_hz` at `480.0`, the arm's core runs at 480 Hz. The 480 Hz joints are commanded every tick, and the other impedance joints, including the Damiao wrists, on alternate ticks. `tune.motion --impedance-hz 480` and `tune.motion --fast-impedance right.shoulder_1` set these for one run. > [accordion] Wrist temperature limit > > The wrist motors (`wrist_2` and `wrist_3`) are rated for 3.5 Nm continuous. Held harder for long, for example pressing on something or squeezing a box, they heat up until the motor turns itself off and the wrist goes limp. The temperature limit prevents that: > > 1. When a wrist's coil reaches `coil_limit_c`, or its driver reaches `driver_limit_c`, its torque comes down to `cool_torque_nm` over `ramp_s`. > 2. The torque stays low until both have cooled to their resume temperatures. Expect a few minutes. > 3. Then the full torque comes back over `ramp_s`. > > While a wrist cools it gives way to anything it pushes on, and it still holds the gripper up. The session log shows a warning when its torque comes down, and a second one if it keeps heating. If you see the second, let the arm rest. > > The limit works on wrists running the default `mit` mode. A wrist on `pv` has no limit. > [accordion] Firmware position loops (a4 and pv) > > * A joint on `a4` or `pv` has no compliance and no host feed-forward. > * An `a4` joint's torque reads NaN, so the contact stop can't see that joint. A `pv` wrist keeps its torque reading. > * The gripper, gravity compensation and the limp fallback always use `mit`. On X6-P20 motors with the 2025-07 firmware, an `a4` joint that was hand-guided needs a re-enable before it tracks again. > * On `pv`, the core sets the Damiao control mode at bring-up and switches it back to MIT for limp and gravity compensation. > > **Firmware gains.** The `firmware.*` fields are the motor's own position and speed loops. They act only while a joint runs a firmware loop, so every joint leaves them `null` by default and bring-up keeps the motors' stored values. When set, a gain is written to the motor's ROM at enable. Find values with [`tune.a4`](/cli/tune-a4). > > * `planner_accel` at `60000` works best with `cap_track`. Values in between would re-plan every target so the joint barely moves, and are refused. > * `cap_track` is sent to the realtime core, not written to the motor. > * `tf_rated_current_a` needs firmware with command 0x73 (VersionDate 2026042402 or later) and direct tracking (`planner_accel` `0`). Elsewhere the joint stays on plain 0xA4 and the core logs why. > [accordion] Stiction, dither and Stribeck terms > > These feed-forward terms target slow-motion stick-slip on geared joints. All are off by default. > > * **Stiction push.** The peak push is `stiction_gain × fc + stiction_load_gain × abs(gravity)`. It fades on measured velocity and is gone above about 0.05 rad/s, so it never drives the slip. Keep `stiction_gain` below the breakaway-to-`fc` ratio that [`tune.breakaway`](/cli/tune-breakaway) measures. > * **Dither.** Start `dither_nm` at 1 to 2 Nm on a shoulder. The dither is audible. > * **Stribeck cancellation.** The term is `stribeck_gain × (stribeck_dfs + stribeck_load_gain × abs(gravity)) × exp(−(v/stribeck_vs)²) × tanh(v/0.02)`, so it is zero at rest. Raise `stribeck_gain` from 0.5 toward 0.9, and stop when the arm's 3 Hz mode grows. > * **Stribeck pole.** `20` is smooth but lags a fast surge. `40` to `80` follows it more closely but adds encoder noise to the torque. > [accordion] Per-joint defaults > > Both arms share these. `kp` and `kd` are the values at stiffness `1` (the default), and the **soft** columns are what stiffness `0` blends toward. `shoulder_1` sets `kd_host_q` to 3, and every other joint leaves `kd_host_hz` and `kd_host_q` at `null`. No joint runs the Stribeck cancellation by default. > > | 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 | 2.25 | 0 | 0 | 0.65 | 25 | 1.5 | > | `wrist_3` | 130 | 2.0 | 0 | 0 | 0.75 | 25 | 0.9 | > > **Slow-motion gains.** A joint whose calibration includes its own slow-profile friction fit runs the stiffer set below. [`tune.factory`](/cli/tune-factory) writes that fit by default, and so does [`tune.friction --profile slow --save`](/cli/tune-friction). These gains oscillate on a joint that still uses the fallback friction, so an uncalibrated joint keeps the table above. > > | Joint | `kp` | `kd` | `kd_host` | `kd_host_hz` / `kd_host_q` | `stribeck_gain` / `stribeck_pole` | > | - | - | - | - | - | - | > | `shoulder_1` | 450 | 5.0 | 110 | 2.6 / 1.0 | 0.8 / 40 | > | `shoulder_2` | 500 | 5.0 | 70 | `null` / `null` | 0.8 / 40 | > | `elbow` | 200 | 5.0 | 10 | 1.6 / 1.5 | 0.8 / 40 | > > Gains saved in the joint's own calibration entry still override these, for example from `tune.pid --save` or the friction fit's `stribeck_gain`. > [accordion] Per-motor friction defaults > > Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on a reference robot with [`tune.friction`](/cli/tune-friction). A joint's slow-profile friction (`fl` and the Stribeck excess) comes only from its own calibration. There is no fallback for it, so calibrate each robot. > > | 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` | # Run Policy Source: https://docs.almond.bot/operations/run-policy Run a trained policy on Axol, with inference on the Host Computer or a remote server. Run Policy lets a trained policy drive Axol's arms. Axol sends the arm positions and camera frames to the policy, and the policy sends back chunks of actions. Run it on the same computer as [data collection](/operations/data-collection): the one wired to the robot with the ZED cameras attached. Start it from the web control panel or with `axol run-policy`. For LeRobot policies, inference runs on the Host Computer by default. You can move it to a more powerful computer on the network instead. Custom policies connect to an endpoint you run, through the [custom policy interface](/api/policy-plan). ```mermaid theme={null} flowchart LR subgraph robot [Robot machine] proc["run-policy"] end subgraph server [Inference server - optional] infer["inference-server"] end proc -->|joints + camera frames| infer infer -->|action chunks| proc ``` > [!TIP] > > To run a model that isn't a LeRobot checkpoint, choose policy type **`custom`**. You choose the model and instructions on your endpoint, so the robot needs no checkpoint path. See [Run Your Own Policy](/operations/custom-policy). ## Before you start * Install Axol with the [one-command install](/installation). Bring up CAN and check the motors. * Connect at least one of the ZED cameras the policy was trained on, and have their serial numbers ready. See the [Data Collection](/operations/data-collection#before-you-start) tip for how to list them. * Have a trained checkpoint and its policy type (`act`, `smolvla`, `pi0` and so on). The checkpoint can be a local path or a HuggingFace repo. * Use the **same** cameras, camera resolution, stereo setting and recording rate the policy was trained on. * For GPU inference on the Host Computer, you need a PyTorch build with CUDA. Otherwise, use a remote server (below) or pass `--device cpu`. > [!WARNING] > > Load only checkpoints and datasets that you made or got from a source you trust. Model and dataset loading is not sandboxed. > [!NOTE] > > On a Jetson, the hosted install comes with the CPU-only PyTorch build. For GPU inference, install a JetPack-compatible Torch and Torchvision yourself. Axol's updater doesn't replace a build you installed. ## Run it > [tab] Control Panel > > **1. Connect the robot and assign cameras** > > Connect the **Host Computer** and **Axol**. Under **Axol settings → Cameras**, assign at least one of the cameras the policy was trained on. See [Cameras](/guides/control-panel#cameras). > > **2. Select Run policy and fill in the fields** > > Pick **Run policy** and fill in **Policy path**, **Policy type** and **Task**. The remote server's host and port, and the chunk settings, are in the **Inference** tab of [Settings](/guides/control-panel#settings). > > **3. Start and run episodes** > > Press **Start**, then use the **Episode control** box: > > | Button | What it does | > | - | - | > | **Start episode** | Start the next episode. | > | **Save** | Save the episode and wait for the next one. | > | **Discard** | Drop the episode. The arms go **limp** so you can move them clear by hand. Then press **Return to rest**. | > | **Return to rest** | Plan a return to rest from where the arms are. Appears after **Discard** or a contact stop. | > > To end the run, press **Stop** at the top of the card. > [tab] CLI > > On the Host Computer: > > ```bash theme={null} > axol run-policy \ > --policy_path myorg/pick-place-policy \ > --policy_type act \ > --task "Pick the red cube" \ > --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" > ``` > > This starts a policy server on the same computer. For CPU inference, add `--device cpu`. > > Replace the serial numbers with your cameras' and assign the cameras the policy was trained on. Slots you leave out aren't used. The `cameras` value is one inline YAML dictionary. See [Command configuration](/cli/configuration#field-name-conventions). > > Control each episode from the `run-policy` terminal: > > | Key | Action | > | - | - | > | `s` | Save the episode. | > | `r` | Discard the episode. The arms go **limp**. Move them clear, then press **Enter** to return to rest. | > | `q` | Discard the episode and quit. | > > See [`run-policy`](/cli/run-policy) for the chunk and dataset fields. ### Episodes * `--episode_time_s` limits each episode, 120 s by default. When it runs out, you get the same save, discard or quit choice. * If you set a dataset repo ID, each saved episode is added to a LeRobot dataset. * **Discard** makes the arms go limp first, because a failed episode often leaves them in a bad spot. Move them clear by hand, then return to rest. ### Contact stops Between episodes, the arms return to the rest pose along a path that avoids collisions. The return is guarded. If an arm meets resistance, such as a held object or a person, the move stops and the arms go limp. 1. Move the arms clear by hand. 2. Press **Enter** in the terminal or **Return to rest** in the panel. Axol plans a new return from where the arms are. Set the sensitivity with **Return-to-rest contact stop** in the panel, or `--reset_torque_threshold` (default `6.0` Nm, `0` turns it off). You can also stop an episode when the arms push hard while the policy drives them. This check is off by default, because a policy often pushes on the scene on purpose. Set **Policy contact stop** in the panel, or `--policy_torque_threshold`. The panel suggests `16` Nm. When it trips, the episode is dropped without saving and the arms go limp. Move them clear, then return to rest and start the next episode. ### Smooth motion Axol limits joint speed and acceleration on every command the policy sends. For LeRobot policies, Axol also blends overlapping chunks (`--ensemble_blend_s`, `--align_fade_s`). A custom policy's server does any blending itself, and Axol runs its plan as sent. Smooth motion still needs consistent targets and fast enough inference. See [`run-policy`](/cli/run-policy) and [custom policy timing](/api/policy-plan#robot-control-loop). ## Offload LeRobot inference to a remote server (optional) > [!WARNING] > > Use remote inference only on an isolated, trusted network or a VPN. Set the server's firewall to accept only the robot's IP address. The link is not encrypted or authenticated. Anyone on the network could load checkpoints on the server, or pose as the server and send actions to the robot. **1. Start the inference server on the GPU computer** Start the server from the CLI. The control panel doesn't run it. Install the `lerobot` extra on the GPU computer, then run: ```bash theme={null} axol inference-server --host 192.168.1.99 ``` Replace the address with the GPU computer's LAN IP. Leave out `--host` to listen on all interfaces (`0.0.0.0`). The server listens on port `8765` until you press `Ctrl+C`. See [`inference-server`](/cli/inference-server). **2. Point Run Policy at it** On the Host Computer, run Run Policy as above with the server's address: > [tab] Control Panel > > In the **Inference** tab of [Settings](/guides/control-panel#settings), set the server host to the GPU computer's address, such as `192.168.1.99`, and press **Save**. Then press **Start** in the **Run policy** panel. > [tab] CLI > > Add `--server_host`: > > ```bash theme={null} > axol run-policy \ > --policy_path myorg/pick-place-policy \ > --policy_type act \ > --task "Pick the red cube" \ > --server_host 192.168.1.99 \ > --robot_config.cameras "{overhead: {serial: 41234567}, left_arm: {serial: 41234568}, right_arm: {serial: 41234569}}" > ``` The server downloads the policy, so it must be able to reach `--policy_path`. A HuggingFace Hub repo ID works. ## Next steps > [card] [Config Parameters](/operations/run-policy-config) > > Every setting for run policy, with its default. > [card] [Data Collection](/operations/data-collection) > > Record more episodes to improve the policy. > [card] [run-policy reference](/cli/run-policy) > > Every flag and aggregation strategy. > [card] [Run Your Own Policy](/operations/custom-policy) > > Drive the arms from a model that isn't a LeRobot checkpoint. # Run Policy Config Parameters Source: https://docs.almond.bot/operations/run-policy-config Every setting for axol run-policy, what it does and its default. Every setting for `axol run-policy`. 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. The [shared settings file](/guides/control-panel-settings) (`~/.almond/settings.json`) is read by default. It stores these flags in the sections below. | Flag | Section in the settings file | | - | - | | `robot_config.axol_config.*` | `axol` | | `robot_config.left_channel`, `robot_config.right_channel` | `robot` | | Other `robot_config.*` fields | `lerobot` | | Recording flags | `recording` | | Inference and action chunking flags, and `policy_torque_threshold` | `inference` | ```bash theme={null} axol run-policy --policy_path myorg/pick-act --policy_type act --task "pick up the cup" \ --robot_config.axol_config.left_stiffness 0.8 ``` > [!WARNING] > > Use the **same** stiffness, gripper torque, `observe_torques`, `observe_cartesian`, `fps` and cameras as in [Data Collection](/operations/data-collection-config). A policy only works with the settings it was trained on. ## Policy | Flag | Default | Description | | - | - | - | | `--policy_type` | required | `act`, `smolvla`, `diffusion`, `tdmpc`, `vqbet`, `pi0`, `pi05`, `groot` or `custom` ([your own model](/operations/custom-policy)). | | `--policy_path` | required for LeRobot policies | Checkpoint, as a HuggingFace Hub repo ID or a local path. A remote inference server must be able to reach it. Not used with `custom`. | | `--task` | required | Task description saved with recorded frames and sent to LeRobot policies. A custom policy chooses instructions on its server. | | `--device` | `cuda` | `cuda`, `cpu` or `mps`. LeRobot policies only. | | `--episode_time_s` | `120` | Maximum episode length (s). | | `--fps` | `30` | Control rate. Must match the training rate, so a policy trained on 60 fps data needs `--fps 60`. | | `--allow_fps_mismatch` | `false` | Start even if `fps` differs from the training rate. For experiments only. | | `--server_host` | `null` (local) | Address of a remote [`inference-server`](/cli/inference-server). `null` starts one on this computer for LeRobot policies. With `custom`, the address of your running endpoint (`null` means this computer). | | `--server_port` | `8765` | Port of the inference server or custom policy endpoint. | ## Action chunking A custom policy's endpoint sends the final plan, and the robot runs the rest of it unchanged. LeRobot policies use the chunk-blending settings below. The speed and acceleration limits apply to both. | Flag | Default | Description | | - | - | - | | `--actions_per_chunk` | `50` | Maximum actions requested from the policy per call. | | `--plan_config.request_interval` | `5` | Custom policies: run this many actions between requests. | | `--plan_config.max_adoption_offset_steps` | `6` | Custom policies: how many control steps a reply may arrive after its request. Must be shorter than the chunk. | | `--plan_config.late_policy` | `blocking_refresh` | Custom policies: when the plan runs out, hold and request a new one. `abort` ends the session instead. | | `--chunk_size_threshold` | `0.9` | LeRobot policies: request the next chunk when the queue drops below this fraction. | | `--aggregate_fn` | `temporal_ensemble` | LeRobot policies: how to combine overlapping chunks. `temporal_ensemble`, `weighted_average`, `latest_only`, `average` or `conservative`. | | `--temporal_ensemble_coeff` | `0.01` | LeRobot policies: weight decay for `temporal_ensemble`. | | `--ensemble_blend_s` | `0.2` | LeRobot policies: fade-out time (s) at the end of each chunk, so the motion doesn't step when a chunk ends. `0` turns it off. | | `--align_fade_s` | `1.0` | LeRobot policies: time (s) to blend each new chunk in from the current motion. `0` turns it off. | | `--exec_max_vel` | `6.283` | Joint speed limit (rad/s) on commands sent to the arms. `0` turns it off. | | `--exec_max_accel` | `9.42` | Joint acceleration limit (rad/s²). `0` turns it off. | ## Recording Optional. Set `--repo_id` to record the episodes to a dataset. | Flag | Default | Description | | - | - | - | | `--repo_id` | `null` | Dataset ID, `/`. Set it to record the episodes. | | `--vcodec` | per platform | Dataset video codec: `h264` on Jetson, `auto` elsewhere. | | `--root` | `null` | Local dataset directory. Default is the LeRobot cache, `~/.cache/huggingface/lerobot`. | | `--push_to_hub` | `false` | Upload the dataset to the HuggingFace Hub when done. Log in first. See [Upload to the HuggingFace Hub](/operations/data-collection#upload-to-the-huggingface-hub). | | `--rerun_ip` | `null` (off) | Stream live visualisation to a [Rerun](https://rerun.io) viewer at this address. | | `--rerun_port` | `9876` | Rerun viewer port. | | `--log_level` | `INFO` | `DEBUG`, `INFO`, `WARNING`, or `ERROR`. | | `--config_path` | none | Load a JSON or YAML config file. Flags override it. | | `--settings_path` / `--no_settings` | `~/.almond/settings.json` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. The config file and flags override it. | ## Contact safety A contact stop trips when a joint pushes harder than the arm's weight explains, which means the arm hit something. The arms then go limp instead of pushing through. | Flag | Default | Description | | - | - | - | | `--reset_torque_threshold` | `6.0` | Contact stop during a return to rest (Nm). `0` turns it off. | | `--policy_torque_threshold` | `0` (off) | Contact stop while the policy drives (Nm). A trip drops the episode. The control panel suggests `16`. | | `--reset_gravity_comp_kd` | `0.25` | Damping (Nm·s/rad) of the limp hold. | | `--park_to_zero` | `true` | On stop, move to rest and then to zero, holding the grasp, before the motors turn off. `false` stops at rest. | ## Robot CAN buses, cameras and what goes into observations. | Flag | Default | Description | | - | - | - | | `\--robot_config.left_channel` | `can_alm_axol_l` | CAN interface for the left arm. | | `\--robot_config.right_channel` | `can_alm_axol_r` | CAN interface for the right arm. | | `\--robot_config.cameras` | 3 unassigned slots | Camera slots `overhead`, `left_arm` and `right_arm`, passed inline: `--robot_config.cameras "{overhead: {serial: 41234567}}"`. Slots left at serial `0` are dropped. | | `\--robot_config.video_backend` | `auto` | Camera backend: `gst` (GPU pipeline, low latency), `sdk` (ZED SDK), or `auto` (prefers `gst`). Must match between collection and inference. | | `\--robot_config.observe_torques` | `false` | Include joint torques in observations. Must match between collection and inference. | | `\--robot_config.observe_cartesian` | `false` | Use end-effector poses instead of joint angles for observations and actions. Must match between collection and inference. | | `\--robot_config.id` | `null` | LeRobot bookkeeping, unused by Axol. | | `\--robot_config.calibration_dir` | `null` | LeRobot bookkeeping, unused by Axol. | ### Cameras One ZED camera per slot: `overhead`, `left_arm`, `right_arm`. Flags are shown for `overhead`; swap in the other slot names. Stereo ZED X cameras are detected from their serial. The [control panel's Cameras tab](/guides/control-panel#cameras) edits all of this visually. | Flag | Default | Description | | - | - | - | | `\--robot_config.cameras.overhead.serial` | `0` (unassigned) | Serial number of the ZED camera. `0` leaves the slot unused. | | `\--robot_config.cameras.overhead.fps` | `60` | Capture rate. Raised automatically if the recording `fps` is higher. | | `\--robot_config.cameras.overhead.width` | `960` | Capture width. With `height`, must be a ZED resolution: `SVGA` 960×600, `HD1080` 1920×1080, `HD1200` 1920×1200. | | `\--robot_config.cameras.overhead.height` | `600` | Capture height. | | `\--robot_config.cameras.overhead.color_mode` | `RGB` | `RGB` or `BGR`. | | `\--robot_config.cameras.overhead.warmup_s` | `1` | Seconds of frames discarded on connect. | | `\--robot_config.cameras.overhead.stereo` | `false` (auto) | Force stereo on or off instead of detecting it from the serial. | | `\--robot_config.cameras.overhead.eyes` | `both` | Which eye(s) to **record**: `both` (`overhead_left` + `overhead_right`), `left`, or `right`. | | `\--robot_config.cameras.overhead.stream_eyes` | `null` | Which eye(s) to **stream** to the headset. `null` follows `eyes`. Not used by run-policy. | | `\--robot_config.cameras.overhead.record` | `true` | Write this camera to the dataset. | | `\--robot_config.cameras.overhead.stream` | `true` | Show this camera in the headset. Not used by run-policy. | ### Arm gains Arm stiffness, gripper limits and per-joint gains. | Flag | Default | Description | | - | - | - | | `\--robot_config.axol_config.left_stiffness` | `1.0` | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). One number sets every joint, and a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. | | `\--robot_config.axol_config.right_stiffness` | `1.0` | Same, for the right arm. | | `\--robot_config.axol_config.has_gripper` | `true` | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8. | | `\--robot_config.axol_config.gripper` | `parallel` | Which gripper is fitted: `parallel` (the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Box mode works only with `parcel`. | | `\--robot_config.axol_config.max_step_rad` | `0.5` | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables. | | `\--robot_config.axol_config.controller` | `impedance` | Control law for the arms. `impedance` is compliant and runs at 240 Hz, and `position` hands each joint to its motor's own position loop at 400 Hz (see the notes below). | | `\--robot_config.axol_config.impedance_hz` | `240.0` | Command rate (Hz) of the MyActuator impedance joints: `240.0` or the experimental `480.0`. The gains were tuned at 240 Hz. | | `\--robot_config.axol_config.wrist_thermal.enabled` | `true` | Lower a wrist's torque while it cools down when `wrist_2` or `wrist_3` gets hot. See the notes below. `false` turns it off. | | `\--robot_config.axol_config.wrist_thermal.coil_limit_c` | `75.0` | Motor coil temperature (°C) at which the wrist's torque starts to come down. The motor turns itself off at 100 °C. | | `\--robot_config.axol_config.wrist_thermal.coil_resume_c` | `65.0` | Coil temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.driver_limit_c` | `105.0` | Motor driver temperature (°C) at which the torque starts to come down. The driver turns itself off at 120 °C. | | `\--robot_config.axol_config.wrist_thermal.driver_resume_c` | `95.0` | Driver temperature (°C) the wrist must cool to before its full torque comes back. | | `\--robot_config.axol_config.wrist_thermal.cool_torque_nm` | `1.5` | Torque (Nm) the wrist is held to while it cools. The motor is rated for 3.5 Nm continuous. | | `\--robot_config.axol_config.wrist_thermal.ramp_s` | `0.25` | Seconds over which the torque comes down, and later comes back. | | `\--robot_config.axol_config.left.gripper.torque_limit` | `0.5` | Grip force: peak gripper torque (Nm), at most `5`. | | `\--robot_config.axol_config.left.gripper.max_speed` | `10.0` | Maximum gripper speed (rad/s). | | `\--robot_config.axol_config.left.elbow.kp` | per joint | Position stiffness of one joint at stiffness `1`, in `[0, 500]`. | | `\--robot_config.axol_config.left.elbow.kd` | per joint | Velocity damping in the motor firmware, in `[0, 5]`. | | `\--robot_config.axol_config.left.elbow.kd_host` | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. `0` on joints whose firmware damping is enough. | | `\--robot_config.axol_config.left.elbow.kd_host_hz` | `null` | Centre frequency (Hz) of the band the host damping acts in. `null` follows the arm's pose. | | `\--robot_config.axol_config.left.elbow.kd_host_q` | `null` | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`. | | `\--robot_config.axol_config.left.elbow.j_eff` | per joint | Effective inertia (kg·m²) used for acceleration feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_gain` | `0.0` | Push toward the target while the joint is stuck, as a fraction of `friction.fc`. It fades out once the joint slides, and `0` turns it off. | | `\--robot_config.axol_config.left.elbow.stiction_load_gain` | `0.0` | Part of that push that grows with load, in Nm per Nm of the joint's gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stiction_err_deg` | `0.1` | Position error (degrees) at which that push reaches full strength. | | `\--robot_config.axol_config.left.elbow.dither_nm` | `0.0` | Peak amplitude (Nm) of a sinusoidal torque dither that keeps a geared joint from sticking. `0` is off. | | `\--robot_config.axol_config.left.elbow.dither_hz` | `60.0` | Dither frequency (Hz). Keep it above the arm's structural modes (about 35 Hz) and below the core's 120 Hz Nyquist limit. | | `\--robot_config.axol_config.left.elbow.stribeck_gain` | `0.0` | Friction cancellation based on measured velocity, as a fraction of the measured static-minus-sliding friction excess. `0` is off. | | `\--robot_config.axol_config.left.elbow.stribeck_dfs` | `0.3` | Static-minus-sliding friction excess (Nm) at zero gravity load. | | `\--robot_config.axol_config.left.elbow.stribeck_load_gain` | `0.1` | Growth of that excess per Nm of gravity feed-forward. | | `\--robot_config.axol_config.left.elbow.stribeck_vs` | `0.1` | Speed (rad/s) at which the excess has fallen to 1/e. | | `\--robot_config.axol_config.left.elbow.stribeck_pole` | `20.0` | Low-pass pole (rad/s) on the measured velocity the term uses. Higher values follow fast changes better but add encoder noise to the torque. | | `\--robot_config.axol_config.left.elbow.wire_mode` | `mit` | How the core commands the joint while tracking: `mit` (impedance), `a4` (a MyActuator joint's own position loop) or `pv` (a Damiao wrist's position-velocity mode). | | `\--robot_config.axol_config.left.elbow.mass` | 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). | | `\--robot_config.axol_config.left.elbow.com` | per joint | Centre of mass `[x, y, z]` (m) of the link. | | `\--robot_config.axol_config.left.elbow.friction.fc` | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction). | | `\--robot_config.axol_config.left.elbow.friction.k` | per motor | Friction curve sharpness. | | `\--robot_config.axol_config.left.elbow.friction.fv` | per motor | Viscous friction (Nm·s/rad). | | `\--robot_config.axol_config.left.elbow.friction.fo` | per motor | Constant torque offset (Nm). | | `\--robot_config.axol_config.left.elbow.friction.fl` | `0.0` | Coulomb friction that grows with load, in Nm per Nm of gravity feed-forward. The effective `fc` is `fc + fl × abs(gravity)`, and `0` keeps `fc` constant. | | `\--robot_config.axol_config.left.elbow.firmware.position_kp` | `null` | Proportional gain of the firmware position loop (MyActuator 0x30 index 0x07, Damiao register KP\_APR). `null` keeps the motor's stored value. | | `\--robot_config.axol_config.left.elbow.firmware.position_ki` | `null` | Integral gain of the firmware position loop. Leave it at the stock `0`, because together with the speed integrator it hunts around the target. | | `\--robot_config.axol_config.left.elbow.firmware.position_kd` | `null` | Derivative gain of the firmware position loop (protocol V4.2 and later). The 0xA4 loop on the X8-P20 doesn't respond to it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_kp` | `null` | Proportional gain of the firmware speed loop. Higher values make the loop's resonance (about 100 Hz on the X8-P20, 135 Hz on the X6-P20) louder until it goes unstable, so lower is quieter. | | `\--robot_config.axol_config.left.elbow.firmware.profile_acc` | `null` | **Damiao wrists only.** Acceleration (rad/s²) of the position-velocity profiler. The stock `2` can't keep up with the 200 Hz stream, and `50` follows it. | | `\--robot_config.axol_config.left.elbow.firmware.speed_ki` | `null` | Integral gain of the firmware speed loop. Values below the stock `1e-4` are smoother on a geared joint, because the integrator winds up while the joint is stuck. | | `\--robot_config.axol_config.left.elbow.firmware.planner_accel` | `null` | **MyActuator `a4` joints only.** Acceleration and deceleration (dps/s) of the 0xA4 position planner. Only `0` (direct tracking) and `60000` (each step finished within one tick) are accepted. | | `\--robot_config.axol_config.left.elbow.firmware.cap_track` | `null` | **0xA4 joints with the planner on.** Sets each tick's speed cap to this multiple of the commanded speed (`1.1` to `1.2` works well). Leave it unset for direct tracking. | | `\--robot_config.axol_config.left.elbow.firmware.tf_rated_current_a` | `null` | **MyActuator `a4` joints.** The motor's rated current (A), from the datasheet or [`tune.a4 --tf-probe`](/cli/tune-a4). When set, the core adds gravity and inertia torque feed-forward to the position command. | | `\--robot_config.axol_config.left.elbow.impedance_hz` | `null` | This joint's impedance command rate: `480.0`, `240.0`, or `null` to follow `impedance_hz` above. | 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. > [accordion] Controller and command rates > > **Position controller.** `controller` `position` sets every joint to its firmware position loop (`a4` on the MyActuator joints, `pv` on the Damiao wrists) and uses the `firmware.*` gains. It is stiff: there is no compliance and no host feed-forward. Teleop takes `--axol.controller position`, and recorded-motion replays take `--controller` ([`tune.motion`](/cli/tune-motion)). > > At 400 Hz the bus can't carry every motor every tick: > > * The MyActuator joints are commanded every tick. > * The two wrists are commanded on alternate ticks, 200 Hz each. > * One precise position read per tick rotates through the MyActuator joints and the gripper, about 67 Hz each. > > **Impedance rates.** Impedance joints run at 240 Hz. An arm that mixes impedance joints with firmware-loop joints runs its core at 480 Hz, with each impedance joint on alternate ticks. Any other core rate with an impedance joint on the arm is refused. Under `impedance`, a `wire_mode` you set on a joint is kept. > > With `impedance_hz` at `480.0`, or any joint's own `impedance_hz` at `480.0`, the arm's core runs at 480 Hz. The 480 Hz joints are commanded every tick, and the other impedance joints, including the Damiao wrists, on alternate ticks. `tune.motion --impedance-hz 480` and `tune.motion --fast-impedance right.shoulder_1` set these for one run. > [accordion] Wrist temperature limit > > The wrist motors (`wrist_2` and `wrist_3`) are rated for 3.5 Nm continuous. Held harder for long, for example pressing on something or squeezing a box, they heat up until the motor turns itself off and the wrist goes limp. The temperature limit prevents that: > > 1. When a wrist's coil reaches `coil_limit_c`, or its driver reaches `driver_limit_c`, its torque comes down to `cool_torque_nm` over `ramp_s`. > 2. The torque stays low until both have cooled to their resume temperatures. Expect a few minutes. > 3. Then the full torque comes back over `ramp_s`. > > While a wrist cools it gives way to anything it pushes on, and it still holds the gripper up. The session log shows a warning when its torque comes down, and a second one if it keeps heating. If you see the second, let the arm rest. > > The limit works on wrists running the default `mit` mode. A wrist on `pv` has no limit. > [accordion] Firmware position loops (a4 and pv) > > * A joint on `a4` or `pv` has no compliance and no host feed-forward. > * An `a4` joint's torque reads NaN, so the contact stop can't see that joint. A `pv` wrist keeps its torque reading. > * The gripper, gravity compensation and the limp fallback always use `mit`. On X6-P20 motors with the 2025-07 firmware, an `a4` joint that was hand-guided needs a re-enable before it tracks again. > * On `pv`, the core sets the Damiao control mode at bring-up and switches it back to MIT for limp and gravity compensation. > > **Firmware gains.** The `firmware.*` fields are the motor's own position and speed loops. They act only while a joint runs a firmware loop, so every joint leaves them `null` by default and bring-up keeps the motors' stored values. When set, a gain is written to the motor's ROM at enable. Find values with [`tune.a4`](/cli/tune-a4). > > * `planner_accel` at `60000` works best with `cap_track`. Values in between would re-plan every target so the joint barely moves, and are refused. > * `cap_track` is sent to the realtime core, not written to the motor. > * `tf_rated_current_a` needs firmware with command 0x73 (VersionDate 2026042402 or later) and direct tracking (`planner_accel` `0`). Elsewhere the joint stays on plain 0xA4 and the core logs why. > [accordion] Stiction, dither and Stribeck terms > > These feed-forward terms target slow-motion stick-slip on geared joints. All are off by default. > > * **Stiction push.** The peak push is `stiction_gain × fc + stiction_load_gain × abs(gravity)`. It fades on measured velocity and is gone above about 0.05 rad/s, so it never drives the slip. Keep `stiction_gain` below the breakaway-to-`fc` ratio that [`tune.breakaway`](/cli/tune-breakaway) measures. > * **Dither.** Start `dither_nm` at 1 to 2 Nm on a shoulder. The dither is audible. > * **Stribeck cancellation.** The term is `stribeck_gain × (stribeck_dfs + stribeck_load_gain × abs(gravity)) × exp(−(v/stribeck_vs)²) × tanh(v/0.02)`, so it is zero at rest. Raise `stribeck_gain` from 0.5 toward 0.9, and stop when the arm's 3 Hz mode grows. > * **Stribeck pole.** `20` is smooth but lags a fast surge. `40` to `80` follows it more closely but adds encoder noise to the torque. > [accordion] Per-joint defaults > > Both arms share these. `kp` and `kd` are the values at stiffness `1` (the default), and the **soft** columns are what stiffness `0` blends toward. `shoulder_1` sets `kd_host_q` to 3, and every other joint leaves `kd_host_hz` and `kd_host_q` at `null`. No joint runs the Stribeck cancellation by default. > > | 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 | 2.25 | 0 | 0 | 0.65 | 25 | 1.5 | > | `wrist_3` | 130 | 2.0 | 0 | 0 | 0.75 | 25 | 0.9 | > > **Slow-motion gains.** A joint whose calibration includes its own slow-profile friction fit runs the stiffer set below. [`tune.factory`](/cli/tune-factory) writes that fit by default, and so does [`tune.friction --profile slow --save`](/cli/tune-friction). These gains oscillate on a joint that still uses the fallback friction, so an uncalibrated joint keeps the table above. > > | Joint | `kp` | `kd` | `kd_host` | `kd_host_hz` / `kd_host_q` | `stribeck_gain` / `stribeck_pole` | > | - | - | - | - | - | - | > | `shoulder_1` | 450 | 5.0 | 110 | 2.6 / 1.0 | 0.8 / 40 | > | `shoulder_2` | 500 | 5.0 | 70 | `null` / `null` | 0.8 / 40 | > | `elbow` | 200 | 5.0 | 10 | 1.6 / 1.5 | 0.8 / 40 | > > Gains saved in the joint's own calibration entry still override these, for example from `tune.pid --save` or the friction fit's `stribeck_gain`. > [accordion] Per-motor friction defaults > > Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on a reference robot with [`tune.friction`](/cli/tune-friction). A joint's slow-profile friction (`fl` and the Stribeck excess) comes only from its own calibration. There is no fallback for it, so calibrate each robot. > > | 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` | # Teleoperation Source: https://docs.almond.bot/operations/teleop Drive Axol's arms from a Meta Quest headset, or test the Mantis grippers from their triggers. Teleoperation drives Axol's arms live from a Meta Quest headset. You can drive the real robot or the browser **sim**. With **Mantis** selected, teleoperation drives only the two grippers from the rig triggers. Start it from the web control panel or with `axol teleop`. ## Before you start * Install Axol with the [one-command install](/installation) on the Host Computer. For sim, a [development install](/advanced/development-install) is enough. * Select and connect the device. In the control panel, press **Use for operations** on the **Axol** or **Mantis** card on **Devices**. The panel brings up CAN and checks the motors when it connects. On the CLI, run [`axol can.setup`](/cli/can-setup) once. * For Axol, have a Meta Quest with the [TLS certificate authorized](#authorize-the-tls-certificate). Mantis teleoperation needs no headset. * For Mantis, finish the [hardware setup](/mantis/hardware). Tracking is not used here, so you don't need [Mantis Tracking](/mantis/tracking) yet. > [!NOTE] > > Sim needs no CAN setup or motor check. ## Authorize the TLS certificate The VR app connects to the robot over HTTPS with a self-signed certificate. Approve it once in each headset's browser, or the connection fails without an error. 1. In the VR app, press **Connect**. 2. If the certificate isn't approved yet, the connection fails and an **Authorize certificate** button appears. Tap it. 3. Proceed past the warning in the popup. The app reconnects. To approve it by hand instead, open `https://.local:8000` or `https://:8000` in the headset browser and proceed past the warning. ## Run it > [tab] Axol > > **1. Connect the host and robot** > > Open the control panel and connect the **Host Computer**. With **Axol** selected, the panel connects the robot and runs `can.setup` the first time. If its card isn't green, press **Connect** on it. For sim, skip the robot connection. See [Connections](/guides/control-panel#connections). > > **2. Assign cameras (optional)** > > To see the camera feeds in the headset, open **Axol settings → Cameras** and assign the ZED cameras to the overhead, left arm and right arm slots. See [Cameras](/guides/control-panel#cameras). > > **3. Select Teleoperation and Start** > > Pick **Teleoperation** from the operation selector. Turn on **sim** to drive the browser visualizer instead of the robot. Press **Start**. > > **4. Connect the headset** > > Put on the Quest and open [axol.almond.bot](https://axol.almond.bot). Enter the host's address, press **Connect**, then press **Start**. Press both grips together to engage the arms. See the [controller layout](#quest-controller-layout). > > **From the CLI**, on the Host Computer: > > ```bash theme={null} > axol teleop > ``` > > To drive the sim, add `--sim`. This opens a visualizer at [http://localhost:8002](http://localhost:8002) and runs the same VR server on port 8000. Use it to check the network and tracking before you power the robot. > > ```bash theme={null} > axol teleop --sim > ``` > > The terminal prints the hostname and IP address. In the headset, open [axol.almond.bot](https://axol.almond.bot), enter either address, press **Connect**, then press **Start**. > > > [!TIP] > > > > To show the ZED camera feeds in the headset, pass their serial numbers: `--cameras "{overhead: 41234567, left_arm: 41234568, right_arm: 41234569}"`. You can move and resize each feed with the controllers. See [Camera views](/guides/vr-interface#camera-views). > > See [`teleop`](/cli/teleop) for every flag, including stiffness, gripper limits, per-joint gains and config files. > [tab] Mantis > > Mantis teleoperation drives the two grippers from the rig triggers. It uses no tracking, headset or cameras. Use it to check the hub wiring, the left and right mapping, and the grippers. To record tracked Mantis data, use [data collection](/operations/data-collection). > > **1. Select and connect Mantis** > > Press **Use for operations** on the **Mantis** card. The panel connects the rigs, or you can press **Connect**. The card shows the CAN health of both grippers. If you haven't checked the side mapping yet, do that first. See [Mantis Hardware](/mantis/hardware#selecting-and-connecting-mantis). > > **2. Start and check the grippers** > > Pick **Teleoperation** and press **Start**. Mantis has no sim or Jelly option. > > When both triggers report in and are released, the grippers open to their hard stops. Keep your hands clear. Each trigger then closes its gripper in proportion to how far you squeeze it. > > * Squeeze the **left** trigger. If the **right** gripper moves, swap the CAN side mapping. > * If a fully squeezed trigger doesn't fully close its gripper, [check its full-squeeze endpoint](/mantis/hardware#testing-the-triggers-and-grippers). > > A faulted gripper or a trigger that stops reporting stops the run. **Stop** turns off both grippers. > > **From the CLI**, using the channel map saved in **Mantis settings**: > > ```bash theme={null} > axol teleop --mantis > ``` > > To track the rigs, finish [Mantis Tracking](/mantis/tracking), then run [data collection](/operations/data-collection). ## Quest controller layout These bindings are for Axol. For the Mantis gestures used in data collection, see [Start gesture and recovery](/mantis/tracking#start-gesture-and-recovery). ![Quest controller diagram](https://mintcdn.com/almondbot/QoFJerlOUFU8RmP8/assets/quest.png?fit=max\&auto=format\&n=QoFJerlOUFU8RmP8\&q=85\&s=5e7d85aeb3afa2639107ac9ebc6bdd8f) | # | Button | Action | | - | - | - | | 1 | Left grip | Press both grips together to **engage** both arms. After that, each grip freezes or resumes the arm on its side. | | 2 | Right grip | Same as the left grip. | | 3 | Left trigger | Close the left gripper. | | 4 | Right trigger | Close the right gripper. | | 5 | X | **Reset**: return both arms to the rest pose. Also returns the arms home from a contact hold. | | 7 | Y | **Exit AR**: close the VR session. The arms return to rest. | ### Engaging and freezing * From rest, press both grips together to start moving the arms. * After that, a click on one grip freezes or resumes that arm only. A frozen arm holds its pose and its grasp, which helps steady a grasped object. * A reset, a contact stop or a dropped link disengages both arms. Press both grips again to re-engage. To move an arm only while you hold its grip, turn on **Hold grips to engage** (`--teleop.hold_to_engage`). Each grip then engages the arm on its side, from rest too, and releasing the grip freezes that arm. After a forced disengage, release any grip you were still holding before it engages again. ### Controller haptics While an arm is engaged, its controller vibrates to tell you what the arm feels. | You feel | What it means | | - | - | | Short ticks that speed up | The arm is getting close to Axol's body or mount. At the fastest ticks, the arm stops following your hand toward the body. Off by default. | | Throbs that grow stronger and faster | The arm is pushing on something, such as the table or a wall. The harder it pushes, the stronger and closer together the throbs, up to a steady rumble. Real robot only. | A frozen arm's controller stays quiet. * Turn on the ticks with **Ticks near the body** in **Axol settings → Teleop & VR** (`--teleop.haptic_near true`), or with **Body ticks** in the headset's session settings. * Turn all vibration off with **Controller haptics** (`--teleop.haptics false`), or with **Haptics** in the headset. The throbs start when a joint meets 6 Nm of unexpected torque. They become a steady, full-strength rumble at 2.5 times that (15 Nm). If the controllers rumble during normal moves, raise **Haptic push torque** (`--teleop.haptic_torque`). Set `0` to turn the throbs off. The weight of what a gripper holds doesn't make its controller rumble, with either gripper. * Axol treats a gripper as holding something while you hold its trigger past halfway, or while box mode is on. * It learns the weight as you lift. Opening the gripper or leaving box mode clears it. * Pushing the held object down onto a surface doesn't rumble, because Axol can't tell that push from extra weight. * To feel the full load instead, turn off **Ignore held weight** (`--teleop.haptic_held_load false`). In box mode, the squeeze does rumble. As you close the grip width onto a box, the throbs start once a joint meets **Haptic push torque** and grow as you close further. A wrist that reaches its box-mode torque limit throbs at full strength. Back the width off until the throbs stop, or set **Squeeze force** to cap the clamp (see [Box mode](/guides/vr-interface#box-mode)). ## Safety behavior ### Starting Teleoperation, data collection, DAgger, run policy and replay refuse to start while `shoulder_1`, `shoulder_2` or `elbow` on either arm is more than 25° from zero (the pose the arms settle into when the motors are off). `shoulder_3` and the wrist joints can start anywhere. The error names each joint that is out of range. Move the arms back by hand, for example under `axol gravity-comp`, then start again. Once the check passes, the arms move to zero and then out to the rest pose. `collect-dagger --start_from_current_pose` skips this check unless `--home_on_start` is also set. ### Returning to rest On the real robot, every return to rest is guarded, including the **X** reset and the first move at startup. If an arm meets resistance, such as a held object or a person, the move stops. 1. The arms go limp in a **gravity-compensation hold**. 2. Guide them clear by hand. 3. Press **X** to plan a new return from where they are. The hold has no timeout. If you leave VR or the link drops, the arms stay limp until you put the headset back on and press **X**. Set the sensitivity with **Return-to-rest contact stop** in **Axol settings → Robot** (`--teleop.reset_torque_threshold`). `0` turns the check off. Sim has no torque feedback, so it has no guard. ### Contact stop while driving You can also stop the arms when they push hard while you drive them. This check is off by default, because teleoperation often pushes on the scene on purpose. Set **Teleop contact stop** in **Axol settings → Robot** (`--teleop.teleop_torque_threshold`). The panel suggests `16` Nm. When a joint pushes past the threshold for a moment, tracking disengages and the arms go limp in the same hold. Guide them clear, then press **X** to return to rest. This works on the real robot only. ### Hot wrists When a wrist motor gets hot, Axol lowers that wrist's torque until it cools, then restores it. While it cools, the wrist gives way to what it pushes on. The session log shows `wrist_2 is hot` or `wrist_3 is hot`. Back off and let the arm rest. To change the temperatures, see **Wrist temperature limit** in the [config parameters](/operations/teleop-config). ### Losing the link If pose updates stop while the arms are engaged, the arms freeze in place after about half a second. This happens when you take off the headset, open the system menu, quit the VR app or lose the network. The arms hold that pose until you come back. Re-entering VR doesn't move the arms. Press both grips to re-engage, and tracking resumes from where the arms are. Press **X** to send them to the rest pose. ### Stopping When you press **Stop** in the control panel or `Ctrl+C` on the CLI, the arms return to the rest pose. With **Park to zero on stop** on (`--teleop.park_to_zero`, the default), they then move to zero and hang straight down, holding their grasp. Only then do the motors turn off, so the arms don't drop. * Each move is guarded like a return to rest. The move to rest can take up to 6 s and the move to zero up to 10 s. * If a move times out or hits something, the motors turn off where the arms are. * Press `Ctrl+C` again to stop the park where it is. * Axol skips the park in `--sim`, while the arms are limp in a contact hold, and when the IK planner or the CAN feedback has failed. Turn off **Park to zero on stop** to stop at the rest pose. If the arms are not at rest when you press **Stop** in the control panel, it asks what they should do: | Choice | What happens | | - | - | | **Go to rest** | The arms park as described above, then the motors turn off. | | **Hold position** | The arms stay where they are and the motors stay on. | | **Gravity comp** | The arms stay where they are, then [Gravity compensation](/operations/gravity-comp) starts so you can move them by hand. | Press **Keep running** to go back to teleop. `Ctrl+C` on the CLI always parks the arms. ### Driving Jelly On Axol on Jelly, the thumbsticks drive Jelly's base and lift. See [Jelly](/guides/vr-interface#jelly). Axol detects Jelly from the CAN devices that are attached. * To leave attached Jelly hardware out, turn off **Jelly wheels** or **Jelly lift** in the Robot tab, or pass [`--jelly.wheels false` or `--jelly.lift false`](/cli/teleop). * To drive only Jelly, turn off **Axol arms**, or run [`axol teleop --arms false`](/cli/teleop). * If teleop stops with `Nothing to drive.`, every part is switched off or not attached. The error names the switch to turn on. Lowering the lift brings Jelly's deck up toward the arms. Axol keeps the arms off it: * An arm that isn't tracking your hand moves up and forward out of the deck's way as the lift lowers. This includes arms at rest and frozen arms. * With the lift lowered, a return to rest (X) ends with the arms raised over the deck instead of hanging into it. * An engaged arm pressed down onto the deck stays at that height when you move it past the deck's edge. Raise your hand to raise the arm. ## Network tip If VR tracking feels jittery or arrives in bursts, set these on your router or access point: | Setting | Value | | - | - | | DTIM interval | `1` | | Beacon interval | `100` ms | | WMM APSD (U-APSD) | disabled | These settings stop the access point from holding packets between beacons, which causes latency spikes in VR. ## Latency tuning Teleoperation smooths the pose stream before it reaches the arms, so tracking glitches and network jitter don't shake them. With the defaults, the arm lags your hand by about 100 to 120 ms on a clean link. Each setting below is a CLI flag or a [config file](/cli/configuration) field. | Flag | Default | What it does | Delay it adds | | - | - | - | - | | `--vr_server.interp_smooth_window_s` | `0.12` | Smooths the pose and removes short tracking glitches. | Half the window: 60 ms at the default. The largest delay. | | `--vr_server.interp_max_delay_s` | `0.15` | Caps the buffer that evens out bursty network delivery. | None on a clean link. Grows only while the network is jittery. | | `--teleop.pose_cutoff` | `2.5` | Filters hand tremor out of the VR poses (Hz). | About 40 ms. | | `--teleop.ik_alpha` | `0.3` | Smooths the joint targets. | About 19 ms at the default, 8 ms at `0.5`. | If teleoperation feels too slow, change one setting at a time, in this order, and test each on the real robot. The same smoothing makes contact-heavy work such as deburring or insertion feel steady. 1. `--vr_server.interp_smooth_window_s 0.08` saves 20 ms and still removes most short glitches. 2. `--teleop.ik_alpha 0.4` saves a few ms with little loss of smoothness. 3. `--teleop.pose_cutoff 3.5` cuts filter delay but lets more hand tremor through. Watch for joint jitter. 4. `--vr_server.interp_smooth_window_s 0` turns the smoother off. Use it only over a [USB connection](/guides/quest-over-usb) with well-tracked controllers. > [!NOTE] > > The network buffer only adds delay while the network is bursty. For network lag, a [USB connection](/guides/quest-over-usb) and the [router settings](#network-tip) help more than any setting here. > > If the headset's Wi-Fi stalls and then delivers a backlog, the arms don't replay the late motion. They hold, then move to your current pose when on-time frames resume. A frame counts as late when it arrives more than `--vr_server.interp_max_lag_s` behind (default `0.5` s, `0` turns this off). The log shows `VR pose stream arriving … late` when a stall starts and `VR pose stream on time again after …` when it ends. > > The arms also hold when the delay creeps up over a long session, as can happen on a slow link between continents. If they stay held, press **Y** to exit VR, then enter it again. ## Next steps > [card] [Config Parameters](/operations/teleop-config) > > Every setting for teleop, with its default. > [card] [Remote Teleop](/guides/remote-teleop) > > Drive the robot over the internet from anywhere with Tailscale. > [card] [Data Collection](/operations/data-collection) > > Record teleoperation episodes to a LeRobot dataset. # Teleoperation Config Parameters Source: https://docs.almond.bot/operations/teleop-config Every setting for axol teleop, what it does and its default. Every setting for `axol teleop`. 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. The [shared settings file](/guides/control-panel-settings) (`~/.almond/settings.json`) is read by default. In it, the `axol`, `teleop`, `kinematics`, `vr_server` and `jelly` sections use the same names as below. `--left_channel` and `--right_channel` live under `robot`, and `--log_level` under `system`. ```bash theme={null} axol teleop --axol.left_stiffness 0.8 --teleop.position_multiplier 1.5 ``` ## General | Flag | Default | Description | | - | - | - | | `--sim` | `false` | Drive the browser visualiser instead of the robot. Robot gains and CAN channels are ignored. | | `--mantis` | `false` | Drive the Mantis rigs' grippers from their triggers instead of the robot. | | `--arms` | `true` | Drive the Axol arms. `false` drives only Jelly. Axol also skips the arms when only Jelly's CAN interfaces are present. | | `--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. | | `--cameras` | `{}` | Cameras to stream to the headset, as slot and serial number: `"{overhead: 41234567, left_arm: 41234568}"`. Empty means no video. | | `--camera_eyes` | `{}` | Which eyes of each stereo camera to stream: `"{overhead: both, left_arm: left}"`. By default the overhead streams both eyes and the wrists the left eye. | | `--resolution` | `null` | Capture resolution for all cameras: `SVGA`, `HD1080`, or `HD1200`. `null` keeps the camera default. | | `--log_level` | `INFO` | `DEBUG`, `INFO`, `WARNING`, or `ERROR`. | | `--config_path` | none | Load a JSON or YAML config file. Flags override it. | | `--settings_path` / `--no_settings` | `~/.almond/settings.json` | Read another [shared settings file](/cli/configuration#the-shared-settings-file), or ignore it. The config file and flags override it. | ## Robot Arm stiffness, gripper limits, and per-joint gains. Ignored with `--sim`. | Flag | Default | Description | | - | - | - | | `\--axol.left_stiffness` | `1.0` | How stiff the left arm is, from `0` (soft, hand-guidable) to `1` (the tuned gains). One number sets every joint, and a 7-element list sets each joint in the order `shoulder_1, shoulder_2, shoulder_3, elbow, wrist_1, wrist_2, wrist_3`. | | `\--axol.right_stiffness` | `1.0` | Same, for the right arm. | | `\--axol.has_gripper` | `true` | Set `false` on the gripperless model. The gripper motors are never enabled and datasets record 7 channels per arm instead of 8. | | `\--axol.gripper` | `parallel` | Which gripper is fitted: `parallel` (the stock two-finger gripper) or `parcel` (the hinged-plate parcel gripper). Box mode works only with `parcel`. | | `\--axol.max_step_rad` | `0.5` | Largest joint move (rad) allowed between two consecutive commands. Bigger moves are dropped with a warning. `inf` disables. | | `\--axol.controller` | `impedance` | Control law for the arms. `impedance` is compliant and runs at 240 Hz, and `position` hands each joint to its motor's own position loop at 400 Hz (see the notes below). | | `\--axol.impedance_hz` | `240.0` | Command rate (Hz) of the MyActuator impedance joints: `240.0` or the experimental `480.0`. The gains were tuned at 240 Hz. | | `\--axol.wrist_thermal.enabled` | `true` | Lower a wrist's torque while it cools down when `wrist_2` or `wrist_3` gets hot. See the notes below. `false` turns it off. | | `\--axol.wrist_thermal.coil_limit_c` | `75.0` | Motor coil temperature (°C) at which the wrist's torque starts to come down. The motor turns itself off at 100 °C. | | `\--axol.wrist_thermal.coil_resume_c` | `65.0` | Coil temperature (°C) the wrist must cool to before its full torque comes back. | | `\--axol.wrist_thermal.driver_limit_c` | `105.0` | Motor driver temperature (°C) at which the torque starts to come down. The driver turns itself off at 120 °C. | | `\--axol.wrist_thermal.driver_resume_c` | `95.0` | Driver temperature (°C) the wrist must cool to before its full torque comes back. | | `\--axol.wrist_thermal.cool_torque_nm` | `1.5` | Torque (Nm) the wrist is held to while it cools. The motor is rated for 3.5 Nm continuous. | | `\--axol.wrist_thermal.ramp_s` | `0.25` | Seconds over which the torque comes down, and later comes back. | | `\--axol.left.gripper.torque_limit` | `0.5` | Grip force: peak gripper torque (Nm), at most `5`. | | `\--axol.left.gripper.max_speed` | `10.0` | Maximum gripper speed (rad/s). | | `\--axol.left.elbow.kp` | per joint | Position stiffness of one joint at stiffness `1`, in `[0, 500]`. | | `\--axol.left.elbow.kd` | per joint | Velocity damping in the motor firmware, in `[0, 5]`. | | `\--axol.left.elbow.kd_host` | per joint | Extra damping (Nm·s/rad) applied by the host, for the slow shoulder resonance the firmware can't damp. `0` on joints whose firmware damping is enough. | | `\--axol.left.elbow.kd_host_hz` | `null` | Centre frequency (Hz) of the band the host damping acts in. `null` follows the arm's pose. | | `\--axol.left.elbow.kd_host_q` | `null` | Width of that band (bandwidth = centre ÷ q). `null` uses `0.8`. | | `\--axol.left.elbow.j_eff` | per joint | Effective inertia (kg·m²) used for acceleration feed-forward. | | `\--axol.left.elbow.stiction_gain` | `0.0` | Push toward the target while the joint is stuck, as a fraction of `friction.fc`. It fades out once the joint slides, and `0` turns it off. | | `\--axol.left.elbow.stiction_load_gain` | `0.0` | Part of that push that grows with load, in Nm per Nm of the joint's gravity feed-forward. | | `\--axol.left.elbow.stiction_err_deg` | `0.1` | Position error (degrees) at which that push reaches full strength. | | `\--axol.left.elbow.dither_nm` | `0.0` | Peak amplitude (Nm) of a sinusoidal torque dither that keeps a geared joint from sticking. `0` is off. | | `\--axol.left.elbow.dither_hz` | `60.0` | Dither frequency (Hz). Keep it above the arm's structural modes (about 35 Hz) and below the core's 120 Hz Nyquist limit. | | `\--axol.left.elbow.stribeck_gain` | `0.0` | Friction cancellation based on measured velocity, as a fraction of the measured static-minus-sliding friction excess. `0` is off. | | `\--axol.left.elbow.stribeck_dfs` | `0.3` | Static-minus-sliding friction excess (Nm) at zero gravity load. | | `\--axol.left.elbow.stribeck_load_gain` | `0.1` | Growth of that excess per Nm of gravity feed-forward. | | `\--axol.left.elbow.stribeck_vs` | `0.1` | Speed (rad/s) at which the excess has fallen to 1/e. | | `\--axol.left.elbow.stribeck_pole` | `20.0` | Low-pass pole (rad/s) on the measured velocity the term uses. Higher values follow fast changes better but add encoder noise to the torque. | | `\--axol.left.elbow.wire_mode` | `mit` | How the core commands the joint while tracking: `mit` (impedance), `a4` (a MyActuator joint's own position loop) or `pv` (a Damiao wrist's position-velocity mode). | | `\--axol.left.elbow.mass` | 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). | | `\--axol.left.elbow.com` | per joint | Centre of mass `[x, y, z]` (m) of the link. | | `\--axol.left.elbow.friction.fc` | per motor | Coulomb friction (Nm). Measured per motor with [`tune.friction`](/cli/tune-friction). | | `\--axol.left.elbow.friction.k` | per motor | Friction curve sharpness. | | `\--axol.left.elbow.friction.fv` | per motor | Viscous friction (Nm·s/rad). | | `\--axol.left.elbow.friction.fo` | per motor | Constant torque offset (Nm). | | `\--axol.left.elbow.friction.fl` | `0.0` | Coulomb friction that grows with load, in Nm per Nm of gravity feed-forward. The effective `fc` is `fc + fl × abs(gravity)`, and `0` keeps `fc` constant. | | `\--axol.left.elbow.firmware.position_kp` | `null` | Proportional gain of the firmware position loop (MyActuator 0x30 index 0x07, Damiao register KP\_APR). `null` keeps the motor's stored value. | | `\--axol.left.elbow.firmware.position_ki` | `null` | Integral gain of the firmware position loop. Leave it at the stock `0`, because together with the speed integrator it hunts around the target. | | `\--axol.left.elbow.firmware.position_kd` | `null` | Derivative gain of the firmware position loop (protocol V4.2 and later). The 0xA4 loop on the X8-P20 doesn't respond to it. | | `\--axol.left.elbow.firmware.speed_kp` | `null` | Proportional gain of the firmware speed loop. Higher values make the loop's resonance (about 100 Hz on the X8-P20, 135 Hz on the X6-P20) louder until it goes unstable, so lower is quieter. | | `\--axol.left.elbow.firmware.profile_acc` | `null` | **Damiao wrists only.** Acceleration (rad/s²) of the position-velocity profiler. The stock `2` can't keep up with the 200 Hz stream, and `50` follows it. | | `\--axol.left.elbow.firmware.speed_ki` | `null` | Integral gain of the firmware speed loop. Values below the stock `1e-4` are smoother on a geared joint, because the integrator winds up while the joint is stuck. | | `\--axol.left.elbow.firmware.planner_accel` | `null` | **MyActuator `a4` joints only.** Acceleration and deceleration (dps/s) of the 0xA4 position planner. Only `0` (direct tracking) and `60000` (each step finished within one tick) are accepted. | | `\--axol.left.elbow.firmware.cap_track` | `null` | **0xA4 joints with the planner on.** Sets each tick's speed cap to this multiple of the commanded speed (`1.1` to `1.2` works well). Leave it unset for direct tracking. | | `\--axol.left.elbow.firmware.tf_rated_current_a` | `null` | **MyActuator `a4` joints.** The motor's rated current (A), from the datasheet or [`tune.a4 --tf-probe`](/cli/tune-a4). When set, the core adds gravity and inertia torque feed-forward to the position command. | | `\--axol.left.elbow.impedance_hz` | `null` | This joint's impedance command rate: `480.0`, `240.0`, or `null` to follow `impedance_hz` above. | 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. > [accordion] Controller and command rates > > **Position controller.** `controller` `position` sets every joint to its firmware position loop (`a4` on the MyActuator joints, `pv` on the Damiao wrists) and uses the `firmware.*` gains. It is stiff: there is no compliance and no host feed-forward. Teleop takes `--axol.controller position`, and recorded-motion replays take `--controller` ([`tune.motion`](/cli/tune-motion)). > > At 400 Hz the bus can't carry every motor every tick: > > * The MyActuator joints are commanded every tick. > * The two wrists are commanded on alternate ticks, 200 Hz each. > * One precise position read per tick rotates through the MyActuator joints and the gripper, about 67 Hz each. > > **Impedance rates.** Impedance joints run at 240 Hz. An arm that mixes impedance joints with firmware-loop joints runs its core at 480 Hz, with each impedance joint on alternate ticks. Any other core rate with an impedance joint on the arm is refused. Under `impedance`, a `wire_mode` you set on a joint is kept. > > With `impedance_hz` at `480.0`, or any joint's own `impedance_hz` at `480.0`, the arm's core runs at 480 Hz. The 480 Hz joints are commanded every tick, and the other impedance joints, including the Damiao wrists, on alternate ticks. `tune.motion --impedance-hz 480` and `tune.motion --fast-impedance right.shoulder_1` set these for one run. > [accordion] Wrist temperature limit > > The wrist motors (`wrist_2` and `wrist_3`) are rated for 3.5 Nm continuous. Held harder for long, for example pressing on something or squeezing a box, they heat up until the motor turns itself off and the wrist goes limp. The temperature limit prevents that: > > 1. When a wrist's coil reaches `coil_limit_c`, or its driver reaches `driver_limit_c`, its torque comes down to `cool_torque_nm` over `ramp_s`. > 2. The torque stays low until both have cooled to their resume temperatures. Expect a few minutes. > 3. Then the full torque comes back over `ramp_s`. > > While a wrist cools it gives way to anything it pushes on, and it still holds the gripper up. The session log shows a warning when its torque comes down, and a second one if it keeps heating. If you see the second, let the arm rest. > > The limit works on wrists running the default `mit` mode. A wrist on `pv` has no limit. > [accordion] Firmware position loops (a4 and pv) > > * A joint on `a4` or `pv` has no compliance and no host feed-forward. > * An `a4` joint's torque reads NaN, so the contact stop can't see that joint. A `pv` wrist keeps its torque reading. > * The gripper, gravity compensation and the limp fallback always use `mit`. On X6-P20 motors with the 2025-07 firmware, an `a4` joint that was hand-guided needs a re-enable before it tracks again. > * On `pv`, the core sets the Damiao control mode at bring-up and switches it back to MIT for limp and gravity compensation. > > **Firmware gains.** The `firmware.*` fields are the motor's own position and speed loops. They act only while a joint runs a firmware loop, so every joint leaves them `null` by default and bring-up keeps the motors' stored values. When set, a gain is written to the motor's ROM at enable. Find values with [`tune.a4`](/cli/tune-a4). > > * `planner_accel` at `60000` works best with `cap_track`. Values in between would re-plan every target so the joint barely moves, and are refused. > * `cap_track` is sent to the realtime core, not written to the motor. > * `tf_rated_current_a` needs firmware with command 0x73 (VersionDate 2026042402 or later) and direct tracking (`planner_accel` `0`). Elsewhere the joint stays on plain 0xA4 and the core logs why. > [accordion] Stiction, dither and Stribeck terms > > These feed-forward terms target slow-motion stick-slip on geared joints. All are off by default. > > * **Stiction push.** The peak push is `stiction_gain × fc + stiction_load_gain × abs(gravity)`. It fades on measured velocity and is gone above about 0.05 rad/s, so it never drives the slip. Keep `stiction_gain` below the breakaway-to-`fc` ratio that [`tune.breakaway`](/cli/tune-breakaway) measures. > * **Dither.** Start `dither_nm` at 1 to 2 Nm on a shoulder. The dither is audible. > * **Stribeck cancellation.** The term is `stribeck_gain × (stribeck_dfs + stribeck_load_gain × abs(gravity)) × exp(−(v/stribeck_vs)²) × tanh(v/0.02)`, so it is zero at rest. Raise `stribeck_gain` from 0.5 toward 0.9, and stop when the arm's 3 Hz mode grows. > * **Stribeck pole.** `20` is smooth but lags a fast surge. `40` to `80` follows it more closely but adds encoder noise to the torque. > [accordion] Per-joint defaults > > Both arms share these. `kp` and `kd` are the values at stiffness `1` (the default), and the **soft** columns are what stiffness `0` blends toward. `shoulder_1` sets `kd_host_q` to 3, and every other joint leaves `kd_host_hz` and `kd_host_q` at `null`. No joint runs the Stribeck cancellation by default. > > | 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 | 2.25 | 0 | 0 | 0.65 | 25 | 1.5 | > | `wrist_3` | 130 | 2.0 | 0 | 0 | 0.75 | 25 | 0.9 | > > **Slow-motion gains.** A joint whose calibration includes its own slow-profile friction fit runs the stiffer set below. [`tune.factory`](/cli/tune-factory) writes that fit by default, and so does [`tune.friction --profile slow --save`](/cli/tune-friction). These gains oscillate on a joint that still uses the fallback friction, so an uncalibrated joint keeps the table above. > > | Joint | `kp` | `kd` | `kd_host` | `kd_host_hz` / `kd_host_q` | `stribeck_gain` / `stribeck_pole` | > | - | - | - | - | - | - | > | `shoulder_1` | 450 | 5.0 | 110 | 2.6 / 1.0 | 0.8 / 40 | > | `shoulder_2` | 500 | 5.0 | 70 | `null` / `null` | 0.8 / 40 | > | `elbow` | 200 | 5.0 | 10 | 1.6 / 1.5 | 0.8 / 40 | > > Gains saved in the joint's own calibration entry still override these, for example from `tune.pid --save` or the friction fit's `stribeck_gain`. > [accordion] Per-motor friction defaults > > Fallback values of `fc`, `k`, `fv`, `fo` for each motor, measured on a reference robot with [`tune.friction`](/cli/tune-friction). A joint's slow-profile friction (`fl` and the Stribeck excess) comes only from its own calibration. There is no fallback for it, so calibrate each robot. > > | 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` | ## Teleop session How VR controller motion becomes arm motion. | Flag | Default | Description | | - | - | - | | `\--teleop.rest_pose_left` | `[−0.157, 0, 0, 0.314, 0, 0, −0.157]` | Left arm rest pose (rad, 7 joints). The arms start here and return here on reset. Edit it visually in the control panel's **Rest pose** tab. | | `\--teleop.rest_pose_right` | `[0.157, 0, 0, −0.314, 0, 0, 0.157]` | Right arm rest pose. | | `\--teleop.frequency` | `120` | Motor command rate (Hz). Data collection sets this from `teleop_hz`. | | `\--teleop.ik_frequency` | `120` | How often VR poses are sent to the IK solver (Hz). The control loop interpolates between solutions. | | `\--teleop.position_multiplier` | `1.0` | Scales hand movement. `2` moves the arm twice as far as your hand. Ignored in `absolute_mode`. | | `\--teleop.rotation_multiplier` | `1.0` | Scales hand rotation the same way. Ignored in `absolute_mode`. | | `\--teleop.hold_to_engage` | `false` | `false`: click both grips to engage, then click a grip to freeze or unfreeze that arm. `true`: each arm tracks only while you hold its own grip, from rest too, and freezes when you release it. | | `\--teleop.park_to_zero` | `true` | On Stop / `Ctrl+C` the arms return to rest and then continue to the all-zero joint pose (hanging straight down), holding their grasp, before the motors are released. `false` stops the park at the rest pose. | | `\--teleop.disengage_timeout` | `0.5` | Seconds without a VR frame before tracking disengages and the arms hold position. `0` disables. | | `\--teleop.record` | `null` | Record every stage of the teleop pipeline to `~/.almond/recordings/_*.npz` for [`motion.build`](/cli/motion-build) and [`diag.offline`](/cli/diag-offline). A bare name like `rec1` goes in that folder; a path is used as-is. | | `\--teleop.reset_speed` | `0.628` | Speed (rad/s) of the return-to-rest move. | | `\--teleop.reset_min_duration` | `1.5` | Minimum duration (s) of a return-to-rest move. | | `\--teleop.reset_rest_weight` | `50.0` | IK weight toward the rest pose when planning a return. | | `\--teleop.reset_limit_weight` | `100.0` | IK weight against joint limits when planning a return. | | `\--teleop.reset_collision_margin` | `0.025` | Minimum self-collision clearance (m) when planning a return. | | `\--teleop.reset_collision_weight` | `100.0` | IK weight on self-collision when planning a return. | | `\--teleop.reset_max_iterations` | `10` | IK iterations per return waypoint. | | `\--teleop.reset_torque_threshold` | `6.0` | **Contact stop during return-to-rest**, in Nm of unexpected torque. If an arm hits something, the move stops and the arms go limp until you press reset. `0` disables (hardware only). | | `\--teleop.teleop_torque_threshold` | `0` (off) | **Contact stop while tracking.** It works the same way and discards a running episode. The control panel sets it to `16` (hardware only). | | `\--teleop.reset_gravity_comp_kd` | `0.25` | Damping (Nm·s/rad) of the limp hold after a contact stop. | | `\--teleop.engage_max_vel` | `0.628` | Joint speed cap (rad/s) right after engaging, so the first move is gentle. | | `\--teleop.engage_duration` | `1.0` | Seconds to ramp from `engage_max_vel` up to `teleop_max_vel`. | | `\--teleop.teleop_max_vel` | `6.283` | Maximum joint speed (rad/s) while tracking. | | `\--teleop.teleop_max_accel` | `9.42` | Maximum joint acceleration (rad/s²) while tracking. | | `\--teleop.ik_alpha` | `0.3` | Smoothing on the IK output, `(0, 1]`. `1` is no smoothing; lower is smoother but adds lag. See [Latency tuning](/operations/teleop#latency-tuning). | | `\--teleop.pose_cutoff` | `2.5` | Low-pass cutoff (Hz) on raw controller poses before IK. Lower rejects more hand tremor but adds lag. | | `\--teleop.absolute_mode` | `false` | Mantis mapping: track controller poses 1:1 in a fixed world frame instead of relative to where you engaged. Forced `true` by `--mantis`. | | `\--teleop.base_height` | `null` | In `absolute_mode`, fix the robot base this many metres above the VR floor instead of inferring it. Keeps datasets consistent across operators. | | `\--teleop.tcp_transform_left` | `null` | *Mantis data collection.* Transform from tracker to gripper, `[x, y, z, qx, qy, qz, qw]`, for the left rig. It is read from the saved calibration, so set it only to override. See [`tracker`](/cli/tracker#transform-file). | | `\--teleop.tcp_transform_right` | `null` | *Mantis data collection.* Same for the right rig. | | `\--teleop.tracker_key` | `null` | *Mantis data collection, Quest.* Which saved calibration to use, e.g. `quest:oculus-touch-v3:grip`. Set from **Mantis settings** in the panel. | | `\--teleop.quest_controller_profile` | `null` | *Mantis data collection, Quest.* Expected controller profile. Filled from `tracker_key`. | | `\--teleop.quest_pose_space` | `null` | *Mantis data collection, Quest.* Expected pose datum, `grip` or `target-ray`. Filled from `tracker_key`. | | `\--teleop.urdf_viewer_world_aligned` | `null` | *Mantis data collection.* Whether the pose source shares the viewer headset's floor. `null` means `true` for Quest, `false` for Lighthouse. | > [!NOTE] > > **Mantis mode** (`--mantis`) forces `absolute_mode: true`, `hold_to_engage: false`, `ik_alpha: 1.0`, `pose_cutoff: 5.0`, and removes the speed and acceleration limits. Your values for these keys are ignored in Mantis mode. ## Kinematics The IK solver that turns hand targets into joint angles. A higher weight means the solver cares more about that term. | Flag | Default | Description | | - | - | - | | `\--kinematics.pos_weight` | `50.0` | Weight on end-effector position error. | | `\--kinematics.ori_weight` | `10.0` | Weight on end-effector orientation error. | | `\--kinematics.elbow_weight` | `0` (off) | Weight on the headset's elbow-position hint. Off by default because the hint is unreliable on hardware. | | `\--kinematics.rest_weight` | `15.0` | Damping toward the current pose. Higher is steadier, lower tracks faster. | | `\--kinematics.posture_weight` | `5.0` | Pull toward the home posture, preventing slow drift. | | `\--kinematics.manipulability_weight` | `0.05` | Keeps the arm away from singular poses. Forced `0` in Mantis mode. | | `\--kinematics.limit_weight` | `75.0` | Penalty on joint-limit violations. | | `\--kinematics.self_collision_margin` | `0.025` | Distance (m) at which self-collision avoidance starts. Keep below the arm–torso clearance of normal poses. | | `\--kinematics.self_collision_weight` | `150.0` | Weight on self-collision avoidance. | | `\--kinematics.max_iterations` | `8` | Solver iterations per IK call. | | `\--kinematics.cost_tolerance` | `1e-4` | Convergence tolerance. Keep small. | | `\--kinematics.lambda_initial` | `1e-2` | Initial Levenberg–Marquardt damping. | | `\--kinematics.lambda_factor` | `10.0` | Damping multiplier after a rejected solver step. | | `\--kinematics.max_joint_delta` | `0.0346` | Largest joint change (rad) per IK call. Raise for faster tracking, lower for gentler motion. | | `\--kinematics.max_reach` | `0.82` | Maximum shoulder-to-target distance (m). Targets beyond it are pulled in. | | `\--kinematics.reach_soft_start` | `0.78` | Distance (m) at which the reach limit starts to act. | | `\--kinematics.manip_damping_threshold` | `0.015` | Below this manipulability, extra damping starts (near full extension). | | `\--kinematics.manip_damping_boost` | `60.0` | Extra damping at zero manipulability. `0` disables. | | `\--kinematics.limit_damping_margin` | `0.12` | Distance (rad) from a joint limit inside which the joint is damped while moving toward it. | | `\--kinematics.elbow_fade_band` | `0.15` | Height (m) above the shoulder over which the elbow hint fades out. | | `\--kinematics.robot_model` | `None` | Axol version to solve for: `classic`, `standalone`, `ox_cart`, `owl` or `mobile` (Axol on Jelly). It sets the joint limits and the body the arms are kept clear of, and `None` picks `mobile` when Jelly is enabled, else `mount`. | | `\--kinematics.mount` | `None` | What Axol is mounted on when Jelly isn't enabled: `classic` (Legacy), `standalone`, `ox_cart` or `owl`, as picked under **Mount** in the control panel. `None` reads `kinematics.mount` from the shared settings, or Legacy if it is unset. | | `\--kinematics.gripper` | `None` | Fitted gripper, `parallel` or `parcel`. Teleop sets it from `--axol.gripper`, and only Axol on Jelly uses it to pick a model. `None` reads `axol.gripper` from the shared settings. | > [!NOTE] > > **Mantis mode** replaces any of these still at their default with `pos_weight 200`, `ori_weight 120`, `manipulability_weight 0`, `self_collision_margin 0.02`, `max_joint_delta 0.05`, `max_iterations 12`. A value you set explicitly still wins. ## VR server The connection the headset streams poses over. | Flag | Default | Description | | - | - | - | | `\--vr_server.port` | `8000` | Port the headset connects to. [Quest-over-USB](/guides/quest-over-usb) uses the same port. | | `\--vr_server.certfile` | `null` | TLS certificate. `null` uses the auto-generated one in `~/.almond/vr/certs/`. | | `\--vr_server.keyfile` | `null` | TLS private key. `null` as above. | | `\--vr_server.interp_enabled` | `true` | Smooth out jittery or batched pose arrivals. `false` uses the latest raw frame. | | `\--vr_server.interp_min_delay_s` | `0` | Minimum playout delay (s). | | `\--vr_server.interp_max_delay_s` | `0.15` | Maximum playout delay (s) spent absorbing network jitter. | | `\--vr_server.interp_smooth_window_s` | `0.12` | Smoothing window (s). Adds about half of it as latency. `0` disables. See [Latency tuning](/operations/teleop#latency-tuning). | | `\--vr_server.interp_outlier_k` | `4.0` | Glitch-rejection threshold. Lower is more aggressive; `≤ 0` disables. | | `\--vr_server.interp_max_lag_s` | `0.5` | Pose frames arriving more than this (s) later than normal are skipped, so the arms hold through a network stall instead of replaying it late. `≤ 0` disables. | | `\--vr_server.pose_source_kind` | `null` | Which pose source may drive: `webxr` (Quest), `tracker` (Lighthouse), or `null` for whichever connects first. Set automatically for Mantis. | | `\--vr_server.expected_pose_source_id` | `null` | *Mantis data collection.* Exact pose-source ID accepted. Set automatically. | ## Jelly Jelly Mobile, the optional powered base with a telescoping lift. You drive it from the headset thumbsticks. Jelly is detected from the CAN devices present, so you never enable it by hand. | Flag | Default | Description | | - | - | - | | `\--jelly.wheels` | `true` | Drive the wheels with the thumbsticks when their CAN interface is attached. `false` leaves attached wheels off. | | `\--jelly.channel` | `can_alm_axol_b` | CAN interface of the wheel motors. `null` means lift only. | | `\--jelly.max_speed` | `20.0` | Peak wheel speed (rad/s) at full stick. | | `\--jelly.turn_scale` | `1.0` | Rotation speed relative to driving speed, `[0, 1]`. | | `\--jelly.slew` | `0.25` | Acceleration ramp, the same both ways. The default takes 4 s from rest to full speed, and as long to stop from it. | | `\--jelly.axis_snap_deg` | `15.0` | Stick directions within this many degrees of straight or sideways snap to exact. `0` disables. | | `\--jelly.deadzone` | `0.15` | Thumbstick deadzone, as a fraction of full deflection. | | `\--jelly.stick_expo` | `0.6` | Thumbstick response curve, `[0, 1]`. `0` is linear; higher keeps more of the stick's travel for slow, fine moves, with full deflection still full speed. At `0.6`, half the travel gives \~28% speed (linear: 50%). | | `\--jelly.imu` | `false` | Use the board IMU to hold a straight heading. | | `\--jelly.yaw_hold_gain` | `2.0` | Heading-hold strength. `0` disables. | | `\--jelly.yaw_hold_max` | `0.3` | Maximum heading-hold correction. | | `\--jelly.yaw_log` | `false` | Log heading-hold data at 10 Hz, for diagnosing drift. | | `\--jelly.hold_kp` | `60.0` | Stiffness (Nm/rad) holding parked wheels in place. `0` only brakes them. | | `\--jelly.hold_kd` | `1.5` | How strongly parked wheels resist rolling (Nm·s/rad), up to `5`. `0` leaves them idle. | | `\--jelly.frequency` | `50.0` | Wheel command rate (Hz). | | `\--jelly.command_timeout` | `0.2` | Seconds without a stick command before Jelly stops. | | `\--jelly.can_timeout_ms` | `200.0` | Motor-side loss-of-comms timeout (ms). Stops the wheels even if the host hangs. | | `\--jelly.lift` | `true` | Run the lift when its CAN bus is attached (right thumbstick, forward and back). `false` leaves an attached lift off. | | `\--jelly.lift_channel` | `null` (auto) | CAN interface of the lift controller. `null` uses the chest bus `can_alm_axol_c` if it exists, otherwise the wheel bus `can_alm_axol_b`. | | `\--jelly.lift_speed` | `650` | Lift speed (encoder counts/s). | # Train a Policy Source: https://docs.almond.bot/operations/train-policy Train a model on your recorded Axol data with the standard LeRobot training tools. Axol records episodes in the [LeRobot dataset format](/api/lerobot), so you train a policy with standard LeRobot training. Record a dataset with [Data Collection](/operations/data-collection), point LeRobot's training script at it, then run the checkpoint on the robot with [Run Policy](/operations/run-policy). Any LeRobot training tutorial applies. Use your own dataset's `repo_id` in place of the tutorial's. The links at the end of this page are good places to start. > [!WARNING] > > Train only on datasets you made or got from a source you trust. Dataset loading is not sandboxed. ## Which policy to train Start with [**ACT** (Action Chunking with Transformers)](https://huggingface.co/docs/lerobot/en/act). It is small (about 80M parameters), trains in a few hours on one GPU, and often works well with about 50 demonstrations. Once you have a working baseline, you can try larger vision-language-action models such as [SmolVLA](https://huggingface.co/docs/lerobot/en/smolvla). ## Train it Install the [`lerobot` extra](/advanced/development-install#optional-extras) on a computer with a CUDA GPU. Then train from your dataset's Hub `repo_id`: ```bash theme={null} lerobot-train \ --dataset.repo_id=${HF_USER}/pick-place \ --policy.type=act \ --output_dir=outputs/train/act_pick_place \ --job_name=act_pick_place \ --policy.device=cuda \ --wandb.enable=true \ --policy.repo_id=${HF_USER}/act_pick_place ``` Checkpoints are written under `outputs/train/.../checkpoints`. With `--policy.repo_id`, the trained policy is also uploaded to the Hub, so the robot and any [inference server](/cli/inference-server) can download it. Plan for a few hours for about 100k steps on one GPU. > [!NOTE] > > No GPU? The ACT tutorial links a [Google Colab notebook](https://huggingface.co/docs/lerobot/en/act#train-using-google-colab) for training in the cloud. ## Mantis datasets: use `axol mantis.train` Episodes recorded with the [Mantis](/mantis/hardware) rigs (`axol collect-data --mantis true`) store absolute gripper poses. Each take's frame is set where the operator engaged. A policy trained on these absolute poses learns positions in that one frame, so it doesn't carry over when the robot starts somewhere else. `axol mantis.train` fixes this. It runs `lerobot-train` with the same flags and checkpoint format, and trains the policy to predict each chunk of actions relative to the pose it starts from. The checkpoint stores this setting, so you run it with `axol run-policy --policy_path ...` as usual. ```bash theme={null} axol mantis.train \ --dataset.repo_id=${HF_USER}/mantis-pick-place \ --policy.type=act \ --output_dir=outputs/train/act_mantis_pick_place \ --job_name=act_mantis_pick_place \ --policy.device=cuda \ --wandb.enable=true \ --policy.repo_id=${HF_USER}/act_mantis_pick_place ``` > [!WARNING] > > Plain `lerobot-train` also runs on a Mantis dataset without errors, but the policy learns fixed positions and doesn't adapt to a different start pose. Use `axol mantis.train` for anything recorded with the rigs. You can also use it on Axol data recorded with `--robot_config.observe_cartesian true` to get the same benefit. * **Train on your own computer.** `axol mantis.train` refuses remote HF Jobs (`--job.target` other than `local`). * **Chunk blending is approximate.** Each relative chunk is tied to the pose it was predicted from. Running each chunk from the queue as predicted is exact. `--aggregate_fn temporal_ensemble` in `run-policy` blends overlapping chunks, which works well in practice but is an approximation. The dataset stays in the standard LeRobot format, so Mantis and on-robot Cartesian episodes can share one dataset. ## LeRobot tutorials > [card] [ACT](https://huggingface.co/docs/lerobot/en/act) > > The recommended first policy: architecture, training and tips. > [card] [Imitation learning walkthrough](https://huggingface.co/docs/lerobot/en/il_robots) > > Record, train and evaluate with `lerobot-train`. > [card] [SmolVLA](https://huggingface.co/docs/lerobot/en/smolvla) > > Fine-tune Hugging Face's small vision-language-action model. > [card] [LeRobot docs](https://huggingface.co/docs/lerobot/en/index) > > Full documentation, models and datasets. ## Next steps > [card] [Run Policy](/operations/run-policy) > > Run your trained checkpoint on the robot. > [card] [Data Collection](/operations/data-collection) > > Record more episodes to improve the policy.