def init(self, env: FinalEnv): self.phase = 0 self.drive = 0 meta = env.get_metadata() self.box_ids = meta['box_ids'] r1, r2, c1, c2, c3, c4 = env.get_agents() self.ps = [1000, 800, 600, 600, 200, 200, 100] self.ds = [1000, 800, 600, 600, 200, 200, 100] r1.configure_controllers(self.ps, self.ds) r2.configure_controllers(self.ps, self.ds)
def init(self, env: FinalEnv): """called before the first step, this function should also reset the state of your solution class to prepare for the next run """ meta = env.get_metadata() self.box_ids = meta['box_ids'] self.bin_id = meta['bin_id'] robot_left, robot_right, c1, c2, c3, c4 = env.get_agents() self.spade_id = robot_right.get_metadata()['link_ids'][-1] self.ps = [1000, 800, 600, 600, 200, 200, 100] self.ds = [1000, 800, 600, 600, 200, 200, 100] robot_left.configure_controllers(self.ps, self.ds) robot_right.configure_controllers(self.ps, self.ds) self.box_num = self.check_box(c2) self.top_view, self.front_view = self.get_bin(c1, c2, c3, c4)
def init(self, env: FinalEnv): self.phase = 0 self.drive = 0 self.env = env meta = env.get_metadata() self.box_ids = meta['box_ids'] r1, r2, c1, c2, c3, c4 = env.get_agents() self.ps = [1000, 800, 600, 600, 200, 200, 100] self.ds = [1000, 800, 600, 600, 200, 200, 100] r1.configure_controllers(self.ps, self.ds) r2.configure_controllers(self.ps, self.ds) # get the box location from the overhead camera # measure the bin self.bin_id = meta['bin_id'] self.basic_info = {} self.locate_bin_bbox(c4) self.measured = False