ECE 276C ยท Robotics ยท Final Project

Visual Servoing with
Residual Reinforcement Learning

Combining classical Image-Based Visual Servoing (IBVS) with a PPO residual policy to achieve more energy-efficient and robust eye-in-hand manipulation on a Franka Panda robot.

Overview

Traditional IBVS controllers rely purely on visual feature errors to compute velocity commands. While effective in ideal conditions, they are sensitive to camera calibration errors, kinematic singularities, and scene clutter. This project augments the classical pipeline with a residual RL agent (PPO) that learns a multiplicative correction to IBVS commands purely from interaction, without replacing the interpretable baseline controller.

Method

๐ŸŽฏ

Baseline IBVS

An eye-in-hand camera detects visual feature points. The controller computes a Jacobian-based velocity command to minimize pixel-space error between current and target feature positions.

vibvs = โˆ’ฮป J+ e
๐Ÿค–

Residual PPO Policy

A PPO agent observes a 23-dimensional state (visual error, depth, joint state, IBVS command) and outputs a 6-dim residual coefficient. The final command blends both signals.

vcmd = vibvs ยท (1 + 0.3 ยท tanh(a))
๐Ÿ†

Reward Design

The reward encourages accurate tracking while penalizing energy waste and target loss, pushing the residual agent to complement โ€” not override โ€” the classical controller.

โˆ’ Tracking error โˆ’ Joint velocity (energy) โˆ’ Step penalty โˆ’ Target lost
Camera
512ร—512 px
โ†’
IBVS
vibvs
โ†’
PPO Agent
residual ฮฑ
โ†’
vcmd
6-DOF velocity
โ†’
Franka Panda
7-DOF arm

Results

Averaged over 100 episodes in PyBullet simulation.

Cumulative Reward
Baseline
โˆ’18,030
PPO-IBVS
โˆ’9,860
+45.3% improvement
Energy Cost (joint velocity penalty)
Baseline
โˆ’13,606
PPO-IBVS
โˆ’5,894
+56.7% more energy efficient
Tracking Reward
Baseline
โˆ’3,217
PPO-IBVS
โˆ’2,845
+11.6% better tracking
Failure Penalty (target lost)
Baseline
โˆ’250
PPO-IBVS
โˆ’190
24% fewer failures

Tech Stack

PyBullet
Physics simulation
Stable-Baselines3
PPO implementation
PyTorch
Neural network backend
OpenCV
Feature detection
Franka Panda
7-DOF robot model
NumPy
Numerical computation

Configuration

ParameterValueDescription
CAMERA_WIDTH/HEIGHT512 pxImage resolution
CAMERA_FOV120ยฐCamera field of view
NUM_TARGETS5Random targets per episode
MAX_ITERATIONS100Max steps per episode
CONVERGENCE_THRESHOLD3 pxSuccess threshold
OBS_DIM23Observation space dimension
ACT_DIM6Action space dimension