23 from geometry_msgs.msg
import PoseStamped
25 import cob_pick_place_action.msg
34 place_action_client.wait_for_server()
37 goal = cob_pick_place_action.msg.CobPlaceGoal()
40 goal.object_class = 50
41 goal.object_name =
"instantsoup" 45 pose.header.stamp = rospy.Time.now()
46 pose.header.frame_id =
"base_footprint" 51 pose.pose.position.x = -0.7
52 pose.pose.position.y = -0.5
53 pose.pose.position.z = 0.9
54 pose.pose.orientation.x, pose.pose.orientation.y, pose.pose.orientation.z, pose.pose.orientation.w = quaternion_from_euler(0,0,0)
55 goal.destinations.append(pose)
59 place_action_client.send_goal(goal)
62 finished_before_timeout=place_action_client.wait_for_result(rospy.Duration(300, 0))
64 if finished_before_timeout:
65 state=place_action_client.get_state()
66 print "Action finished: %s"%state
70 if __name__ ==
'__main__':
74 rospy.init_node(
'CobPlaceAction_client_py')
76 except rospy.ROSInterruptException:
77 print "program interrupted before completion"
def cob_place_action_client()