Search

Search papers and lessons

Learning Hand-Eye Coordination for Robotic Grasping with Deep Learning

Sergey Levine, Peter Pastor, Alex Krizhevsky et al. · 2016

Levine and colleagues trained a convolutional network on 800,000 real grasp attempts to predict grasp success from a single camera, then used it to steer the gripper in closed loop without calibration.

On this page

  • Colour = topic mix
  • Calculus
  • Linear algebra
  • Neural network basics
  • Discrete math
  • Probability
  • Architectures
  • Sign in to see your progress

TL;DR

A robot that grasps by looking at a camera has to know where its gripper is relative to the object, and that relationship changes with every camera mount. This paper avoids hand-calibrating the camera. It trains a convolutional network on over 800,000 real grasp attempts to predict whether a proposed gripper motion will end in a successful grasp, then runs that network in a loop that keeps moving the gripper until it closes on an object.

Where you'll see it: the idea that a grasp predictor plus continuous feedback can replace hand-built perception and calibration pipelines, which later robot-learning systems build on.

The problem

Before this work, a robot picking up an object from a bin usually relied on a chain of engineered parts. A depth or colour camera located the object, a calibration step mapped image coordinates to the robot's coordinate frame, and a motion planner moved the gripper to a computed pose. Each link needed careful setup, and errors compounded. A camera nudged by a few centimetres, or a finger worn unevenly, could make a planned grasp miss.

Learned systems existed, but most trained on small numbers of grasps or on simulated data, and few were used in closed loop on real hardware. The question the authors set out to answer was whether a large amount of real, self-collected data could teach a network enough about the geometry of the gripper and the scene that calibration becomes unnecessary.

Key idea

Split the system into two parts. The first is a prediction network g(It,vt)g(\mathbf{I}_t, \mathbf{v}_t) that takes the current camera image It\mathbf{I}_t and a candidate motion vt\mathbf{v}_t of the gripper, and returns the probability that the motion, followed by a closing grasp, will succeed. The second is a servoing rule f(It)f(\mathbf{I}_t) that uses the network to choose the next motion, and repeats until the gripper closes.

flowchart LR
  A["camera image I_t"] --> B["sample candidate motions v"]
  B --> C["grasp network g(I_t, v) gives success probability"]
  C --> D["choose best motion, or close the gripper"]
  D --> E["robot moves"]
  E --> A

The network is trained with an ordinary supervised objective, on labels produced automatically by the robot itself. Because the candidate motion is an input, the network can learn the spatial relationship between the gripper and the object directly from pixels, without being told where the camera is. The closed loop then corrects errors the network makes on any single prediction.

The method

The grasp predictor

Each grasp attempt has TT time steps. At time tt the robot records an image It\mathbf{I}_t and its gripper pose pt\mathbf{p}_t, then picks a motion. At the final step the gripper closes and a success label ℓi∈{0,1}\ell_i \in \{0, 1\} is recorded. Each time step yields one training sample

(Iti,  pTi−pti,  ℓi),\big(\mathbf{I}_t^{i},\; \mathbf{p}_T^{i} - \mathbf{p}_t^{i},\; \ell_i\big),

which says: from this image, moving by the difference between the current pose and the final pose, then grasping, gave this outcome. The label is shared by every step of the attempt.

The network outputs g(It,vt)=Pr⁡(ℓ=1∣It,vt)g(\mathbf{I}_t, \mathbf{v}_t) = \Pr(\ell = 1 \mid \mathbf{I}_t, \mathbf{v}_t) through a sigmoid. With binary labels and a sigmoid output, the standard supervised objective is the cross-entropy loss, minimised with stochastic gradient descent and Backpropagation.

The architecture takes two images: the current frame and a frame I0\mathbf{I}_0 recorded before the grasp, which shows the scene without the gripper. The two are stacked and passed through a stack of convolutional layers with batch normalisation and max pooling. The five-number motion vector, a three-dimensional translation and a sine-cosine encoding of the rotation about the vertical axis, enters through one fully connected layer. It is replicated over the spatial grid and added to the feature map at an intermediate layer, so later layers can reason about where the gripper would go relative to what the camera sees.

