Ejemplo n.º 1
0
def load_env(demo_info):
    xml_filepath = demo_info['xml']
    suffix = xml_filepath[xml_filepath.index('pusher'):]
    prefix = XML_PATH + 'test2_ensure_woodtable_distractor_'
    xml_filepath = str(prefix + suffix)

    env = PusherEnv(**{'xml_file': xml_filepath, 'distractors': True})
    return env
Ejemplo n.º 2
0
 def _load_env(self, xml):
     xml = xml[xml.rfind('pusher'):]
     xml_file = 'sim_push_xmls/test2_ensure_woodtable_distractor_%s' % xml
     xml_file = os.path.join(XML_FOLDER, xml_file)
     env = PusherEnv(**{'xml_file': xml_file, 'distractors': True})
     env.set_visibility(self.render)
     env.render()
     viewer = env.viewer
     viewer.autoscale()
     viewer.cam.trackbodyid = -1
     viewer.cam.lookat[0] = 0.4
     viewer.cam.lookat[1] = -0.1
     viewer.cam.lookat[2] = 0.0
     viewer.cam.distance = 0.75
     viewer.cam.elevation = -50
     viewer.cam.azimuth = -90
     return env
Ejemplo n.º 3
0
def load_env(demo_info):
    xml_path = demo_info['xml']
    xml_filepath = 'sim_push_xmls/' + xml_path.split("/")[-1]
    env = PusherEnv(**{'xml_file': xml_filepath, 'distractors': True})
    return env