-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from ARISE-Initiative/composite-utils
Composite Robot Utilities and Tests
- Loading branch information
Showing
6 changed files
with
457 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.