How to use the robosuite.environments.sawyer.SawyerEnv 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
from robosuite.models.robots import Sawyer
    from robosuite.models.tasks import TableTopTask, UniformRandomSampler
    from robosuite.wrappers import IKWrapper
except ImportError:
    print("Robosuite is required to use this module. Please try ' pip install robosuite' ")
    raise ImportError()


def make_sawyer_env(hparams_dict):
    return IKWrapper(SawyerMultiObjEnv(**hparams_dict))


OBJECTS = [BreadObject, MilkObject, LemonObject, CanObject, BottleObject, CerealObject]


class SawyerMultiObjEnv(SawyerEnv):
    """
    This class corresponds to the lifting task for the Sawyer robot arm.
    """

    def __init__(
        self,
        gripper_type="TwoFingerGripper",
        table_full_size=(0.8, 0.8, 0.8),
        table_friction=(1., 5e-3, 1e-4),
        use_camera_obs=True,
        use_object_obs=True,
        reward_shaping=False,
        placement_initializer=None,
        gripper_visualization=False,
        use_indicator_object=False,
        has_renderer=False,