# A steering wheel as a valve

- Date: 26 October 2026
- Project: gemm
- Tags: Robotics, Hardware, Interfaces

> To let people feel what operating a refinery valve takes, I turned a racing wheel into one: read its reports, push resistance back, and make it harder the closer you get. The decision that mattered was where the bridge lives.

Gemm's goal is a humanoid that walks a refinery round and turns a valve. Before
a robot does that on its own, a person has to be able to do it *through* the
robot.

We presented Gemm at HIT Polo, to companies talking about how to keep the
human value of work at a time when everything is being automated. It was the
right room for this: what we were showing is a person doing the job through
the robot. So we wanted people to try that motion with something in their
hands, not with a mouse.

What we had was a Logitech G29: a racing wheel with 900° of rotation and a
motor that can push back.

## The wheel does not want to talk to a browser

macOS has no force-feedback driver for the G29. The browser's Gamepad API
reads the axes, but it cannot make a wheel resist. So the real question was
not how to read an angle. It was **where the piece that talks to the wheel
should live**.

The obvious answer was WebHID, straight from the dashboard page. I turned it
down: it ties the wheel to one browser tab, which pauses in the background and
loses the device on every reload, and nothing outside that tab — a script, a
ROS node — can use it.

Instead it is a small Python module on the operator's Mac, over `hidapi`:

- It reads the wheel's 12-byte input report, laid out from its own HID
  descriptor, and publishes angle, pedals and buttons.
- It takes resistance as a command. The encoding for friction, damper and
  spring came from the Linux driver, because the manufacturer does not
  document it.
- A WebSocket bridge exposes both, on loopback only and filtered by origin.

Only passive effects: friction, damper and spring. The wheel can resist you,
but it never moves on its own.

## The exercise

The page starts with the wheel locked. You press start, on screen or on the
wheel, and it loosens. Then you turn it, left or right at random, to a target
between one full turn and almost the stop. The closer you get, the lower the
pressure on the gauge and the harder the wheel gets. Past 360° there is a step
of extra hardness that stays. Holding it inside the target for three seconds
closes the valve, and the wheel returns to the centre and locks again.

## What only a hand can test

The first version of that step was a spike: hardness went up before 360° and
came back down after it. On paper it marked the full turn. In the hand, the
wheel went loose right after you crossed it, which is the opposite of what a
valve does. I only found out because I was the one turning it.

Now there is a test that asserts hardness never drops along the way. That
test came after the hand, not before. Tests can tell you a curve is monotonic;
they cannot tell you whether it feels like a valve.

## The part worth keeping

The game was the cheap part. The bridge is what stays: an angle stream with
resistance as a command, usable from a page, a script or the robot. Sending
that angle to a real valve through the robot is a separate decision, and it
would go through the same authenticated command API as everything else that
moves something.

More about [Gemm](/work/gemm).

---

Page: https://eitanf.com/notes/steering-wheel-as-a-valve · Español: https://eitanf.com/es/notes/steering-wheel-as-a-valve.md · llms.txt: https://eitanf.com/llms.txt
