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.
Set up the terminal
Activate the environment and move to the repository root.
$ 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.
Launch the script
$ python examples/xlerobot_examples/1_so100_keyboard_ee_control.py
It asks two questions before anything moves:
| Prompt | What to answer |
|---|---|
| "Please enter the USB port…" | Full 2-bus robot: /dev/xle_armsBenchtop 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. |
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.
It never moves the right arm (IDs 7–12). For two arms, use the whole-robot teleop.
Learn the keys
W/S and E/D move the gripper to a point. The other keys move one joint directly.
| Keys | What moves | Kind |
|---|---|---|
| W / S | End-effector X: reach in and out | Cartesian joints 2+3 |
| E / D | End-effector Y: height in the arm's vertical plane | Cartesian joints 2+3 |
| Q / A | shoulder_pan: swings the whole arm left and right | Joint |
| R / F | Pitch adjustment: tilts wrist_flex | Joint |
| T / G | wrist_roll | Joint |
| Y / H | gripper: close and open | Joint |
| X | Exit: returns to the start position first | – |
| Esc | Exit immediately | – |
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.
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:
- Q / A to swing the arm until it points at the object.
- E / D to set the height.
- W / S to reach out until the gripper is around it.
- Y / H to close the gripper.
Quit with X so the arm returns to its start position first.
Check the result
- 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.