Skip to content

Commit

Permalink
Merge pull request #150 from ARISE-Initiative/composite-utils
Browse files Browse the repository at this point in the history
Composite Robot Utilities and Tests
  • Loading branch information
kevin-thankyou-lin authored Oct 24, 2024
2 parents 85e45cd + d0a3e50 commit 69e5432
Show file tree
Hide file tree
Showing 6 changed files with 457 additions and 233 deletions.
25 changes: 25 additions & 0 deletions robosuite/demos/demo_composite_robot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import argparse

import numpy as np

import robosuite as suite
import robosuite.utils.test_utils as tu
from robosuite.controllers import load_composite_controller_config
from robosuite.utils.robot_composition_utils import create_composite_robot

if __name__ == "__main__":

parser = argparse.ArgumentParser()

parser.add_argument("--robot", type=str, required=True)
parser.add_argument("--base", type=str, default=None)
parser.add_argument("--grippers", nargs="+", type=str, default=["PandaGripper"])
parser.add_argument("--env", type=str, default="Lift")

args = parser.parse_args()

name = f"Custom{args.robot}"
create_composite_robot(name, base=args.base, robot=args.robot, grippers=args.grippers)
controller_config = load_composite_controller_config(controller="BASIC", robot=name)

tu.create_and_test_env(env="Lift", robots=name, controller_config=controller_config)
Loading

0 comments on commit 69e5432

Please sign in to comment.