Figure 1: Our beloved TurtleBot4
An Interactive Learning Platform for Future Engineers
Welcome to the HRI-Final project! This platform bridges the gap between block-based programming (Scratch-like) and real-world robotics. We built an environment where K-12 students can command a TurtleBot to navigate complex mazes using logic, sensors, and a little bit of "robot dancing."
We put our system to the test when two groups of K-12 students visited our lab! It was a thrilling success:
- Mission Accomplished: Both groups successfully navigated through Level 2 of the maze.
- The "Aha!" Moment: Students discovered the power of loops firsthand. One group programmed a "forever turn right" block, watching in delight as the TurtleBot twirled endlessly—perfectly demonstrating the concept of an infinite loop in a physical space.
While the interface is "child's play," the backend is a robust robotics stack designed for reliability and real-time response.
- Compute: Raspberry Pi-powered TurtleBot3 running ROS (Robot Operating System).
- Vision & Sensing: * Depth Camera: Utilized for obstacle detection and spatial awareness.
- Color Sensor: Integrated to identify maze milestones and goal states.
- Communication: A custom Web Server acts as the bridge, receiving formatted JSON blocks from the Scratch interface and translating them into ROS Twist messages and service calls.
- Asynchronous Command Pipeline: Developed a logic handler that parses block-based sequences into a queue of deterministic robot actions.
- Sensor Fusion: Combined RGB-D data to ensure the robot could detect both "walls" (depth) and "path markers" (color) simultaneously.
- State Management: Implemented a robust state machine to handle transitions between "moving," "turning," and "sensing" to prevent command overlapping.
| Category | Technology |
|---|---|
| Robotics | ROS , TurtleBot4 |
| Sensors | RGB-D Camera, Color Sensors |
| Backend | Python, Web Sockets/Flask |
| Frontend | Scratch-like Visual Interface |
-
The User drags code blocks (e.g.,
Move Forward,If Red, Turn Right) in the web UI. - The Web Server formats these blocks into a command sequence.
-
The ROS Node subscribes to these commands and translates them into motor velocities (
$v, \omega$ ) while monitoring sensor feedback to ensure the robot stays within the maze boundaries.
Developed as part of the Human-Robot Interaction Final @ Cornell Tech.
