ROS(009: Writing a Simple Publisher and Subscriber(Python))

$ roscd beginner_tutorials

$ mkdir scripts

$ cd scripts

$ wget https://raw.github.com/ros/ros_tutorials/kinetic-devel/rospy_tutorials/001_talker_listener/talker.py

$ chmod +x talker.py

the code of talker.py:

 

$ roscd beginner_tutorials/scripts/

$ wget https://raw.github.com/ros/ros_tutorials/kinetic-devel/rospy_tutorials/001_talker_listener/listener.py

$ chmod +x listener.py

 

 

Ref:

http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28python%29

 

 

打赏