Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TurtleBots navigating the physical maze from Start to Finish
Figure 1: Our beloved TurtleBot4

🤖 TurtleBot Maze Explorer: Scratch & Robotics

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."


🌟 The K-12 Success Story

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.

🛠 Technical Architecture (For the Systems Minded)

While the interface is "child's play," the backend is a robust robotics stack designed for reliability and real-time response.

🛰 System Components

  • 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.

⚙️ Implementation Highlights

  • 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.

🏗 System Stack

Category Technology
Robotics ROS , TurtleBot4
Sensors RGB-D Camera, Color Sensors
Backend Python, Web Sockets/Flask
Frontend Scratch-like Visual Interface

🚀 How it Works

  1. The User drags code blocks (e.g., Move Forward, If Red, Turn Right) in the web UI.
  2. The Web Server formats these blocks into a command sequence.
  3. 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. IMG_4023 Screenshot 2025-12-02 at 9 59 50 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages