QQFLY.NET
← Writing

Building one seventh of a collaborative robot

Collaborative robots were everywhere in robotics discussions in 2016. For my last post of the year, I wanted to try building one.

Or one seventh of one. A single joint would do.

I wanted to know how a robot could detect contact with a person and respond to it.

Demonstration of a person working with a robot

A conventional robot that cannot sense someone's presence can injure them in a collision. Detecting contact is an important part of the problem.

A robot making contact with a person

I kept thinking about Sami Haddadin's demonstrations from his time at DLR. By 2016, he had moved on to Franka. Some of those earlier demonstrations were impressive—and rather unnerving.

An excerpt from Haddadin’s robot collision experiments

Watch the video in the original article ↗

My reaction was something like this:

Manga reaction: “Coach, I want to learn this.”

My research was already in motion planning, so I was not about to change fields. But I still wanted to understand how these behaviors worked. Reading papers only gets you so far.

This would be a good place for a long list of papers.

I will spare you.

Time to try it on a real mechanism.

A one-joint experiment

With help from my lab mates, I built this test rig:

The single-joint rig: an AC motor and cast-iron link

An AC motor drives a cast-iron link. The controller runs on the RTX real-time operating system and communicates over EtherCAT.

The collision-detection idea is straightforward: build a dynamic model, predict the joint torque, and compare it with the measured torque. A collision should show up as a discrepancy.

For the measurement, I estimated torque from the motor current reported by the drive. “Sensorless collision detection” certainly made the project sound impressive.

The single-joint dynamic model and its equation

The model has an inertia term and a gravity term. With a direct-drive mechanism, I initially left friction out and took the parameters straight from SolidWorks.

That seemed almost too easy. Collaborative robotics, solved.

A celebratory reaction GIF from the original article

Then I compared predicted and measured torque:

Measured and predicted torque before parameter identification

A 50% error. So much for that.

A reaction to the large modeling error

Getting the model to fit

I needed parameter identification. Luckily, I had worked on that in my undergraduate thesis.

The cover of my undergraduate thesis

The method transferred to this single-joint setup:

Torque and error after parameter identification

After identifying the dynamic parameters, the error dropped below 8%. Now there was a model worth testing.

Detecting contact—and responding to it

First, I brought different objects into contact with the moving mechanism.

Testing contact with the moving mechanism

These tests were dangerous. Do not repeat them. This wooden stick shows why:

A wooden stick damaged during the collision experiment

Here are the measured torque, the predicted torque, and their difference:

Measured torque, predicted torque, and their difference during contact

The collision produces a clear change in the torque signal. Detecting contact looks feasible.

Next, I made the joint stop after detecting a collision.

A sheet of paper triggering collision detection and stopping the joint

A sheet of paper was enough to stop it.

But Haddadin's earlier demonstration did something different. After detecting contact, the arm switched to gravity compensation, or zero-G mode.

Contact forces under different post-collision control strategies

In the experiment reported in his paper, gravity compensation—Strategy 2 in the figure—gave the lowest contact force. I wanted to try that too.

My model was not accurate enough for true zero-G behavior. Instead, I used gravity compensation with low-gain PD control after detecting a collision, aiming for a similar response.

Gravity compensation with low-gain PD control

That worked fairly well. And with the joint this compliant, hand guiding was the obvious next experiment.

Hand guiding the single-joint rig

Here are all the tests on video:

Watch the video in the original article ↗

The friction problem

Taking this from one joint to a full arm is considerably harder. Friction is one of the difficult parts: without a sufficiently accurate model, identification and compensation become troublesome.

Here is an extreme case: a 100 kg load, driven through a planetary gearbox with an 86:1 reduction ratio.

A mechanism with a 100 kg load and an 86:1 gearbox

I tried the same parameter-identification method. Leaving friction out gave this result:

Torque fit with friction omitted

The dynamic model could not fit the measured torque curve. Friction was clearly too large to ignore.

I then tried several empirical friction models, but none eliminated the discrepancy completely.

Torque fit after adding a friction model

That was my explanation, in 2016, for the widespread use of joint torque sensors in collaborative robots: measuring on the output side of the transmission reduces the influence of transmission friction on the measurement.

If you are tempted to take on friction modeling, consider yourself warned.

To finish, here is Haddadin's full video:

Watch the video in the original article ↗

← Writing