The AIML client node

The client code will wait for user input and publish the user input to the /chatter topic:

    #!/usr/bin/env python 
    import rospy 
    from std_msgs.msg import String 
    pub = rospy.Publisher('chatter', String,queue_size=10) 
    rospy.init_node('aiml_client') 
    r = rospy.Rate(1) # 10hz 
 
    while not rospy.is_shutdown(): 
       input = raw_input("
Enter your text :> ") 
       pub.publish(input) 
       r.sleep() 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.78.179