def execute(self, userdata): global_data.sub_image = rospy.Subscriber('/vision_objects', DetectedObjects, self.object_callback) global_data.move_base_client = actionlib.SimpleActionClient('move_base', move_base_msgs.msg.MoveBaseAction) global_data.pub_vel = rospy.Publisher('/cmd_vel', Twist) global_data.ik = youbot_ik_solution_modifier() global_data.detected_objects_counter = 0 sleep(2) global_data.ik.open_gripper() global_data.ik.open_gripper() global_data.ik.open_gripper() return 'done'
def execute(self, userdata): global_data.ik = youbot_ik_solution_modifier() global_data.pubVel = rospy.Publisher('/cmd_vel', Twist) userdata.object_counter_out = copy.deepcopy(userdata.object_counter_in) userdata.alignment_out = copy.deepcopy(userdata.alignment_in) userdata.service_area_height_out = self.__get_service_area_height(userdata.service_area_name_in) userdata.std_joint_position_out = self.__get_joint_start_position() userdata.zick_zack_out = self.__get_zick_zack_positions() userdata.line_out = self.__get_line_positions() userdata.circle_out = self.__get_circle_positions() return 'done'
def execute(self, userdata): userdata.task_spec_out = const_hack(userdata.task_spec_iin) global_data.pubVel = rospy.Publisher('/cmd_vel', Twist) global_data.pubVel.publish(Twist()) global_data.ik = youbot_ik_solution_modifier() time.sleep(2) global_data.ik.open_gripper() #test pos = self.get_joint_start_position() userdata.joint_start_position_out = pos global_data.ik.change_pos(pos) time.sleep(2) userdata.object_lengths_out = self.get_object_lengths() userdata.service_areas_out = self.get_service_areas() userdata.joint_start_position_out = pos userdata.overview_position_out = pos return 'initialized'