Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Turtle Pong

This repository hosts the source code for the ROS turtle_pong package which implements the Pong arcade video game for the Robot Operating System (ROS 1 Noetic) using turtlesim.

Short Game Play

To learn how the package was created, please read the documentation.


To use the turtle_pong package clone this repository into the src folder of your catkin workspace:

fjp@ubuntu:/home/fjp/catkin_ws/src$ git clone

Then build the workspace with catking-tools or catkin_make and source the new package:

# catkin-tools:
fjp@ubuntu:/home/fjp/catkin_ws$ catkin build
# or use
fjp@ubuntu:/home/fjp/catkin_ws$ catkin_make
# source your workspace using the setup.bash or setup.zsh depening on your shell
fjp@ubuntu:/home/fjp/catkin_ws$ source devel/setup.bash
fjp@ubuntu:/home/fjp/catkin_ws$ source devel/setup.zsh

Finally start roscore, run turtlesim and pong.launch:

rosrun turtlesim turtlesim_node
roslaunch turtle_pong pong.launch

Note that each of the three commands above should be executed from another terminal so that it will run in its own process.

The game can be played with the w/s keys and the up/down arrow keys to control the left and right player (turtle) respectively.

ROS Node Graph

rqt node graph

Current Version and Missing Features

This is the first release (version 0.0.0). The following features are planned and contributions to them or new features and code improvements are welcome.

  • Handle missed ball cases (left and right)
  • Add score board logic (for example using new turtle to draw player scores)
  • Fix bounce angle logic when ball hit a paddle.
  • Add AI Player
  • Improve keyboard input
  • Fix order of node launches
  • ...

The short video below gives more insights on what is currently implemented:

Turtle Pong YouTube