Examining the Simple Publisher and Subscriber
From Lofaro Lab Wiki
1) In a new terminal run roscore:
roscore
2) In a new terminal (terminal 2) go to your workspace and source your devel file(if you used catkin like this series of tutorials):
cd ~/catkin_ws source ./devel/setup.bash
3) In terminal 2, run the talker.
For C++:
rosrun beginner_tutorials talker
For Python:
rosrun beginner_tutorials talker.py
This terminal should begin to print "hello world" messages.
4) In a new terminal (terminal 3) go to your workspace and source your devel file(if you used catkin like this series of tutorials):
cd ~/catkin_ws source ./devel/setup.bash
5) In terminal 3, run the listener:
For C++:
rosrun beginner_tutorials listener
For Python:
rosrun beginner_tutorials listener.py
This terminal should begin to print "I heard hello world" messages.