First Reach Tutorial

Tell the gripper where to go instead of moving each joint: 10–15 minutes.

Before you start

You will steer the gripper to an object on your desk using coordinates instead of joint angles. Check these first:

  • Software setup finished through step 9.
  • One arm's motors have unique IDs and the arm is calibrated.
  • Every motor answers diagnostics/check_bus.py.
  • The workspace in front of the arm is clear.

How it works

So far you have moved each joint by its angle. Here you name a point instead, and an inverse-kinematics (IK) solver works out the joint angles that put the gripper there.

This tutorial uses the simplest solver on purpose. If something goes wrong here, the cause is almost always the hardware or the calibration, which is why calibration is checked in Software step 9.

1

Set up the terminal

Activate the environment and move to the repository root.

Terminal
$ source ~/.venvs/xlerobot-pro/bin/activate
$ cd ~/xlerobot-pro
Getting Permission denied: /dev/ttyACM0?

Run sudo usermod -aG dialout $USER, then log out and back in.

2

Launch the script

Terminal
$ python examples/xlerobot_examples/1_so100_keyboard_ee_control.py

It asks two questions before anything moves:

PromptWhat to answer
"Please enter the USB port…" Full 2-bus robot: /dev/xle_arms
Benchtop rig: /dev/ttyACM0, or just press Enter for that default
"Do you want to recalibrate the robot? (y/n)" n: you already calibrated in software setup. Answering y throws that away and starts over.
The arm moves as soon as it connects.

It drives slowly to its zero position, then holds. Clear the workspace, keep your hands away from the arm, and keep a hand near the power switch.

This script drives one arm: the left arm, at motor IDs 1–6.

It never moves the right arm (IDs 7–12). For two arms, use the whole-robot teleop.

3

Learn the keys

W/S and E/D move the gripper to a point. The other keys move one joint directly.

KeysWhat movesKind
W / SEnd-effector X: reach in and outCartesian joints 2+3
E / DEnd-effector Y: height in the arm's vertical planeCartesian joints 2+3
Q / Ashoulder_pan: swings the whole arm left and rightJoint
R / FPitch adjustment: tilts wrist_flexJoint
T / Gwrist_rollJoint
Y / Hgripper: close and openJoint
XExit: returns to the start position first–
EscExit immediately–
Tap a key once and watch the terminal.

Each step is only 4 mm, and the terminal prints the new coordinate, so you can see which way each key goes. Holding a key queues a long move that is hard to stop.

4

Reach a physical target

Place a small object, such as a cup or a bottle, roughly 15–20 cm in front of the arm base. Then work in this order:

  1. Q / A to swing the arm until it points at the object.
  2. E / D to set the height.
  3. W / S to reach out until the gripper is around it.
  4. Y / H to close the gripper.

Quit with X so the arm returns to its start position first.

Check the result

It works when
  • The gripper moves smoothly toward the coordinate you set.
  • Every keypress prints the updated coordinate or joint target in the terminal, even when the arm cannot get there.

If the arm stops following your keys, it is usually at the edge of its reach, not broken. If the gripper misses by more than a couple of centimeters, look for a loose servo horn, a stripped gear, or a bent bracket.

Troubleshoot

Arm jerks or moves wildly

Almost always a motor ID mismatch or a servo horn installed a tooth off. Recheck Motor Configuration.

Coordinates update, but nothing moves

Most often the motors have logic power but no motor power: a 5 V rail instead of 12 V. Confirm with python diagnostics/check_bus.py --motors arm.

It always misses in one direction

That is calibration, not IK. Re-run calibration and check the left/right symmetry table in Software step 9.

The arm drops when you quit

Torque was cut rather than bled off. Quit with X so it returns to start first, and never cut torque on a loaded arm.

Back to top