Skip to main content
Control robotic arms for automated pick-and-place operations, positioning, and test fixture manipulation.

Import

Methods

Method Reference

Getting an Arm Net

Get a robotic arm net instance by name and type.
Parameters: Returns: Arm net instance with all methods listed below The net opens the arm that has the USB serial number in its address. It also reads the firmware version of the arm. arm.firmware_version is a tuple such as (2, 3, 5), or None if the arm did not report a version.

position()

Get the current arm position.
Returns: tuple[float, float, float] - (x, y, z) coordinates in mm

move_to(x, y, z, timeout=15.0)

Move the arm to absolute coordinates with blocking wait.
Parameters: Raises:
  • OutOfBoundsError if the target is outside the workspace bounds. Nothing is sent to the arm.
  • UnsupportedFirmwareError if the arm firmware is older than V2.1.4, or the arm did not report its version. Nothing is sent to the arm.
  • NotHomedError if the arm is not homed after power-on
  • MovementTimeoutError if position not reached within timeout

move_relative(dx=0, dy=0, dz=0, timeout=15.0)

Move relative to current position.
Parameters: Returns: tuple[float, float, float] - New (x, y, z) position after move Raises:
  • UnsupportedFirmwareError if the arm firmware is older than V2.1.4, or the arm did not report its version. Nothing is sent to the arm.
  • OutOfBoundsError if the current position plus the offsets is outside the workspace bounds. The arm does not move.
  • NotHomedError if the arm is not homed after power-on

go_home(timeout=20.0)

Move the arm to its home position (X=0, Y=300, Z=0). The method returns when the arm is at home. Call it first after the arm powers on, because the firmware refuses motion until then.
Raises: RuntimeError if the arm does not reach home within timeout seconds

enable_motor()

Enable the arm motors.

disable_motor()

Disable the arm motors (arm will be loose).

save_position()

Recalibrate the arm. save_position() sends M889, which replaces the stored calibration of the arm with its current pose. The arm calculates every later move from that calibration.
Call save_position() only when the arm is physically in its calibration pose. In any other pose, every later move is offset.

get_full_position()

Get the full position including joint angles.
Returns: tuple[float, ...] - (x, y, z, e, a, b, c) where a, b, c are joint angles If the arm firmware does not report joint angles, a, b and c are None.

End Effector Methods

Soft Gripper

Air Picker

Laser Module

Conveyor Belt Methods

Sliding Rail Methods

Utility Methods

delay_ms(value) / delay_s(value)

Add delay to the arm’s command queue.

set_acceleration(acceleration, travel_acceleration, retract_acceleration=60)

Set the print, travel and retract acceleration in mm/s^2. The method sends M204 P<acceleration> T<travel_acceleration> R<retract_acceleration>.

set_module_type(module_type)

Set the attached module type.

get_module_type()

Get the currently detected module type.

Examples

Basic Movement

Pick and Place

Automated Test Positioning

Error Handling

Supported Hardware

Exceptions

Notes

  • Always use the context manager (with statement) to ensure proper cleanup
  • Call go_home() after the arm powers on. The firmware refuses motion until then.
  • move_to() and move_relative() need arm firmware V2.1.4 or later. Rotrics swapped the X and Y axes in V2.1.4, so older firmware moves in a different frame.
  • A movement timeout error means that the arm did not arrive. The cause can be an obstruction, an unreachable target inside the bounds, or a long move. Pass a larger timeout for a long move.
  • Joint angles (a, b, c) are in the arm’s internal coordinate system
  • Default tolerance for position verification is 0.5mm
  • The arm auto-detects via USB VID/PID (0x0483:0x5740)
  • The box finds an arm only when it scans for instruments. The scan probes only a port with that USB ID, and the arm must report a USB serial number. See Detection for the LAGER_ARM_PROBE setting.
  • Dexarm defines approximate workspace bounds: X -300 to 300 mm, Y 170 to 360 mm, Z -140 to 100 mm. move_to() and move_relative() raise OutOfBoundsError for a target outside them, as the lager arm CLI does. move_to_blocking(), move_to_gcode() and fast_move_to() do not check the bounds or the firmware version.