Exemplo n.º 1
0
 def __init__(self, xml):
     WalkerBase.__init__(self,
                         xml,
                         "torso",
                         action_dim=8,
                         obs_dim=28,
                         power=2.5)
def _robo_init(self, model_xml, robot_name, action_dim, obs_dim):
    WalkerBase.__init__(self,
                        model_xml,
                        robot_name,
                        action_dim,
                        obs_dim,
                        power=0.40)
Exemplo n.º 3
0
 def __init__(self, xml, param, env, powercoeffs=[1., 1., 1.]):
     self.step_num = 0
     self.env = env
     self.xml = xml
     self.param = param
     self.powercoeffs = powercoeffs
     WalkerBase.__init__(self, xml, "torso", action_dim=6, obs_dim=22, power=0.40)
Exemplo n.º 4
0
 def __init__(self):
     # change obs_dim from 22 to 23
     WalkerBase.__init__(self,
                         "walker2d.xml",
                         "torso",
                         action_dim=6,
                         obs_dim=23,
                         power=0.40)
Exemplo n.º 5
0
 def __init__(self, xml, param, render=False):
     self.param = param
     WalkerBase.__init__(self,
                         xml,
                         "torso",
                         action_dim=6,
                         obs_dim=22,
                         power=0.40)
Exemplo n.º 6
0
 def __init__(self):
     WalkerBase.__init__(
         self,
         "humanoid_symmetric_2.xml",
         "torso",
         action_dim=19,
         obs_dim=44,
         power=0.41,
     )
Exemplo n.º 7
0
 def __init__(self):
     WalkerBase.__init__(self,
                         getResourcePath() + "/Walker2d_five.xml",
                         "torso",
                         action_dim=4,
                         obs_dim=18,
                         power=0.40)
     self.init_pos = [-0.86647779, -5.57969548, 4.56618282, -0.86647779]
     self.init_vel = [-0.08985754, 2.59193943, -0.48066481, 1.88797459]
Exemplo n.º 8
0
 def __init__(self, xml, powercoeffs=[1., 1., 1.]):
     self.step_num = 0
     self.powercoeffs = powercoeffs
     WalkerBase.__init__(self,
                         xml,
                         "torso",
                         action_dim=6,
                         obs_dim=22,
                         power=0.40)
Exemplo n.º 9
0
 def __init__(self, scale=1):
     WalkerBase.__init__(self,
                         "ant.xml",
                         "torso",
                         action_dim=8,
                         obs_dim=30,
                         power=2.5)
     self.walk_target_x = 0
     self.walk_target_y = 0
     self.SCALE = scale
Exemplo n.º 10
0
 def __init__(self, design=None, design_mode='24lr'):
   self.design_mode = design_mode
   self.design = design
   self._adapted_xml_file = tempfile.NamedTemporaryFile(delete=False, prefix='ant_', suffix='.xml')
   self._adapted_xml_filepath = self._adapted_xml_file.name
   file = self._adapted_xml_filepath
   self._adapted_xml_file.close()
   atexit.register(cleanup_func_for_tmp, self._adapted_xml_filepath)
   self.adapt_xml(self._adapted_xml_filepath, design)
   WalkerBase.__init__(self, file, "torso", action_dim=8, obs_dim=28, power=2.5)
Exemplo n.º 11
0
 def __init__(self, xml, param):
     self.param = param
     WalkerBase.__init__(self,
                         xml,
                         "torso",
                         action_dim=6,
                         obs_dim=22,
                         power=0.5)
     self.height_using_knees = (
         self.param["z0"] + self.param["z1"]) / 2 - self.param["z2"] + 0.1
Exemplo n.º 12
0
 def __init__(self):
     WalkerBase.__init__(self,
                         "ant.xml",
                         "torso",
                         action_dim=8,
                         obs_dim=34,
                         power=2.5)
     self.walk_target_x = 0
     self.walk_target_y = 0
     self.init_ball_pos = [0, 0, .25]
     self.init_robot_pos = [0, -1.5, .5]
Exemplo n.º 13
0
 def __init__(self, xml, param, name, env, powercoeffs=[1., 1., 1.]):
     self.step_num = 0
     self.env = env
     self.xml = xml
     # remove private params
     private_keys = []
     for key in param:
         if key.startswith("_"):
             private_keys.append(key)
     for key in private_keys:
         del param[key]
     self.param = param
     self.name = name
     self.powercoeffs = powercoeffs
     self.sqrt2 = np.sqrt(2)
     WalkerBase.__init__(self, xml, "torso", action_dim=8, obs_dim=28, power=2.5) # larger power? because we have larger bodies in variation. original = 2.5
Exemplo n.º 14
0
 def __init__(self):
     self.p = None
     self.camera_width = 256
     self.camera_height = 256
     self.camera_channel = 3
     self.gravity = -9.8
     super().__init__()
     
     # Reset the robot XML file:
     total_joints = 18
     WalkerBase.__init__(self,
                         f'{os.getcwd()}/erl/envs/xmls/humanoid_symmetric.xml',
                         'torso',
                         action_dim=total_joints,
                         # 10 real numbers of basic information
                         # each joint has 2 real numbers (position, velocity)
                         # WxHxC from camera image
                         obs_dim=10 + total_joints*2 + self.camera_width*self.camera_height*self.camera_channel, 
                         power=0.41)
Exemplo n.º 15
0
 def __init__(self, xml):
     WalkerBase.__init__(
         self, xml, "torso", action_dim=0, obs_dim=0, power=0.75
     )  # action_dim and obs_dim will be set automatically in function reset_spaces()
     self.body_parts = None