Skip to content

Commit

Permalink
doc: icon.png
Browse files Browse the repository at this point in the history
  • Loading branch information
mqjinwon committed Oct 17, 2024
1 parent 5d2bfb6 commit b60c2df
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 28 deletions.
6 changes: 2 additions & 4 deletions exts/StrideSim/StrideSim/anymal_articulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import io
import os
import numpy as np
import os
import sys
import torch
from typing import List, Optional
Expand Down Expand Up @@ -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)
Expand Down
40 changes: 20 additions & 20 deletions exts/StrideSim/StrideSim/anymal_d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 1 addition & 4 deletions exts/StrideSim/StrideSim/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions exts/StrideSim/data/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b60c2df

Please sign in to comment.