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.

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

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.

Watch the video in the original article ↗
My reaction was something like 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:

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 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.

Then I compared predicted and measured torque:

A 50% error. So much for that.

Getting the model to fit
I needed parameter identification. Luckily, I had worked on that in my undergraduate thesis.

The method transferred to this single-joint setup:

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.

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

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

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 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.

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.

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

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.

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

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.

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: