How to use the robosuite.models.tasks.TableTopTask function in robosuite

To help you get started, we’ve selected a few robosuite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SudeepDasari / visual_foresight / visual_mpc / envs / mujoco_env / sawyer_env / robosuite_wrappers / SawyerIKEnv.py View on Github external
self.mujoco_arena = BinArena(
            table_full_size=self.table_full_size, table_friction=self.table_friction
        )
        if self.use_indicator_object:
            self.mujoco_arena.add_pos_indicator()

        # The sawyer robot has a pedestal, we want to align it with the table
        self.mujoco_arena.set_origin([0.16 + self.table_full_size[0] / 2, 0, 0])

        # initialize objects of interest
        self.mujoco_objects = OrderedDict()
        for i in range(self._num_objects):
            self.mujoco_objects['obj{}'.format(i)] = random.choice(OBJECTS)()

        # task includes arena, robot, and objects of interest
        self.model = TableTopTask(
            self.mujoco_arena,
            self.mujoco_robot,
            self.mujoco_objects,
            initializer=self.placement_initializer,
        )
        self.model.place_objects()