CS 188 — Robotics

BRUNO

Baxter Robot Unbelievably Natural Onstage

Music-Synchronized Robot Motion via Beat Detection & PID Control

Robosuite Librosa PID Control MuJoCo Beat Detection Tutting

↓ scroll

01 — Overview

What We Built

A music-synchronized dancing robot system built on Baxter — a dual-arm robot simulated in robosuite/MuJoCo. The system automatically extracts tempo from an audio track, generates time-aligned tutting motion patterns, and drives the robot's joints using a custom PID controller — all synchronized to Uptown Funk by Bruno Mars.

01

Tempo Extraction

Librosa's beat tracker automatically detects BPM and beat timestamps from raw audio. Uptown Funk clocks in at ~117 BPM with 513 beats over 270 seconds.

02

Motion Generation

A choreography system maps detected beat timestamps to a library of tutting poses — geometric, angular arm configurations that snap to each beat.

03

PID Joint Control

A custom PID controller drives all 14 of Baxter's arm joints toward target configurations, computing joint position commands every control timestep.

04

Sync Accuracy

Timing error between detected beat timestamps and actual pose change events is measured and reported, demonstrating synchronization accuracy.

02 — Architecture

System Pipeline

Five modular components work together to produce synchronized robot motion from a raw audio file.

🎵

beat_detection.py

librosa extracts BPM + beat timestamps

📋

choreography.py

maps beats → pose names via cue list

🦾

pose_library.py

14D joint angle arrays per pose

⚙️

pid_controller.py

custom PID computes joint position commands

🤖

robosuite

Baxter sim applies joint commands

See It Dance

Baxter performing a tutting choreography synchronized to Uptown Funk by Bruno Mars.

04 — Stack

Tech Stack

Robosuite

Robot simulation framework

MuJoCo

Physics engine

Librosa

Audio analysis + beat tracking

Baxter Robot

Dual-arm, 14 DOF

Custom PID

Joint position control

Pygame

Audio playback