ROS(011: Writing a Simple Publisher and Subscriber(C++))

$ roscd beginner_tutorials

$ mkdir -p src

$ vi talker.cpp

content:

 

$ vi listener.cpp

content:


now build:

cd ~/catkin_ws/src/beginner_tutorials

$ vi CMakeList.txt

add following to CMakeList.txt:

$ cd ~/catkin_ws

$ catkin_make

Now build finished, see the result:

ROS(010: Examining the Simple Publisher and Subscriber)

 

 

打赏