add isaac sim 2023 support and dockerfiles
This commit is contained in:
@@ -22,30 +22,13 @@ import argparse
|
||||
# Third Party
|
||||
from omni.isaac.kit import SimulationApp
|
||||
|
||||
# CuRobo
|
||||
from curobo.cuda_robot_model.cuda_robot_model import CudaRobotModel, CudaRobotModelConfig
|
||||
|
||||
# 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 RobotConfig
|
||||
from curobo.types.state import JointState
|
||||
from curobo.util_file import (
|
||||
get_motion_gen_robot_list,
|
||||
get_robot_configs_path,
|
||||
get_robot_path,
|
||||
get_world_configs_path,
|
||||
join_path,
|
||||
load_yaml,
|
||||
)
|
||||
from curobo.wrap.model.robot_world import RobotWorld, RobotWorldConfig
|
||||
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(
|
||||
"--visualize_spheres",
|
||||
@@ -57,38 +40,31 @@ parser.add_argument(
|
||||
args = parser.parse_args()
|
||||
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
|
||||
|
||||
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]
|
||||
|
||||
|
||||
# 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.materials import OmniPBR
|
||||
from omni.isaac.core.objects import cuboid, sphere
|
||||
|
||||
########### OV #################
|
||||
from omni.isaac.core.utils.extensions import enable_extension
|
||||
from omni.isaac.core.utils.types import ArticulationAction
|
||||
from omni.isaac.core.objects import sphere
|
||||
|
||||
# CuRobo
|
||||
from curobo.cuda_robot_model.cuda_robot_model import CudaRobotModel
|
||||
|
||||
# from curobo.wrap.reacher.ik_solver import IKSolver, IKSolverConfig
|
||||
from curobo.types.base import TensorDeviceType
|
||||
from curobo.types.math import Pose
|
||||
from curobo.types.robot import RobotConfig
|
||||
|
||||
########### OV #################
|
||||
from curobo.util.logger import setup_curobo_logger
|
||||
from curobo.util.usd_helper import UsdHelper
|
||||
from curobo.util_file import get_motion_gen_robot_list, get_robot_configs_path, join_path, load_yaml
|
||||
|
||||
|
||||
def main():
|
||||
@@ -153,6 +129,7 @@ def main():
|
||||
|
||||
setup_curobo_logger("warn")
|
||||
|
||||
add_extensions(simulation_app, args.headless_mode)
|
||||
while simulation_app.is_running():
|
||||
my_world.step(render=True)
|
||||
|
||||
@@ -163,7 +140,7 @@ def main():
|
||||
continue
|
||||
step_index = my_world.current_time_step_index
|
||||
|
||||
if step_index == 0:
|
||||
if step_index <= 2:
|
||||
my_world.reset()
|
||||
for ri, robot in enumerate(robot_list):
|
||||
j_names = robot_cfg_list[ri]["kinematics"]["cspace"]["joint_names"]
|
||||
|
||||
Reference in New Issue
Block a user