Skip to main content
Control robot arm operations for your device - motion commands, motor control, and position utilities. All positions are in millimeters (mm).

Requirements

  • The arm must run DexArm firmware V2.1.4 or later. Rotrics swapped the X and Y axes in V2.1.4. On older firmware, move and move-by fail with an error that tells you to update the firmware. position, go-home and the motor commands still work. Rotrics Studio updates the firmware.
  • After the arm powers on, run go-home before a move. The firmware refuses motion until the arm is homed, and a move fails with an error that says so.

Syntax

Global Options

Arguments

Commands


Command Reference

position

Get the current arm position in millimeters.
Options:
  • --box TEXT - Lager Box name or IP
Example:

move

Move the arm to an absolute XYZ position in millimeters.
Options:
  • --x FLOAT - Target X position (mm)
  • --y FLOAT - Target Y position (mm)
  • --z FLOAT - Target Z position (mm)
  • --box TEXT - Lager Box name or IP
  • --timeout FLOAT - Move timeout in seconds (default: 15.0, minimum: 0.1, maximum: 25.0)
  • --yes - Confirm the action without prompting
Each axis is a named option, not a positional argument, so you can move along one axis without restating the others. The box refuses a target outside the workspace of the arm. See Workspace Bounds. The maximum timeout is 25 seconds. The hardware service on the box stops a device call after 30 seconds and restarts, so the box refuses a longer move timeout. A long move can take more than the 15-second default. If a long move times out, run it again with a larger --timeout. Examples:

move-by

Move the arm by relative offsets (delta movement) in millimeters.
Options:
  • --dx FLOAT - Delta X offset (mm)
  • --dy FLOAT - Delta Y offset (mm)
  • --dz FLOAT - Delta Z offset (mm)
  • --box TEXT - Lager Box name or IP
  • --timeout FLOAT - Move timeout in seconds (default: 15.0, minimum: 0.1, maximum: 25.0)
  • --yes - Confirm the action without prompting
Omitted axes are left unchanged, so a single-axis jog needs only that one option. The box adds the offsets to the current position. It refuses a result outside the workspace of the arm. Examples:

go-home

Move the arm to its home position (X0 Y300 Z0). The command returns when the arm is at home, which can take a few seconds. Run it first after the arm powers on.
Options:
  • --box TEXT - Lager Box name or IP
  • --yes - Confirm the action without prompting
Example:

enable-motor

Enable the arm’s motor drivers.
Options:
  • --box TEXT - Lager Box name or IP
Example:

disable-motor

Disable the arm’s motor drivers. Use this before manual manipulation of the arm.
Options:
  • --box TEXT - Lager Box name or IP
Example:

read-and-save-position

Recalibrate the arm. The box reads the current position, then sends M889. M889 replaces the stored calibration of the arm with its current pose, and the arm calculates every later move from that calibration.
Use this command only when the arm is physically in its calibration pose. In any other pose, every later move is offset. Rotrics documents the calibration pose as arm axes 1 and 2 at their limits. To recalibrate, disable the motors and move the arm into that pose by hand. Then run this command, and run go-home after it.
Options:
  • --box TEXT - Lager Box name or IP
  • --yes - Confirm the recalibration without prompting
Without --yes, the command asks for confirmation. If you do not confirm, it sends nothing to the arm. Example:

set-acceleration

Set arm acceleration parameters for movement control.
Options:
  • --acceleration INTEGER - Print acceleration in mm/s^2 (minimum: 1)
  • --travel INTEGER - Travel acceleration in mm/s^2 (minimum: 1)
  • --retract INTEGER - Retract acceleration in mm/s^2 (default: 60, minimum: 1)
  • --box TEXT - Lager Box name or IP
The box sends M204 P<acceleration> T<travel> R<retract> to the arm. Example:

Listing Arm Nets

When invoked with only --box and no subcommand, lists all arm nets on the box:
Output:
The channel is the serial port of the arm. The address carries the USB serial number of the arm. The box opens the arm that has this USB serial number.

Workspace Bounds

The box refuses a move or move-by target outside these approximate bounds for the Rotrics Dexarm: The error starts with Coordinates out of bounds and names each axis that is out of range.

Detection

The box finds an arm when it scans for instruments. lager instruments, lager nets add and lager nets add-all all start that scan.
  • The box probes only a serial port whose USB ID is 0483:5740.
  • The box sends the G-code M105 to that port and waits up to 1 second for a reply that contains ok.
  • The box never probes a port that belongs to another instrument or to a saved UART net. It also skips a port that another process holds.
  • The box does not probe an arm that a saved arm net already uses. It lists that arm from its USB serial number, because the box keeps the port of that arm open between arm commands.
  • The arm must report a USB serial number. The box drops an arm that has none.
To change the probe, set LAGER_ARM_PROBE in the box container:
If a board on the box resets when its DTR or RTS line changes, do not use force. The probe opens each port and asserts DTR, which can reset that board. Use force only to diagnose a missing arm. Then remove the setting with lager box-config env unset LAGER_ARM_PROBE and run lager box-config apply.

Examples


Supported Hardware


Notes

  • All positions are in millimeters (mm)
  • Home position is X0 Y300 Z0
  • Use --yes flag for non-interactive scripts and CI pipelines
  • Always re-enable motors after disabling them to resume normal operation
  • The --timeout option prevents commands from hanging if the arm fails to reach position. It cannot be more than 25 seconds.
  • If the USB connection to the arm drops, the current command fails. The next command opens the port again.
  • Default net can be set with lager defaults add --arm-net
  • If the arm does not appear in lager instruments, see Detection and the troubleshooting page