A DREAM Robotics Agent · Hexapod

WHIP

Walking Hexapod Intelligence Platform

Eighteen servos on an RTrobot controller, driven by an ESP32 that works out every joint by inverse kinematics and runs his WiFi and a browser control page. An MPU6050 stops him before he tips, and an ultrasonic sensor watches the way ahead.

C++ Python ESP32 18-DOF MPU6050 MIT License
WHIP's avatar: his character, the red and blue spider his colours come from
WHIP · avatar
WHIP the machine: the hexapod himself, in pixel art
WHIP · the machine
WHIP, the 18-DOF hexapod robot
WHIP
WHIP from another angle
Legs

Overview

Six legs, eighteen joints

Phone

An Android app

Hold the stick to walk, let go to stop. A second stick crabs him sideways.

Download the APK

Balance

Back legs and slopes

His back legs are mounted further back to hold his weight, and a crab offset slider brings them in while he walks sideways. LEVEL tilts his body against a slope while he stands.

Talk

Brainfuck out loud

RIFT’s conversations reach his buzzer: a tone per symbol in his own lower voice, each symbol lighting his LED grid, and he can walk while he talks.

Walk

Gaits

Six of them: tripod, ripple, wave, quad, amble and metachronal, worked out by inverse kinematics with smooth foot swings, each checked to keep his centre inside his feet. He walks, turns, crabs sideways and follows the sticks with speed.

Pose

Body IK

His body slides and tilts over planted feet: from the controller's BODY mode, the PS2 pad (R3), his /body, or Servo Studio's 3D view.

Pad

A PS2 pad on him

Its 9-pin receiver straight on four pins of his ESP32: the sticks steer his gaits, mid-step.

Studio

Servo Studio

His servos as sliders, as your own linkage drawing, and as WHIP in 3D; groups, RTrobot XML, his servo board's commands, servo types written into his firmware.

Voice

He talks

Through the controller's PC, outside MIND too: theatrical, a show-off, secretly scared of tripping over his own feet.

Avoid

Obstacle mode

Walks on his own, 5 s after power-on, until something is within 35 cm, then looks left and right, turns the clearer way and carries on once it's clear past 50 cm.

Balance

Tilt safety

Past 20° of pitch or roll he stops and stands, and resumes once he's back under 12°. Picked up, his legs freeze until he's put down.

Remote

IR remote

Arrows walk and turn while held. He stands when you let go.

Web

Browser & gamepad

A control page on port 5005, and a Python controller that drives him from a PS2-style gamepad.

Fleet

RIFT integration

He joins the highest fleet network he can see and registers with the fleet, or hosts his own access point.

Think

MIND mode

The LLM on his PC controller walks him one short move at a time, thinking out loud and narrating like a nature documentary about himself.

Guard

No walking into walls

Driven by the remote or the web, he won’t step forward into anything within 20 cm.

Feel

Gamepad rumble

The pad buzzes harder as he nears a wall, and shakes when he tips.

Show

Lights & sound

A 4x4 RGB grid lights each leg as its foot lifts and shows his mode; a buzzer chirps at walls, tilts and mode changes.

Play

Follow, hello, dance

He follows your hand, waves hello, dances, and lies down by himself after a minute standing still.

Tune

Calibration page

Channel, direction and trim for all 18 servos on /calib, kept in flash: no reflash needed.

Hardware

What he's built from

  1. 01 ESP32 (the same module as NORA)
  2. 02 RTrobot 32-channel servo controller
  3. 03 18-DOF hexapod chassis
  4. 04 18× MG995 180° servos
  5. 05 3S LiPo battery
  6. 06 UBEC set to 6 V
  7. 07 HC-SR04 ultrasonic sensor
  8. 08 MPU6050 gyro + accelerometer
  9. 09 NEC IR receiver + remote
  10. 10 4x4 WS2812 RGB LED grid
  11. 11 Passive buzzer

Power

3S LiPo ──► UBEC (6 V) ──► RTrobot servo controller V+ / GND
All grounds tied together

Set the UBEC to 6 V before connecting the servos, and make sure every module shares a common ground.

ESP32 pinout

SignalGPIO
Servo controller (UART0, 115200 baud)TX0 1 / RX0 3
Debug console (Serial2)RX2 16 / TX2 17
HC-SR04 TRIG / ECHO12 / 13
MPU6050 SDA / SCL21 / 22
IR receiver14
RGB LED grid DIN18
Buzzer19
ServosRTrobot channels
Left side (three legs)1–9
Right side (three legs)24–32

The servo controller shares UART0 with the USB bridge, so disconnect it before uploading. scripts/servo_setup centres every channel at 1500 µs for fitting servo horns.

Build status

Walking, nearly finished

The gaits firmware is flashed and he walks better than ever. Left to do:

  1. Blue Loctite on the servo screws (metal threads only).
  2. A bearing under the body, to take the load off the servo horns.
  3. Fit the RGB LED grid and the buzzer.
  4. Calibrate the servo offsets on /calib.

