- Notifications
You must be signed in to change notification settings - Fork18
Pong game for ROS turtlesim.
fjp/ros-turtle-pong
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository hosts the source code for the ROSturtle_pong
package, which implements the Pong arcade video game for the Robot Operating System (ROS 1 Noetic) using turtlesim.
To learn how the package was created, please read thedocumentation.
To use theturtle_pong
package, clone this repository into thesrc
folder of your catkin workspace:
fjp@ubuntu:/home/fjp/catkin_ws/src$git clone https://github.com/fjp/ros-turtle-pong.git
Then build the workspace withcatking-tools
orcatkin_make
and source the new package:
#catkin-tools:fjp@ubuntu:/home/fjp/catkin_ws$catkin build#or usefjp@ubuntu:/home/fjp/catkin_ws$catkin_make#source your workspace using the setup.bash or setup.zsh depending on your shellfjp@ubuntu:/home/fjp/catkin_ws$source devel/setup.bashfjp@ubuntu:/home/fjp/catkin_ws$source devel/setup.zsh
Finally, startroscore
, runturtlesim
andpong.launch
:
roscorerosrun turtlesim turtlesim_noderoslaunch 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.
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 scoreboard logic (for example, using a new turtle to draw player scores)
- Fix bounce angle logic when the ball hits a paddle.
- Add AI Player
- Improve keyboard input
- Fix the order of node launches
- ...
The short video below gives more insights into what is currently implemented: