This is the first laboratory work using ROS.
- I have the third variant, so I made a Squid Game prototype.
- The game receives the following symbols as input: 'l' and 'r'.
- If the symbol is similar to a certain symbol of the path, the game returns "Good choice... Let's go to the next one!" and the path that you have made.
- If the symbol is not similar to a certain symbol of the path, the game returns "You are dead" and shuts down the server node.
- All right messages are saved in "game_topic" topic.
- If the path that you have made is similar to the game path, you will receive the message: "You won, little piece of shit!..".
- Clone this project.
- Go to your project directory.
- Build the project using
catkin_make
- You must have a roscore running in order for ROS nodes to communicate. It is launched using the following command
roscore
- Go to your project directory.
- You need to run setup.bash file to add environment variables to your path to allow ROS to function. Run in with the next command
source devel/setup.bash
- Run the server that will process your requests. Use this command
rosrun first_laboratory_work subscriber
- Use this command to see messages in the topic
rostopic echo /game_topic
- Use this command to call the service to play the game
rosservice call /path_to_win "turn: ''"
You have to input your variant of the turn variable in single quotes that are underlined. You have to use 'l' / 'left' or 'r' / 'right'.