Emotion Display Robot Face – SAMI
Course: ROB 421: Applied Robotics – Oregon State University
Team: BAJAN Robotics
Repo: Martnat8/ROB421-Portfolio
Demo: @rob421_sami5 on Instagram
Problem
SAMI is a servo-actuated humanoid robot capable of mirroring human motion in real time using MediaPipe pose tracking. The robot needed a face — a display system that could render expressive, animated emotions on an LCD screen mounted on the robot’s head, and be triggered by other parts of the ROS2 system without tight coupling.
What I Did
Animated Face Display (Eye_Test2.py)
Developed the full Pygame-based face animation script designed to run on the Raspberry Pi driving SAMI’s vertically-mounted LCD (480×800, frameless fullscreen overlay).
The animation runs at 60fps and renders:
- Blinking eyes — smooth lid animation on a ~3 second cycle
- Randomized pupil shifts — eyes drift within a ±20px range at random intervals to simulate life-like idle behavior
- Expressive eyebrows — rectangular blocks that track with pupil movement
- Talking mouth — sine-wave-driven mouth animation with occasional “talking” bursts that increase mouth height and speed, triggered by a timed state flag
The display is configured to target the Raspberry Pi’s external LCD via SDL window positioning — designed from the start to run headlessly on the robot.
ROS2 Emotion Service Interface
Designed and implemented a ROS2 service interface allowing any other node in the system to trigger emotion or talking states on the display in real time. The talking boolean and scheduling logic in the face script serve as the LCD-side consumer of this control signal — keeping the display fully decoupled from the motion and pose systems.
This meant the face could be updated independently by any node: the motion mirroring system, a game mode (SAMI Says), or a future interaction layer — without modifying the display code.
Tools Used
- ROS2 — service interface and inter-node communication
- Pygame — real-time animated face rendering
- Raspberry Pi — onboard compute driving the LCD display
- Python — all scripting and animation logic
Meet the Team

Demo
More on @rob421_sami5