forked from ERC-BPGC/RoboticArm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CVtest_clientModified.py
38 lines (28 loc) · 987 Bytes
/
CVtest_clientModified.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python3
import robotic_arm_quark.msg
from robotic_arm_quark.msg import CVAction
from robotic_arm_quark.msg import gripAction
import actionlib
import rospy
from geometry_msgs.msg import Point
from std_msgs.msg import Float64, Bool
import roslib
roslib.load_manifest('')
def feedback_cb(msg):
print("feedback recieved : ",msg)
def call_server():
while True:
client = actionlib.SimpleActionClient(
'cv_actionServer', robotic_arm_quark.msg.CVAction)
# Waits until the action server has started up and started
client.wait_for_server()
client.send_goal(feedback_cb = feedback_cb)
client.wait_for_result()
print("successful")
if __name__ == '__main__':
try:
# Initializes a rospy node so that the SimpleActionClient can
rospy.init_node('cv_node', anonymous=False)
call_server()
except rospy.ROSInterruptException:
print("program interrupted before completion")