Statistics
| Branch: | Revision:

root / quad2 / arduino / src / ros_lib / examples / ServiceClient / client.py @ c1426757

History | View | Annotate | Download (422 Bytes)

1
#!/usr/bin/env python
2

    
3
""" 
4
Sample code to use with ServiceClient.pde
5
"""
6

    
7
import roslib; roslib.load_manifest("rosserial_arduino")
8
import rospy
9

    
10
from rosserial_arduino.srv import *
11

    
12
def callback(req):
13
    print "The arduino is calling! Please send it a message:"
14
    t = TestResponse()
15
    t.output = raw_input()
16
    return t
17

    
18
rospy.init_node("service_client_test")
19
rospy.Service("test_srv", Test, callback)
20
rospy.spin()