https://github.com/mataruzz/turtlesnake_game
The Turtlesim Snake Game is a project that offers a nostalgic twist on the classic Snake game by using the Turtlesim robot simulator in ROS.
https://github.com/mataruzz/turtlesnake_game
game ros turtlesim
Last synced: 10 months ago
JSON representation
The Turtlesim Snake Game is a project that offers a nostalgic twist on the classic Snake game by using the Turtlesim robot simulator in ROS.
- Host: GitHub
- URL: https://github.com/mataruzz/turtlesnake_game
- Owner: mataruzz
- Created: 2023-04-22T20:24:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-08T17:51:01.000Z (about 3 years ago)
- Last Synced: 2025-04-07T03:33:44.316Z (about 1 year ago)
- Topics: game, ros, turtlesim
- Language: C++
- Homepage:
- Size: 2.18 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TurtleSnake Game
## About The Project
Relive the nostalgia of the classic **Snake** game with a unique twist in the Turtlesim Snake Game repository. Developed using **Turtlesim**, a popular robot simulator in ROS, this project demonstrates the flexibility and fun of ROS in a game setting. Developed with the aim to increase confidence in fundamental **ROS** tools such as *Subscribers*, *Publishers*, *Services*, and *Parameters*, this project provides an engaging and fun way to learn. With the game implemented in both *Python* and *C++*, users can explore the differences between the two and hone their skills in each language. Both the scripts are located in src/game/src folder.
The game use **turtlesim_node** and **turtle_teleop_key** node to controll the snake. As soon as the game starts, a new turtle spawn, becoming the target to the snake. Once the snake reach the target, it will be moved to the tail of the snake, and a new turtle will be spawn. The game repeat undefinetly... but... stay away from the wall, or the snake will die.
Gif speed: x3
## Installation
Since this game is based on other packages, turtlesim must be installed first
```sh
sudo apt-get install ros-$(rosversion -d)-turtlesim
```
Then, clone the turtleSnake_game repository:
```sh
cd ~/
git clone https://github.com/mataruzz/turtleSnake_game.git
```
## Run
Build the project with ***CATKIN BUILD***
```sh
cd ~/turtleSnake_game
catkin build
```
Source the environment
```sh
source devel/setup.bash
```
Launch the game
```sh
roslaunch game start_game.launch
```