Multi-agent Quadruped Environment(MQE) is a multi-functional and easy-to-use quadruped-simulation environment based on Isaac Gym that supports multi-agent tasks. Currently, MQE supports following features:
- Interaction between multiple quadrupeds and articulated objects.
- Train high-level planning policy only with built-in walk policy.
- Build your terrain from blocks like LEGO.
- Click-to-use RL pipeline through OpenRL on pre-defined cooperative and competitive tasks.
Project Website: https://ziyanx02.github.io/multiagent-quadruped-environment/
Paper: https://arxiv.org/abs/2403.16015
- Create a new Python virtual env or conda environment with Python 3.6, 3.7, or 3.8 (3.8 recommended)
conda create -n mqe python=3.8 - Install PyTorch and Isaac Gym.
- Install appropriate PyTorch version from https://pytorch.org/.
pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html - Download and install Isaac Gym Preview 4 from https://developer.nvidia.com/isaac-gym. Ubuntu20.04 and Python3.8 recommended.
tar -xf IsaacGym_Preview_4_Package.tar.gz cd isaacgym/python && pip install -e .
- Install appropriate PyTorch version from https://pytorch.org/.
- Check Isaac Gym is available by running
cd examples && python 1080_balls_of_solitude.py
- Install MQE. Move to the directory of this repository and run
pip install -e .
- Check MQE is available by running
python ./test.py
Environment for each task is defined by:
- a class for controlling objects involved in the task.
./mqe/envs/go1/go1.pyis a base class for Unitree Go1 robot with locomotion policy implemented in walk-these-ways../mqe/envs/npc/includes several classes created for different interactive objects. - a wrapper to specify observations, actions, rewards, and infos.
./mqe/envs/wrappers/includes several wrappers for reference. - a config file to specify all the configuration about the environment, including configs for simulation, terrain registration, robot assets, etc. Config files use inheritance.
./mqe/envs/configs/includes the config files of pre-defined tasks. To explore more available configurations, please check config files in./mqe/envs/base/,./mqe/envs/field/and./mqe/envs/go1/, there should be no intersections between these config files for clearance.
Blocks used in terrain registration is defined in ./mqe/utils/terrain/barrier_track.py.
-
Try different tasks
python ./test.py- Task could be specified in
./test.py
- Task could be specified in
-
Train using OpenRL (collaborative)
python ./openrl_ws/train.py --algo ALGO_NAME --task TASK_NAME--num_envs NUM_ENVSto specify the number of parallel simulated environments--train_timesteps NUM_STEPSto specify the number of environment steps during the training--sim_device SIM_DEVICEto specify device for simulation--rl_device RL_DEVICEto specify device for running OpenRL--headlessto render headlessly--seed RANDOM_SEEDto specify random seed--config /PATH/TO/CONFIGto speicy cinfiguration for OpenRL--use_wandbto use WanDB--use_tensorboardto use TensorBoard
-
Evaluate trained policy (collaborative)
python ./openrl_ws/test.py --algo ALGO_NAME --task TASK_NAME --checkpoint /PATH/TO/CHECKPOINT--record_videoto record video (frames)--algo ALGO_NAMEshould be specified as well as--checkpoint
-
Create new task
Currently, existing tasks are exhibited in
./mqe/envs/utils.pyfor reference. To create new terrain blocks, please add correspondingBarrierTrack.get_BLOCK_NAME_block()function in./mqe/utils/terrain/barrier_track.py. Please refer to the following tasks for different kinds of new task:go1gatefor tasks without objects;go1seesawfor tasks with fixed or free objects;go1sheep-easyfor tasks with objects serving as NPC;go1football-defenderfor tasks with robots serving as NPC.
The Task Name in the following table corresponds to --task TASK_NAME in task selection. Check ./mqe/envs/utils.py for the latest list of existing tasks.
-
If you get the following error:
ImportError: libpython3.8m.so.1.0: cannot open shared object file: No such file or directory, it is also possible that you need to doexport LD_LIBRARY_PATH=/PATH/TO/LIBPYTHON/DIRECTORY/export LD_LIBRARY_PATH=/PATH/TO/CONDA/envs/YOUR_ENV_NAME/lib. You can also try:sudo apt install libpython3.8. -
If you get the following error:
AttributeError: module 'numpy' has no attribute 'float'., it's because of the version of packagenumpy. First uninstallnumpybypip uninstall numpy, and installnumpyof specific version bypip install numpy==1.20.3. -
If you get
Segmentation fault (core dumped)while rendering frames using A100/A800, please switch to GeFoece graphic cards.
If our work has been helpful to you. please feel free to cite us:
@misc{xiong2024mqe,
title={MQE: Unleashing the Power of Interaction with Multi-agent Quadruped Environment},
author={Ziyan Xiong and Bo Chen and Shiyu Huang and Wei-Wei Tu and Zhaofeng He and Yang Gao},
year={2024},
eprint={2403.16015},
archivePrefix={arXiv},
primaryClass={cs.RO}
}












