KacperSynator / ROS-Game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROS-Game

A simple app using three ROS nodes named:

  • keyboard_reader reads keyboard input from terminal
  • game_display shows the game in a window
  • game_controller handles game logic

Currently there is no purpose in game. Player can just move around the map.
To move the player use "awsd" in terminal running keyboard_reader node. The game window looks like: image

Getting started

Dependancies

sudo apt install cmake libsdl2-dev g++ libncurses5-dev libncursesw5-dev

Run

Build the app first

# from ros2 workspace
. install/local_setup.bash 
colcon build --packages-select ros_game

Then run the app in three separate terminals, remember to source the environment

# in first terminal
. install/local_setup.bash 
ros2 run ros_game keyboard_reader
# to exit this node press 'q'
# in second terminal
. install/local_setup.bash 
ros2 run ros_game game_display
# to exit use ctrl + c
# in third terminal (run always after game_display)
. install/local_setup.bash 
ros2 run ros_game game_controller
# to exit use ctrl + c

About

License:MIT License


Languages

Language:C++ 76.5%Language:CMake 23.5%