https://github.com/xbpeng/DeepMimic
Raw File
Tip revision: 70e7c6b22b775bb9342d4e15e6ef0bd91a55c6c0 authored by xbpeng on 30 April 2022, 17:36:51 UTC
Merge pull request #173 from WilliamTambellini/buildLinux
Tip revision: 70e7c6b
DeepMimic_Optimizer.py
import numpy as np
import sys
from env.deepmimic_env import DeepMimicEnv
from learning.rl_world import RLWorld
from util.logger import Logger
from DeepMimic import update_world, update_timestep, build_world
import util.mpi_util as MPIUtil

args = []
world = None

def run():
    global update_timestep
    global world

    done = False
    while not (done):
        update_world(world, update_timestep)

    return

def shutdown():
    global world

    Logger.print('Shutting down...')
    world.shutdown()
    return

def main():
    global args
    global world

    # Command line arguments
    args = sys.argv[1:]

    world = build_world(args, enable_draw=False)

    run()
    shutdown()

    return

if __name__ == '__main__':
    main()
back to top