Homework 1: The Telephone Game
The Objective of the homework is to make you familiar with the basics of organizaing your ROS codebase, and comfortable with basic ROS communication via topics.
Objective
Create 4 ROS nodes node_A
, node_B
, node_C
, node_D
in a single package, and initializae each node with a publisher and a subscriber.
Each node has a publisher on a topic named (outgoing_LETTER) and a subscriber on a topic named (incoming_LETTER).
You need to make sure that node_A
tells node_B
a secret message, then node_B
adds a letter to the message and tells it to node_C
, then node_C
does the same and tells it to node_D
, and then finally node_D
does the same and tells it back to node_A
.
You need to know specifically how to name these topics, as the naming scheme will influence the network. Try to dray the network on a paper before implementing it.
node_A
will then print the original message and the one it recieves through this telephone line. You should make it so that node_A
starts this sequnce periodically every 2 seconds.
The sequence of eventes will be prompted by node_A
publishing to the telephone line, so it is good behaviour to launch node_B
, node_C
, and node_D
, and then run node_A
to start the events.
Monitor each topic separetly if you want using rqt, or using the CLI commands of rostopic.
Use the rqt introspection (google how to) to plot your nodes and their topics.
Submission Guideline
- Create a github or gitlab repository.