Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import rospy
00019 from cob_control_msgs.srv import GetObstacleDistance, GetObstacleDistanceRequest, GetObstacleDistanceResponse
00020
00021 if __name__ == "__main__":
00022 rospy.wait_for_service('/calculate_distance')
00023 try:
00024 client = rospy.ServiceProxy('/calculate_distance', GetObstacleDistance)
00025 req = GetObstacleDistanceRequest()
00026 req.links.append("arm_left_7_link")
00027 res = client(req)
00028 print res
00029 except rospy.ServiceException, e:
00030 print "Service call failed: %s"%e