add isaac sim 2023 support and dockerfiles
This commit is contained in:
@@ -18,23 +18,15 @@ a = torch.zeros(4, device="cuda:0")
|
||||
# Standard Library
|
||||
import argparse
|
||||
|
||||
# CuRobo
|
||||
from curobo.cuda_robot_model.cuda_robot_model import CudaRobotModel
|
||||
|
||||
# from curobo.wrap.reacher.ik_solver import IKSolver, IKSolverConfig
|
||||
from curobo.geom.sdf.world import CollisionCheckerType
|
||||
from curobo.geom.types import WorldConfig
|
||||
from curobo.types.base import TensorDeviceType
|
||||
from curobo.types.math import Pose
|
||||
from curobo.types.robot import JointState, RobotConfig
|
||||
from curobo.types.state import JointState
|
||||
from curobo.util_file import get_robot_configs_path, get_world_configs_path, join_path, load_yaml
|
||||
from curobo.wrap.reacher.motion_gen import MotionGen, MotionGenConfig, MotionGenPlanConfig
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--headless", action="store_true", help="When True, enables headless mode", default=False
|
||||
"--headless_mode",
|
||||
type=str,
|
||||
default=None,
|
||||
help="To run headless, use one of [native, websocket], webrtc might not work.",
|
||||
)
|
||||
parser.add_argument("--robot", type=str, default="franka.yml", help="robot configuration to load")
|
||||
|
||||
parser.add_argument(
|
||||
"--visualize_spheres",
|
||||
action="store_true",
|
||||
@@ -42,7 +34,6 @@ parser.add_argument(
|
||||
default=False,
|
||||
)
|
||||
|
||||
parser.add_argument("--robot", type=str, default="franka.yml", help="robot configuration to load")
|
||||
args = parser.parse_args()
|
||||
|
||||
############################################################
|
||||
@@ -52,51 +43,44 @@ from omni.isaac.kit import SimulationApp
|
||||
|
||||
simulation_app = SimulationApp(
|
||||
{
|
||||
"headless": args.headless,
|
||||
"headless": args.headless_mode is not None,
|
||||
"width": "1920",
|
||||
"height": "1080",
|
||||
}
|
||||
)
|
||||
# Third Party
|
||||
from omni.isaac.core.utils.extensions import enable_extension
|
||||
|
||||
# CuRobo
|
||||
from curobo.util_file import (
|
||||
get_assets_path,
|
||||
get_filename,
|
||||
get_path_of_dir,
|
||||
get_robot_configs_path,
|
||||
join_path,
|
||||
load_yaml,
|
||||
)
|
||||
|
||||
ext_list = [
|
||||
"omni.kit.asset_converter",
|
||||
# "omni.kit.livestream.native",
|
||||
"omni.kit.tool.asset_importer",
|
||||
"omni.isaac.asset_browser",
|
||||
]
|
||||
[enable_extension(x) for x in ext_list]
|
||||
# simulation_app.update()
|
||||
|
||||
# Standard Library
|
||||
from typing import Dict
|
||||
|
||||
# Third Party
|
||||
import carb
|
||||
import numpy as np
|
||||
from helper import add_robot_to_scene
|
||||
from helper import add_extensions, add_robot_to_scene
|
||||
from omni.isaac.core import World
|
||||
from omni.isaac.core.objects import cuboid, sphere
|
||||
from omni.isaac.core.robots import Robot
|
||||
|
||||
########### OV #################
|
||||
from omni.isaac.core.utils.extensions import enable_extension
|
||||
from omni.isaac.core.utils.types import ArticulationAction
|
||||
|
||||
# CuRobo
|
||||
# from curobo.wrap.reacher.ik_solver import IKSolver, IKSolverConfig
|
||||
from curobo.geom.sdf.world import CollisionCheckerType
|
||||
from curobo.geom.types import WorldConfig
|
||||
from curobo.types.base import TensorDeviceType
|
||||
from curobo.types.math import Pose
|
||||
from curobo.types.robot import JointState
|
||||
from curobo.types.state import JointState
|
||||
from curobo.util.logger import setup_curobo_logger
|
||||
from curobo.util.usd_helper import UsdHelper
|
||||
from curobo.util_file import (
|
||||
get_assets_path,
|
||||
get_filename,
|
||||
get_path_of_dir,
|
||||
get_robot_configs_path,
|
||||
get_world_configs_path,
|
||||
join_path,
|
||||
load_yaml,
|
||||
)
|
||||
from curobo.wrap.reacher.motion_gen import MotionGen, MotionGenConfig, MotionGenPlanConfig
|
||||
|
||||
############################################################
|
||||
|
||||
@@ -105,6 +89,8 @@ from curobo.util.usd_helper import UsdHelper
|
||||
|
||||
|
||||
def main():
|
||||
# create a curobo motion gen instance:
|
||||
|
||||
# assuming obstacles are in objects_path:
|
||||
my_world = World(stage_units_in_meters=1.0)
|
||||
stage = my_world.stage
|
||||
@@ -181,6 +167,9 @@ def main():
|
||||
motion_gen.warmup(enable_graph=False, warmup_js_trajopt=False)
|
||||
|
||||
print("Curobo is Ready")
|
||||
|
||||
add_extensions(simulation_app, args.headless_mode)
|
||||
|
||||
plan_config = MotionGenPlanConfig(
|
||||
enable_graph=False, enable_graph_attempt=4, max_attempts=2, enable_finetune_trajopt=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user