The paper restricts itself to vertical pinch grasps, which keeps the motion space small enough to sample.

Continuous servoing

To pick a motion, the servoing rule has to search over candidate motions. The authors use the Cross-Entropy Method, a derivative-free search. Each iteration samples 64 candidate motions from a Gaussian, keeps the best six, and refits the Gaussian to those six. Three iterations are run per decision.

After each decision the rule compares the predicted success of closing now against the best motion:

  1. If closing the gripper now has more than 90 percent of the best motion's predicted success, close the gripper. Stopping early is almost as good.
  2. If closing now has at most 50 percent of the best motion's predicted success, raise the gripper before moving. The gripper is probably in a poor position, and a large move is needed.
  3. Otherwise, execute the best motion.

The rules are simple, and they turn the probability output into a control policy. Because the decision is repeated every frame, a grasp that drifts off target is corrected on the next frame rather than failing outright.

The reinforcement-learning view

Section 4.3 interprets the setup as Reinforcement Learning. With only one decision in a two-step episode, the grasp network approximates the Q-function of the servoing policy, where the reward is 1 for success and 0 otherwise. Collecting data with the latest network and refitting it is then a form of fitted Q iteration. For longer episodes the authors use the motion from the current pose to the final pose as the action. This assumes that a move from p1\mathbf{p}_1 to p2\mathbf{p}_2 and then to p3\mathbf{p}_3 is equivalent to a direct move from p1\mathbf{p}_1 to p3\mathbf{p}_3. The assumption is not always true, since intermediate motions can disturb objects, but the authors report that it works well in practice. Its benefit is that fitting the Q-function becomes an ordinary regression, which avoids the instabilities of Q-learning with a changing target.

Data collection

The data came from the robots themselves. The collection began with random motion commands and T=2T = 2, and gradually moved to longer, more informed trajectories as the network improved, up to T=10T = 10. Between six and fourteen manipulators ran at any time over about two months, with differences in camera placement, gripper wear and hardware. A human only replaced the objects in the bins and started the system. The grasp label is decided at the end of each attempt, by the procedure in Appendix B.

Results

The evaluation uses objects the network never saw in training: staplers, tape dispensers, flat notes, soft and translucent items. Two protocols are used. In the first, objects go back into the bin after each grasp, and 100 attempts are made. In the second, objects are removed, which prevents the robot from repeatedly picking the same easy object. The second protocol reports failure rates over the first 10, 20 and 30 attempts, averaged over four repetitions.

Failure rates without replacement, for the first 10, 20 and 30 attempts, are:

  • Random motion: 67.5, 70.0 and 72.5 percent.
  • Hand-designed pipeline: 32.5, 35.0 and 50.8 percent.
  • Open-loop prediction (one network prediction, then a calibrated move): 27.5, 38.7 and 33.7 percent.
  • The continuous servoing method: 10.0, 17.5 and 17.5 percent.

With replacement, over 100 attempts, the failure rates are 69 percent for random motion, 35 percent for the hand-designed pipeline, 43 percent for open-loop prediction, and 20 percent for the servoing method.

The data-size experiment in Table 2 is also informative. Training on the first 12 percent of the collected grasps, roughly 182,000 images, gives 52.5 percent failure over the first ten attempts. Training on the full dataset, about 2.9 million images, gives 10 percent. Trajectories were longer and success rates higher in the later part of collection, so the full dataset is both bigger and better, which makes the comparison partly about data quality as well as quantity.

Two caveats matter for reading these numbers. The experiments use a single robot setup with a fixed set of objects, and the trials are few, four repetitions for the no-replacement protocol. The gains over open-loop prediction are clearest in the no-replacement protocol. Under replacement, the open-loop method does worse than the hand-designed baseline, 43 percent against 35 percent.

Why it mattered

The paper showed that real-robot data, collected at scale by the robots themselves, could train a grasp predictor that works on novel objects without camera calibration. It also made the case for continuous feedback over a single open-loop plan, since the servoing loop corrected errors the open-loop method could not see.