Quick start

Get him walking

  1. Flash scripts/esp32_gaits with flash_gaits.bat (the firmware he runs now) with the servo controller's wires disconnected, then reconnect them.
  2. Feet off the ground, line the legs up on http://<WHIP's IP>:5005/calib: ZERO, trim each servo, SAVE.
  3. Power WHIP. He stands, calibrates his gyro and walks off in Obstacle Avoidance mode 5 s after power-on, while his WiFi joins in the background.
  4. Open http://<WHIP's IP>:5005/, or run the Python controller.
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python scripts/controller.py
SettingValue
Fleet networksRIFT, DREAM, NINA, TINA, the controllers, NORA (the fleet's password, secrets.h)
WHIP's own APWHIP / the fleet's password
Control page / RIFT port5005

Controls

Four ways to drive

Boot default

Obstacle Avoidance

IR 2, the web page, or gamepad Circle.

1 · IR remote

Hold to walk

Arrows walk and turn. 350 ms without a repeat and he stands.

Web

Browser or gamepad

The page's D-pad or the Python controller. 500 ms without a command and he stands.

M / Start · Mind

His own mind

The LLM on his controller drives him. Only on an x86 PC with a GTX 1050 or better; MIND on his page shows only while it’s connected.

Python controller

InputAction
D-pad / arrow keysForward, backward, turn left, turn right
Cross (A)Web control mode (needed before driving)
Circle (B)Obstacle Avoidance mode
Square (X)IR Remote mode
Triangle (Y)Emergency stop (stand)

Driven by NORA

NORA can drive WHIP through her IR transmitter: Samsung-format IR at address 0x0DA3, with the fleet link’s commands 0x48–0x4F (drive, stop, obstacle, manual, speed). Driving switches her into IR Remote mode, and each command runs as the matching remote button. She stands once the link has been quiet for 600 ms (frames can land mid-step). She has one gait speed, so speed is ignored. Link frames print as LINK cmd=0x...

Who's nearby

ESP-NOW + Bluetooth LE: the robots sense each other

Every robot sends a small "I'm here" beacon twice a second. The signal strength says roughly how close each one is, and how it changes says whether it's coming closer, steady or leaving. Coarse, for "who's around": the ultrasonic and ToF sensors still do the precise avoiding.

Zones

Very close to far

Above −45 dBm very close, −60 near, −75 medium, below that far.

Talk

In Brainfuck

Over ESP-NOW each beacon carries a program that prints park, go, wait or hand; the receiver runs it. RIFT decodes them too.

Manners

Who makes way

A parked robot isn't the one moving; a yielding one is making way; a human-driven one gets space; otherwise the alphabet decides, and everyone makes way for MILA.

WHIP hears the others over ESP-NOW (NORA, MILA) and Bluetooth LE (NORA, KIDA-00, KIDA-01). In obstacle mode he stands, then turns away, when a robot with right of way is close. GET /near shows her list.

Screens

Every one of his UIs

All captured on EMULATE: a pretend WHIP on the PC, so you can try every one without the robot.

Servo Studio's 3D view playing his Tripod Forward macro
Walking: his Tripod Forward macro in Servo Studio's 3D view
Body IK: his body slides and tilts over planted feet
Body IK: his body over planted feet
Servo Studio, 3D BODY view
Servo Studio: 3D BODY (support polygon, centre of gravity, body sliders, joint table)
Servo Studio, ROBOT view
Servo Studio: ROBOT (from above and the side; drag a foot)
Servo Studio, LAYOUT view
Servo Studio: LAYOUT (your own linkage drawing)
Servo Studio, SLIDERS view
Servo Studio: SLIDERS (all 32 channels)
WHIP's Python controller on EMULATE
Python controller: every function a button, VOICE, BODY, XML, THEME
WHIP's own web page with WHIP in 3D
His own web page (from his ESP32): gaits and WHIP in 3D

Windows app

A native window on WHIP's page

It opens WHIP's own hosted page in a window, so it always looks the same as the page. It remembers the address, and FIND looks on the fleet list of the network you're on. If WHIP doesn't answer, it says so and lets you change the address.

Macros: record what you do on his page, name it and play it back. In the Python controller, F5 records, F6 plays and F7 picks the next.

STAY CLOSE: press STAY on RITA and he keeps near her, in your hand, stopping about a metre away. It's only been tested in simulation so far.

Play WHIP: the browser game has his Obstacle mode now: press O and he walks himself round the pillars.

Download WHIP-Controller.exe Servo Studio exe

The DREAM Robotics ecosystem
Minds — DREAM companion · TINA engineer · NINA caretaker · RIFT fleet hub · LYCEA training school
Robots — NORA · MILA · WHIP · KIDA-00 · KIDA-01 · IDA · ARM · NIKA · ARIA · AURA weather · FLORA gardener
Remotes — RITA handheld remote