Game similar to the mythical snake game. Programmed in Python 3 using the ROS libraries and turtlesim tool. The version of ROS used in this project is ROS Noetic.
Gameplay video: https://youtu.be/EjjR5Xkh8b0
- Web control panel to interact with the game (Rosbridge & roslibjs) using the buttons on the page or even the arrow keys!
- Display of the current game level
- Automatic turtle spawning when one is caught
- Background color change when a turtle is caught
- Collision detection of the main turtle with the following ones
- Collision detection of the main turtle with the game window walls
- Possibility of restarting the game when the game is over.
You will need to have ROS & Python installed on your operating system. This project has been developed using:
Open terminal and navigate to src folder in your catkin workspace:
cd ~/catkin_ws/srcThen clone the repository using:
git clone https://github.com/AngelLM/learning_tfOnce it is completed, do the following:
cd ~/catkin_ws
catkin_makeTo run the game, open a terminal and execute the following command:
roslaunch learning_tf start_demo.launchThen navigate to the folder ~/catkin_ws/src/learning_tf/web-controller and open the file controller.html or open a new terminal and execute the following command:
firefox ~/catkin_ws/src/learning_tf/web-controller/controller.htmlWith the control panel open you can now click on the START button to start the game. With the LEFT and RIGHT buttons you can control the rotation of the main turtle. You can also use the left and right arrow keys on your keyboard to control the turtle! Enjoy!