The approach was influential in robot learning. It helped establish that large, self-supervised datasets of robot interactions are a practical source of training data, and that a learned predictor combined with a simple feedback rule can outperform a hand-engineered pipeline. The idea of learning from many robots and many camera placements is a recurring theme in later large-scale manipulation work.

Reading guide

Read the paper in this order. Each item names the lessons that help.

  1. Abstract and introduction. Needs Supervised Learning for the view that the grasp success prediction is a classification task, and the idea of calibration as an engineering dependency.
  2. Section 3, the overview. Needs Supervised Learning and Reinforcement Learning for the two-part split between prediction and servoing.
  3. Section 4.1, the grasp predictor. Needs Convolutional Neural Network for the layer stack, Batch Normalization for the normalisation after each convolution, Sigmoid Function for the output, and Cross-Entropy Loss for the objective.
  4. Section 4.1, training samples. Needs Stochastic Gradient Descent and Backpropagation to see how the network is fitted to the labelled attempts.
  5. Section 4.2, continuous servoing. Needs Cross-Entropy Method for the sampling-based search over motions.
  6. Section 4.3, reinforcement-learning view. Needs Markov Decision Process for the episode structure and Q-Learning for the Q-function the grasp network approximates.
  7. Section 5, data collection, and Section 6, experiments. Needs Gaussian (Normal) Distribution for the sampling distribution in the search. The tables are easier to read after Sections 4.1 and 4.2.
  8. Appendix C, the hand-engineered baseline. Needs Pinhole Camera Model for the calibrated image-to-robot mapping that the learned system avoids.

Check yourself

QuestionThe grasp network is trained with label ℓi∈{0,1}\ell_i \in \{0, 1\} shared by every time step of an attempt. Why is it reasonable to use the same grasp label for all TT samples from one attempt?Show answer

The label records whether the whole attempt ended in a successful grasp, and each sample asks whether a particular motion, followed by a grasp, would produce that outcome. The paper's sample includes the vector to the final pose, so each step is a valid question about the same final result. Labelling each step by its own intermediate outcome would require knowing the state after a move that was not yet executed, which the robot does not have.

QuestionA servoing decision has a best motion with predicted success 0.60, and closing the gripper now has predicted success 0.40. Which rule applies, and what does the robot do?Show answer

The ratio is 0.40/0.60≈0.670.40 / 0.60 \approx 0.67. This is above 0.5 but below 0.9. So the rule for raising the gripper does not apply, and the early-close rule does not apply. The robot executes the best motion. The ratio tells the controller that closing now is noticeably worse than moving, but not so much worse that the gripper must be lifted to reposition.

QuestionIn Table 1, the open-loop method has a failure rate of 27.5 percent over the first 10 attempts, and the servoing method has 10.0 percent. Estimate how many of the first 10 grasps each method succeeds on, and say what the difference suggests.Show answer

With 40 trials for the first ten attempts (four runs of ten), the open-loop method fails on 27.5 percent of attempts, so about 11 of 40 fail and 29 succeed. The servoing method fails on 10 percent, so about 4 of 40 fail and 36 succeed. The gap of about seven grasps per 40 attempts suggests that the feedback loop recovers many attempts that the open-loop method would have missed, which matches the paper's claim that continuous feedback corrects calibration errors.

QuestionThe paper's data-size experiment shows failure rising from 10 percent to 52.5 percent as training data shrinks. What is one reason the comparison might overstate the effect of data quantity alone?Show answer

Later in data collection the trajectories were longer, and the grasp success rate of the collecting policy was higher, so the later data differs in kind, not just in number. A model trained on the first twelve percent has seen shorter, less informed episodes. The experiment therefore mixes the effect of more data with the effect of better, longer episodes. A cleaner test would sample the same kinds of trajectories at each size.

Sources

Read the full paper

Sergey Levine, Peter Pastor, Alex Krizhevsky et al., 2016. arXiv:1603.02199