Mimic Environment

File Location: mujoco/gym_mimic_envs/mimic_env.py

Purpose

The MimicEnv is the base class for all our environments. It extends the MujocoEnv for the usage within the DeepMimic Framework. The main function of the class is step() which runs the simulation for the specified amount of frames (cf. frame_skip). Within this class, we also load the reference trajectories and use them for episode initialization and reward calculation.

Main Functions

step(action)

It’s main purpose is to execute an action in the environment and return the current observations of the environment’s state.

Note

Distinguish simulation and control frequencies! We’re running the MuJoCo simulation at 1kHz (_sim_freq). As this might be a too high frequency for the policy to deal with, we’re using the well known trick of applying the same action for multiple (_frame_skip) simulation frames resulting in a control frequency of \(f_{ctrl} = f_{sim} / \text{frame_skip}\).