To implement the classic snake game using turtlesim simulator.
The game makes use of turtlesim and turtlesim_teleop packages to move a snake turtle, in order to capture the target . Upon capturing the target turtle, a new turtle appears, which will be the new target turtle, and the previously captured turtle becomes part of the snake turtle. The process repeats with the capture of every turtle.
- UBUNTU 18.04
- ROS MELODIC
- Create a catkin_workspace.
- Inside catkin workspace, create a new package named ‘project’.
- Inside the source folder ‘project’, create a new python file named ‘snake_turtle’.
- Create a launch file in the package.
- Open a terminal and source it.
- Launch the launch file.
Turtle Game |
Terminal whent the Game is over |