A Sophisticated Turtlesim Game for ROS

A Sophisticated Turtlesim Game for ROS

Overview

This project demonstrates a game built on the ROS-based TurtleSim platform. The objective is to guide the virtual turtle along a precisely defined path while preventing it from straying outside the boundary. The system leverages real-time sensor feedback and service calls to dynamically enforce game constraints, challenging the user to maintain accuracy and control.

Introduction

In the realm of robotics education and simulation, TurtleSim serves as a powerful tool for illustrating fundamental concepts in ROS. In this project, an interactive game is developed where users are tasked with driving the turtle along a predefined trajectory. By monitoring the turtle’s background color via the "/turtle1/color_sensor" topic, the system detects deviations from the safe path, triggering immediate warnings to the user. This project not only reinforces ROS service utilization but also demonstrates the integration of real-time feedback mechanisms in an engaging manner.

Prerequisites

To successfully build and run this project, ensure that your development environment meets the following requirements:

Building & Installation

The project is structured within a ROS Catkin workspace. Follow these steps to compile and launch the game:


cd ~/catkin_ws/src
git clone https://github.com/jerinpeter/turtle_game.git
cd ..
catkin_make
roslaunch turtle_launch.launch
    

Working in Brief

The game operates by subscribing to the "/turtle1/color_sensor" topic, allowing it to continuously monitor the background color beneath the turtle. The system leverages two key ROS services:

If the turtle deviates from the drawn path, the system issues a warning message to the user, thereby enforcing strict adherence to the game's constraints.

Demo

Turtlesim Game Demo
Figure: Demonstration of the Turtlesim Game in action.

Improvements

Future iterations of the game may include:

References