Safe Multi-Agent Robosuite is an extension of Robosuite . We split the control over a robot across multiple controllers of its joints---one or more per controller. For example, the Lift task comes with 3 variants: 2 four-dimensional agents (2x4 Lift), 4 two-dimensional agents (4x2 Lift), and 8 one-dimensional agents (8x1 Lift). (This repository is under actively development. We appreciate any constructive comments and suggestions)
Safe MARobosuite tasks are fully cooperative, partialy observable, continuous, and safety-aware. Its multi-agency makes it a compatible framework for training modular robots which are built of multiple, robust parts, refer to the work. We adopt the reward setting from Robosuite.
- Install Robosuite accoring to Robosuite and MuJoCo website.
- clone safety multi-agent mujoco to the env path.
LD_LIBRARY_PATH=${HOME}/.mujoco/mujoco200/bin;
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so
pip install -e .
import numpy as np
import robosuite as suite
# create environment instance
env = suite.make(
env_name="Lift",
robots="Panda",
has_renderer=True,
has_offscreen_renderer=False,
use_camera_obs=False,
)
# reset the environment
env.reset()
for i in range(1000):
action = np.random.randn(env.robots[0].dof) # sample random action
obs, reward, cost, done, info = env.step(action) # take action in the environment
env.render() # render on display
Lift
env_args = {"scenario": "Lift",
"smarobosuite_robots": "panda"
"agent_conf": "2x4",
"agent_obsk": 1,
"episode_limit": 1000}
env_args = {"scenario": "Lift",
"smarobosuite_robots": "panda"
"agent_conf": "4x2",
"agent_obsk": 1,
"episode_limit": 1000}
env_args = {"scenario": "Lift",
"smarobosuite_robots": "panda"
"agent_conf": "8x1",
"agent_obsk": 1,
"episode_limit": 1000}
Stack
env_args = {"scenario": "Stack",
"smarobosuite_robots": "panda"
"agent_conf": "2x4",
"agent_obsk": 1,
"episode_limit": 1000}
env_args = {"scenario": "Stack",
"smarobosuite_robots": "panda"
"agent_conf": "4x2",
"agent_obsk": 1,
"episode_limit": 1000}
env_args = {"scenario": "Stack",
"smarobosuite_robots": "panda"
"agent_conf": "8x1",
"agent_obsk": 1,
"episode_limit": 1000}
TwoArmPegInHole
env_args = {"scenario": "TwoArmPegInHole",
"smarobosuite_robots": ["panda", "panda"],
"agent_conf": "2x7",
"agent_obsk": 1,
"episode_limit": 1000}