Skip to content

About

Wave at a webcam and two Panda arms wave back. Hand tracking to dual-arm teleop with ROS 2 and MoveIt Servo.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Dual-Arm Teleoperation System — Sereact Coding Challenge

A ROS2 Humble workspace for real-time teleoperation of dual Franka Panda robot arms using hand tracking from a standard webcam. The operator controls two 6DOF arms visualized in RViz by moving their hands in front of the camera. No simulator is used — the system publishes joint states compatible with a real robot.

System Requirements

  • Ubuntu 22.04
  • ROS2 Humble
  • Standard webcam (USB or built-in)
  • Python 3.10+

Architecture

Webcam
  → MediaPipe Hands (landmark detection, up to 2 hands)
  → EMA noise filter (alpha=0.25, dead zone applied)
  → Twist velocity conversion (2D + 1D rotation)
  → MoveIt Servo (streaming IK ~100Hz)
  → ros2_control joint trajectory controllers
  → RViz visualization
  • Left hand → controls left arm (planning group: left_arm)
  • Right hand → controls right arm (planning group: right_arm)
  • Pinch gesture (thumb tip + index tip) → gripper open/close
  • Motion constrained to XY plane + Z-axis yaw (no depth camera needed)
  • Self-collision avoidance via MoveIt planning scene shared between both arms

Workspace Structure

sereact_ws/
  src/
    dual_arm_description/
      config/
        controllers.yaml
    dual_arm_moveit_config_v2/
      config/
        servo/
          servo_left.yaml
          servo_right.yaml
      launch/
        demo.launch.py
        servo.launch.py
        move_group.launch.py
        spawn_controllers.launch.py
    dual_panda_teleop/
      dual_panda_teleop/
        ee_teleop_node.py
        hand_teleop_node.py
        gripper_node.py
        moveit_follower_node.py
      launch/
        teleop.launch.py
    pymoveit2/

Install Dependencies

sudo apt update
sudo apt install -y \
  ros-humble-moveit \
  ros-humble-moveit-servo \
  ros-humble-ros2-control \
  ros-humble-ros2-controllers \
  ros-humble-joint-state-broadcaster \
  ros-humble-position-controllers \
  ros-humble-gripper-controllers \
  ros-humble-joint-trajectory-controller

pip install mediapipe opencv-python numpy

Build

cd ~/sereact_ws

# Initialize pymoveit2 submodule
git submodule update --init --recursive

# Build
colcon build --symlink-install

# Source
source install/setup.bash

Run

Open three terminals. Source the workspace in each one:

source ~/sereact_ws/install/setup.bash

Terminal 1 — RViz + MoveIt + controllers:

ros2 launch dual_arm_moveit_config_v2 demo.launch.py

Wait until RViz opens and both arms are visible before proceeding.

Terminal 2 — MoveIt Servo nodes:

ros2 launch dual_arm_moveit_config_v2 servo.launch.py

Terminal 3 — Teleoperation node:

ros2 run dual_panda_teleop ee_teleop_node

A camera window opens showing the live feed with hand landmarks drawn.

How to Operate

Action Result
Pinch left hand (bring thumb + index finger together) Left gripper closes
Open left hand Left gripper opens
Pinch right hand (bring thumb + index finger together) Right gripper closes
Open right hand Right gripper opens

Current implemented controls:

  • Gripper open/close via pinch gesture is fully working on both arms
  • End-effector XY movement and wrist rotation are architecture-ready (MoveIt Servo configured) but not yet mapped to hand gestures in this version

Tips:

  • Stand 1–2 meters from the camera
  • Ensure good lighting on your hands
  • Perform pinch gestures clearly and deliberately for best detection

    Video Demo

A recorded demonstration of the system in action is attached in this repository.

Key ROS Topics

Topic Type Description
/joint_states sensor_msgs/JointState All joint angles published continuously
/servo_left/delta_twist_cmds geometry_msgs/TwistStamped Left arm velocity input to Servo
/servo_right/delta_twist_cmds geometry_msgs/TwistStamped Right arm velocity input to Servo
/left_arm_controller/joint_trajectory trajectory_msgs/JointTrajectory Left arm output to controller
/right_arm_controller/joint_trajectory trajectory_msgs/JointTrajectory Right arm output to controller

Planning frame: dual_arm_base_link Left EE frame: left_panda_hand Right EE frame: right_panda_hand

Design Decisions

MoveIt Servo over OMPL replanning Full trajectory planning takes 200–800ms per call, causing freezing during real-time hand tracking. MoveIt Servo streams incremental IK at ~100Hz with ~10ms latency — safe for a real robot to consume directly.

Two independent Servo instances A single dual_arm planning group with one EE target causes IK failures. Two independent Servo nodes each solve for 7 joints — reliable and fully decoupled.

EMA noise filtering MediaPipe landmarks are noisy at ~30Hz. Exponential moving average (alpha=0.25) removes high-frequency jitter. A dead zone ignores sub-threshold movement to prevent drift when the operator holds still.

2D + 1D constraint Since no depth camera is available, twist.linear.z is always set to 0.0. Wrist yaw is extracted from the angle between wrist landmark (0) and middle finger MCP (9), mapped to twist.angular.z.

Limitations

  • No depth control (Z axis fixed) — a depth camera would enable full 3D movement
  • Tracking degrades in poor lighting or when hands leave the frame
  • Gripper uses position threshold, not force feedback

References

Author

Karima — Sereact Teleoperation Coding Challenge

About

Wave at a webcam and two Panda arms wave back. Hand tracking to dual-arm teleop with ROS 2 and MoveIt Servo.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages