MetaLocomotion implement canonical gym bullet locomotion environments, but with diversed geometries. The repo is inspired by PyBulletGym. We provide a total of 368 ants and 368 humanoids, which have diverse limb lengths, sampled by multiplying the original limb length by random numbers. Among those configurations, 256 of them are training set, 64 are testing set, the left 64 are extreme examples or out-of-distribution (OOD) testing set, which is exceptionally harder to control.
Currently we support
pip install metagym[metalocomotion]git clone https://github.com/PaddlePaddle/MetaGym
cd MetaGym
pip install .[metalocomotion]Import and create the meta maze environment with
import gym
import metagym.metalocomotion
loco_env = gym.make("meta-humanoids-v0", enable_render=False, max_steps=1000) # Running meta humanoids
#loco_env = gym.make("meta-ants-v0") # Running meta antsUse the following code to sample an unique geometry
#Sample a task by specifying the configurations
task = loco_env.sample_task(
task_type = "TRAIN" # we provide 256 geometries for training
#task_type = "TEST" # we provide 64 geometries for testing
#task_type = "OOD" # we provide 64 extreme testing cases
)#Set the task configuration to the meta environment
loco_env.set_task(task)
loco_env.render()
loco_env.reset()
#Start the task
done = False
while not done:
action = loco_env.action_space.sample()
observation, reward, done, info = loco_env.step(action)
