Exemple #1
0
 def __init__(self):
     URDFBasedRobot.__init__(
         self,
         model_urdf='../../../../urdf/normal/pendulum_normal.urdf',
         robot_name='pendulum_normal',
         action_dim=1,
         obs_dim=2)
 def __init__(self):
     URDFBasedRobot.__init__(
         self,
         model_urdf='../../../../urdf/cart/pendulum_cart.urdf',
         robot_name='pendulum_cart',
         action_dim=1,
         obs_dim=5)
 def __init__(self):
     WalkerBase.__init__(self, power=2.9)
     URDFBasedRobot.__init__(
         self,
         "atlas/atlas_description/atlas_v4_with_multisense.urdf",
         "pelvis",
         action_dim=30,
         obs_dim=70)
Exemple #4
0
 def __init__(self):
     URDFBasedRobot.__init__(
         self,
         '../robots/peg/peg_description/cuboid_peg.urdf',
         'cart',
         action_dim=3,
         obs_dim=9,
         basePosition=[0, 0, 0.0235],
         fixed_base=True)
Exemple #5
0
 def __init__(self, random_yaw=False, random_lean=False, **kwargs):
     ParkourRobot.__init__(self, **kwargs)
     URDFBasedRobot.__init__(self,
                             'biped.urdf',
                             'base',
                             action_dim=14,
                             obs_dim=28,
                             basePosition=(0, 0, 1))
     self.random_yaw = random_yaw
     self.random_lean = random_lean
Exemple #6
0
    def __init__(self,
                 base_position=(0, -0.65, 0.625),
                 use_IK=False,
                 control_orientation=True,
                 shelf=False):
        plane_path = os.path.join(pybullet_data.getDataPath(), "plane.urdf")
        plane_kwargs = {
            'useFixedBase': True,
            'basePosition': [0, 0, 0],
            'baseOrientation': [0, 0, 0, 1]
        }
        if not shelf:
            table_path = os.path.join(self.asset_path(),
                                      "things/table/table.urdf")
        else:
            table_path = os.path.join(self.asset_path(),
                                      "things/table/table_shelf.urdf")
        table_kwargs = {
            'useFixedBase': True,
            'basePosition': [0, 0, 0],
            'baseOrientation': [0, 0, 0, 1]
        }
        target_path = os.path.join(self.asset_path(),
                                   "things/sphere_small_red.urdf")
        target_kwargs = {
            'useFixedBase': True,
            'basePosition': [0, 0, 0.8],
            'baseOrientation': [0, 0, 0, 1]
        }
        URDFBasedRobot.__init__(self,
                                model_urdf='franka_panda/panda_model.urdf',
                                robot_name='panda',
                                action_dim=7,
                                obs_dim=22,
                                basePosition=base_position,
                                baseOrientation=[0, 0, 0.7071068, 0.7071068],
                                fixed_base=True,
                                self_collision=True,
                                additional_urdfs=[(plane_path, plane_kwargs),
                                                  (table_path, table_kwargs),
                                                  (target_path, target_kwargs)
                                                  ])
        self._joint_name_to_ids = {}
        self.robot_id = 0
        self._use_IK = use_IK
        self._control_orientation = control_orientation
        self.end_eff_idx = 9

        self._workspace_lim = [[0.3, 0.65], [-0.3, 0.3], [0.65, 1.5]]
        self._eu_lim = [[-m.pi, m.pi], [-m.pi, m.pi], [-m.pi, m.pi]]
        self.action_dim = 7
Exemple #7
0
 def __init__(self, random_yaw=False, random_lean=False, **kwargs):
     # quadruped = p.loadURDF("laikago/laikago_toes.urdf", [0, 0, .5], [0, 0.5, 0.5, 0],
     #                        flags=urdfFlags,
     #                        useFixedBase=False)
     ParkourRobot.__init__(self, **kwargs)
     URDFBasedRobot.__init__(self,
                             'laikago/laikago_toes.urdf',
                             'base',
                             action_dim=16,
                             obs_dim=60)
     self.last_action = (0, ) * 16
     self.action_difference = 0  # l2 norm between successive actions -> important for position control
     self.positions = (0, ) * 16
     self.torques = (0, ) * 16
     self.velocities = (0, ) * 16
Exemple #8
0
    def __init__(self, add_feature='pose', window_size=5):
        self.add_feature = add_feature
        self.window_size = window_size
        if self.add_feature in 'force':
            self.obs_dim = 5
        elif self.add_feature in 'force_window':
            self.obs_dim = 2 * window_size + 3
        else:
            self.obs_dim = 4

        URDFBasedRobot.__init__(
            self,
            '../robots/gripper/gripper_description/simple_gripper.urdf',
            'cart',
            action_dim=4,
            obs_dim=self.obs_dim,
            basePosition=[0, 0, 0.025],
            fixed_base=True,
            self_collision=False)

        self.max_obs = np.zeros((self.obs_dim, ))
        self.min_obs = np.zeros((self.obs_dim, ))