Lessons from Learning to Spin “Pens”

Abstract

In-hand manipulation of pen-like objects is a most basic and important skill in our daily lives, as many tools such as hammers and screwdrivers are similarly shaped. However, current learning-based methods struggle with this task due to a lack of high-quality demonstrations and the significant gap between simulation and the real world. In this work, we push the boundaries of learning-based in-hand manipulation systems by demonstrating the capability to spin pen-like objects. We use reinforcement learning to train a policy and generate a high-fidelity trajectory dataset in simulation. This serves two purposes: 1) pre-training a sensorimotor policy in simulation; 2) conducting open-loop trajectory replay in the real world. We then fine-tune the sensorimotor policy using these real-world trajectories to adapt to the real world. With less than 50 trajectories, our policy learns to rotate more than ten pen-like objects with different physical properties for multiple revolutions. We present a comprehensive analysis of our design choices and share the lessons learned during development.

Sim-to-Real does not work for Pen Spinning

Despite the great progress in sim-to-real for in-hand manipulation, we find that it does not directly apply to our task due to the large sim-to-real gap. While this gap generally exists in previous work, the extreme difficulty of spinning pen-like objects exacerbates it further. Although we did extensive exploration and iterations on hardware design, object selection, and different input modalities, we have not achieved any success. The object is always easily dropped or even completely fails due to the distribution shift.

Fingergaiting with adaptive behavior

In the video below, we show two policy rollout from the same configurations but two different objects.
The robot uses a specific type of motion, which is the finger gait emerged from the reward function. But in addition to that, the robot still behaves differently for different objects. For example, the finger can sense when the object is on top of the finger using proprioceptive history, and decide when is the correct time to bend.

Plotting the difference between commanded joint position and actual joint position (after executing the command)

We show another video highlighting the difference between joint position and action together with the robot policy. We demonstrate that the difference changes significantly (from <0.01 when there is no contact to 0.07 when the thumb tries to go up and support the object).

Real-world Results

For Objects Seen during Training:

Unseen Objects:

Qualitative Comparison for Oracle Policy

Our Method.
Emergent Fingergaiting.
Single Initialization Pose (with random noise)
No Fingergaiting due to inefficient exploration
Without Z-reward, object oscillates.
Easily slip in the real-world

Baselines

Open-loop Replay. The motion is reasonable but not reactive & generalizable enough.
Simulation Pre-training Only Not able to finish the task since the large sim-to-real gap.
With Vision Object oscillates resulting in large OOD error for vision systems.

Baselines

Control Frequency not high enough to catch fast falling objects.
Control Frequency not high enough to catch fast falling objects.
Center-of-mass shifts during spinning, resulting in unstable configuration.