ROS – Simple pub/sub in python
The following two functions should be launched in two separate python threads. They show how easy ROS enables to create a pub/sub relationship for transferring messages between nodes. sub.py *import rospy* from std_msgs.msg import String def talker(): pub = rospy.Publisher(‘chatter’, String, queue_size=10) rospy.init_node(‘talker’, anonymous=True) rate = rospy.Rate(10) # 10hz whileContinue Reading