The hand tracking demo lets you pilot the UR3e arm in real time by moving your hand in front of an OAK-D camera. MediaPipe’s HandLandmarker maps your hand’s 2D position to the arm’s XY workspace, palm size to Z height, and index-finger knuckle tilt to end-effector roll — all without touching a controller.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MRRP-lab/arm-demos/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Architecture
arm_demo.py runs two concurrent threads:
- Camera loop (main thread) — opens a DepthAI pipeline, grabs 640×480 frames at 30 fps, and feeds them to
vision.HandLandmarkerinVIDEOmode. Detected targets are written tolatest_targetunder athreading.Lock. - Robot worker thread — reads
latest_target, discards stale data, and callsgo_to_posevia MoveIt 2.
MultiThreadedExecutor on a separate spin thread:
| Node | Purpose |
|---|---|
StopControl | Exposes /stop (Trigger) — halts trajectory execution and sets stop_event |
SceneManager | Adds a table collision object (2 m × 2 m × 1 cm at z = −1 cm) to the MoveIt planning scene |
Workspace bounds
The arm’s Cartesian workspace is defined by two corners inbase_link coordinates:
Coordinate mapping
Hand landmarks are normalised to[0, 1] by MediaPipe. The demo swaps the image X and Y axes to match the arm’s forward/lateral orientation:
Palm size → Z height
Z is derived from the perimeter of the palm polygon (landmarks 0, 1, 5, 9, 13, 17):Roll mapping
End-effector roll is estimated from the tilt of the index finger’s proximal knuckle (landmarks 5 and 7):qz component before being passed to go_to_pose.
MoveIt 2 planner
Prerequisites
You also need the ColmanBringup to be running (robot driver +ros2_control). See the bringup launch documentation for details.
Running the demo
- pixi
- ros2 launch
Launch arguments
| Argument | Default | Description |
|---|---|---|
gripper_type | vacuum | Gripper model to load in the URDF |
use_camera | true | Whether to include the wrist camera in the robot description |
The
pixi run arm-demo task sets use_camera:=false. Pass use_camera:=true when the wrist camera is physically attached and you want it modelled in the URDF.Stopping the demo
-
Press
qin the OpenCV preview window to quit cleanly. -
Call the
/stopservice from another terminal: