示例#1
0
 def __init__(self, _name, en_sim):
     self.name = _name
     self.en_sim = en_sim
     self.state = State.init
     self.dual_arm = DualArmTask(self.name, self.en_sim)
     # self.camara = GetObjInfo()
     self.left_cpose_queue = queue.Queue()
     self.right_cpose_queue = queue.Queue()
     self.place_pose_queue = queue.Queue()
     self.object_queue = queue.Queue()
     self.object_list = []
     self.left_tar_obj = queue.Queue()
     self.right_tar_obj = queue.Queue()
     self.retry_obj_queue_left = queue.Queue()
     self.retry_obj_queue_right = queue.Queue()
     self.target_obj_queue = {
         'left': self.left_tar_obj,
         'right': self.right_tar_obj
     }
     self.target_obj = {'left': None, 'right': None}
     self.retry_obj_queue = {
         'left': self.retry_obj_queue_left,
         'right': self.retry_obj_queue_right
     }
     self.obj_done = np.zeros((100), dtype=bool)
     self.obj_retry = np.zeros((100), dtype=bool)
     self.next_level = {'left': False, 'right': False}
    def __init__(self, name_arm_ctrl, en_sim_arm_ctrl):
        # arm control
        self.name_arm_ctrl = name_arm_ctrl
        self.en_sim_arm_ctrl = en_sim_arm_ctrl
        self.dual_arm = DualArmTask(self.name_arm_ctrl, self.en_sim_arm_ctrl)

        # state machine
        self.state = State.init

        # object information
        self.camera = GetObjInfo()
        self.curr_merchandise_list = []

        # self.place_pose_queue = queue.Queue()

        # self.object_queue = queue.Queue()   #object detected from both camera
        self.expired_queue = queue.Queue()  #no reorient
        self.old_queue = queue.Queue()  #need reorient
        self.new_queue = queue.Queue()  #no reorient

        #current level
        self.expired_done = False  #this_level_expired_done
        self.old_done = False  #this_level_old_done
        self.new_done = False  #this_level_new_done

        self.left_tar_obj = queue.Queue()
        self.right_tar_obj = queue.Queue()
        self.target_obj_queue = {
            'left': self.left_tar_obj,
            'right': self.right_tar_obj
        }
        self.target_obj = {'left': None, 'right': None}
 def __init__(self, _name, en_sim):
     self.arm_move = False
     self.state = State.move
     self.is_done = {'left': False, 'right': False}
     self.name = _name
     self.en_sim = en_sim
     self.dual_arm = DualArmTask(self.name, self.en_sim)
示例#4
0
 def __init__(self, _name, en_sim):
     self.name = _name
     self.en_sim = en_sim
     self.state = State.init
     self.dual_arm = DualArmTask(self.name, self.en_sim)
     self.pick_left_queue = queue.Queue()
     self.pick_right_queue = queue.Queue()
     self.place_left_queue = queue.Queue()
     self.place_right_queue = queue.Queue()
     self.sucang_left_queue = queue.Queue()
     self.sucang_right_queue = queue.Queue()
     self.init()
     self.pick_pose = {'left': self.pick_left_queue, 'right': self.pick_right_queue}
     self.place_pose = {'left': self.place_left_queue, 'right': self.place_right_queue}
     self.place_sucang = {'left': self.sucang_left_queue, 'right': self.sucang_right_queue}