Skip to main content
Back

University of Liverpool Teaches a Robot Arm to Scrape Vials Like a Chemist

A University of Liverpool team taught a Franka robot to scrape sticky chemistry samples off vial walls by learning adaptive contact forces in simulation.

Pro

Paper, Full Access
  • Liverpool researchers combine a Cartesian impedance controller with an RL agent for autonomous vial scraping.
  • Adaptive wrench policy beats a fixed-force baseline by 10.9% average across five materials.
  • Materials simulated as spheres with Perlin-noise dislodgement thresholds, enabling zero-shot sim-to-real transfer.
  • PPO policy runs at 10 Hz on top of a 500 Hz impedance controller on a Franka Research 3.
  • Perception stack: YOLOv8, GrabCut, depth filtering, and K-means clustering give the agent residue locations.
  • Best result on dried cornflour at 93.8% relative to human; sticky liquid dough remains the hardest case.

Scraping the last stubborn residue of a compound off the inside of a glass vial sounds trivial, but it's one of those small human skills that has quietly blocked chemistry labs from running experiments without a person in the loop. A new preprint from researchers at the University of Liverpool takes a serious swing at that gap by teaching a robot arm to feel its way through the job, adjusting how hard it presses depending on whether the sample is a crusty crystal, a wet dough, or a dried film.

The paper, Learning Adaptive Force Control for Contact-Rich Sample Scraping with Heterogeneous Materials, comes from Cenk Cetin, Shreyas Pouli, and Gabriella Pizzuto in Liverpool's School of Computer Science and Informatics and Department of Chemistry, and has been submitted to IROS 2026. Pizzuto's group has been working on robotic chemists for several years, and this is their most direct attempt yet to give one the tactile finesse of a human hand with a spatula.

Why scraping is harder than it looks

Most lab robots today are pre-programmed pick-and-place machines. Traditional position controllers are ill-suited for tasks requiring compliance and adaptation to variable forces, while impedance controllers provide the necessary force control and adaptability to manage unpredictable interactions. Scraping a vial is a contact-rich job inside a narrow, breakable container, with materials whose stickiness and hardness vary batch to batch and even within the same vial.

There's a second wrinkle that makes reactive force control alone unreliable: the tool itself bends. Standard lab spatulas are compliant, so the force measured at the robot's wrist is not the force at the tool tip. That decouples what the robot senses from what is actually happening at the point of contact, which breaks a lot of naive control strategies.

A two-layer control stack

The team's answer is a hierarchy. At the bottom sits a Cartesian impedance controller running at 500 Hz that gives the arm a mass-spring-damper feel, keeping it compliant against the glass. On top of that, a reinforcement learning policy runs at 10 Hz and decides, moment to moment, what wrench (force and torque) the arm should try to apply.

System architecture showing RGB-D perception, 10 Hz RL policy, and 500 Hz Cartesian impedance controller

The framework relies on a low-level Cartesian impedance controller for stable and compliant physical interaction and a high-level reinforcement learning agent that learns to dynamically adjust interaction forces at the end-effector, guided by perception feedback that provides the material's location. The action space is intentionally tiny: a lateral force to press against the wall, a torque to sweep along it, and a vertical target position. Keeping the RL agent out of low-level joint control is what makes the whole thing transfer from simulation to hardware.

Faking messy materials with Perlin noise

The most clever methodological choice is how the team simulated heterogeneous samples. Instead of trying to model dough or salt crystals with proper physics, the sample is modelled as a collection of spheres, where each sphere is assigned a unique dislodgement force threshold, procedurally generated using Perlin noise. Perlin noise is the same smooth, natural-looking random function used in game terrain generation, so neighboring spheres get correlated but varying hardness values.

That gives the RL agent something like a training distribution of stubbornness patches to fight through, and it stops the policy from overfitting to a single uniform material. The agent was trained with PPO in Stable Baselines3 inside MuJoCo, then dropped onto a real Franka Research 3 arm zero-shot, meaning no fine-tuning on hardware.

Seeing what's left in the vial

The perception pipeline is deliberately lightweight rather than a monolithic neural segmenter. It stacks four stages:

  • YOLOv8 fine-tuned on 1,084 labelled images to localise the vial in the RGB-D feed
  • GrabCut segmentation to separate the vial from its background
  • Depth thresholding to isolate only the front-facing wall of the vial
  • Two rounds of K-means clustering to filter out the green spatula in HSV space and then summarise the remaining material as three centroids with residue percentages

Those three clusters get fed straight into the RL policy's state vector, so the agent always knows roughly where the remaining gunk is sitting.

Perception pipeline diagram showing YOLO, GrabCut, depth filtering, spatula removal, and K-means clustering

How well it actually works

The team benchmarked on five materials chosen for being annoying in different ways: liquid dough, liquid cornflour, dried cornflour, crystalline salt, and crystalline sugar. The baseline was the same impedance controller with a fixed 4 N wrench. Success was measured gravimetrically by weighing the vials, then normalised against what a human scientist could scrape out of the same vial.

The learned policy was successfully transferred to a real robotic setup and evaluated across five different material setups, outperforming a fixed-wrench baseline by an average of 10.9%. The gap is most dramatic on crystalline sugar, where the fixed-force baseline managed 41% relative success and the RL policy hit 66.4%. On dried cornflour, the RL policy scraped 93.8% of what a human could get.

Where it still struggles

The system is not a general lab manipulator yet. The authors are candid that highly viscous, adhesive materials like liquid dough remain hard for every method they tried. Absolute recovery of 100% is essentially impossible because of vial geometry and material sticking to curved glass, which is why they report relative-to-human numbers rather than raw success. Performance on crystalline sugar in absolute terms was still under 20%.

There's also no code release accompanying the preprint, and the perception pipeline was tuned specifically for a green spatula against pale materials, which is a convenient assumption for a lab demo but not a general vision system.

Why this matters for lab automation

Self-driving labs have been moving fast on the workflow side, from planning to characterisation, but the manipulation layer is still the bottleneck for genuinely end-to-end autonomy. This work is a small, concrete step: it takes one specific, dexterous task that previously demanded a human and shows that a modest RL policy plus a well-chosen simulation trick can close most of the gap. The broader recipe of pairing a stable low-level controller with a policy that only picks target forces, and training on procedurally randomised material hardness, is portable to plenty of other contact-rich lab jobs, from powder weighing to sample transfer.

For anyone building on top of the Franka platform or working on sim-to-real for contact tasks, the design choices around action space and reward shaping are worth studying closely. The authors note that an explicit force penalty in the reward caused a push-and-pull oscillation that only failed on hardware because of unmodelled friction, and switching to a material-removed-per-unit-force efficiency term fixed it. That's the kind of practical detail that usually costs weeks of debugging to rediscover.