From b60c2df15fdf5b768fcbb3dd961647c301e76e1c Mon Sep 17 00:00:00 2001 From: Jinwon Kim Date: Thu, 17 Oct 2024 23:34:43 +0900 Subject: [PATCH] doc: icon.png --- .../StrideSim/anymal_articulation.py | 6 +-- exts/StrideSim/StrideSim/anymal_d.py | 40 +++++++++---------- exts/StrideSim/StrideSim/parameters.py | 5 +-- exts/StrideSim/data/icon.png | 3 ++ 4 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 exts/StrideSim/data/icon.png diff --git a/exts/StrideSim/StrideSim/anymal_articulation.py b/exts/StrideSim/StrideSim/anymal_articulation.py index 194adf9..484f342 100644 --- a/exts/StrideSim/StrideSim/anymal_articulation.py +++ b/exts/StrideSim/StrideSim/anymal_articulation.py @@ -1,6 +1,6 @@ import io -import os import numpy as np +import os import sys import torch from typing import List, Optional @@ -76,9 +76,7 @@ def __init__( # Policy - file_content = omni.client.read_file( - os.path.join(os.path.dirname(__file__), "network/policy.pt") - )[2] + file_content = omni.client.read_file(os.path.join(os.path.dirname(__file__), "network/policy.pt"))[2] file = io.BytesIO(memoryview(file_content).tobytes()) self._policy = torch.jit.load(file) diff --git a/exts/StrideSim/StrideSim/anymal_d.py b/exts/StrideSim/StrideSim/anymal_d.py index 8b69a7e..b6fc21d 100644 --- a/exts/StrideSim/StrideSim/anymal_d.py +++ b/exts/StrideSim/StrideSim/anymal_d.py @@ -15,8 +15,8 @@ from StrideSim.anymal_articulation import AnymalD_Atriculation from StrideSim.base_sample import BaseSample +from StrideSim.parameters import DEFAULT_WORLD_SETTINGS # , SIMULATION_ENVIRONMENTS -from StrideSim.parameters import DEFAULT_WORLD_SETTINGS, SIMULATION_ENVIRONMENTS class AnymalD(BaseSample): def __init__(self) -> None: @@ -54,27 +54,27 @@ def setup_scene(self) -> None: if self._world.stage.GetPrimAtPath("/World"): raise Exception("A primitive already exists at the specified path") - # Create the stage primitive and load the usd into it - prim = self._world.stage.DefinePrim("/World") - success = prim.GetReferences().AddReference( - SIMULATION_ENVIRONMENTS["Flat Plane"] + # # Create the stage primitive and load the usd into it + # prim = self._world.stage.DefinePrim("/World") + # success = prim.GetReferences().AddReference( + # SIMULATION_ENVIRONMENTS["Flat Plane"] + # ) + + # if not success: + # raise Exception( + # "failed to load the usd asset at path " + # + SIMULATION_ENVIRONMENTS["Flat Plane"] + # ) + + self._world.scene.add_default_ground_plane( + z_position=0, + name="default_ground_plane", + prim_path="/World/defaultGroundPlane", + static_friction=1.0, + dynamic_friction=1.0, + restitution=0, ) - if not success: - raise Exception( - "failed to load the usd asset at path " - + SIMULATION_ENVIRONMENTS["Flat Plane"] - ) - - # self._world.scene.add_default_ground_plane( - # z_position=0, - # name="default_ground_plane", - # prim_path="/World/defaultGroundPlane", - # static_friction=1.0, - # dynamic_friction=1.0, - # restitution=0, - # ) - self.AnymalD = AnymalD_Atriculation( prim_path="/World/AnymalD", name="AnymalD", diff --git a/exts/StrideSim/StrideSim/parameters.py b/exts/StrideSim/StrideSim/parameters.py index 48cdf0c..31b7b47 100644 --- a/exts/StrideSim/StrideSim/parameters.py +++ b/exts/StrideSim/StrideSim/parameters.py @@ -56,10 +56,7 @@ def find_isaaclab_dir(start_path="/"): # Add the Isaac Sim assets to the list for asset in NVIDIA_SIMULATION_ENVIRONMENTS: SIMULATION_ENVIRONMENTS[asset] = ( - NVIDIA_ASSETS_PATH - + ISAAC_SIM_ENVIRONMENTS - + "/" - + NVIDIA_SIMULATION_ENVIRONMENTS[asset] + NVIDIA_ASSETS_PATH + ISAAC_SIM_ENVIRONMENTS + "/" + NVIDIA_SIMULATION_ENVIRONMENTS[asset] ) # Define the default settings for the simulation environment diff --git a/exts/StrideSim/data/icon.png b/exts/StrideSim/data/icon.png new file mode 100644 index 0000000..17f2ca0 --- /dev/null +++ b/exts/StrideSim/data/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a75ed51aceab1b7ac997f53bb59b444d120953c2dbfbd40ef0f999dd328a994 +size 211120