Skip to content

Commit b60c2df

Browse files
committedOct 17, 2024
doc: icon.png
1 parent 5d2bfb6 commit b60c2df

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed
 

‎exts/StrideSim/StrideSim/anymal_articulation.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import io
2-
import os
32
import numpy as np
3+
import os
44
import sys
55
import torch
66
from typing import List, Optional
@@ -76,9 +76,7 @@ def __init__(
7676

7777
# Policy
7878

79-
file_content = omni.client.read_file(
80-
os.path.join(os.path.dirname(__file__), "network/policy.pt")
81-
)[2]
79+
file_content = omni.client.read_file(os.path.join(os.path.dirname(__file__), "network/policy.pt"))[2]
8280
file = io.BytesIO(memoryview(file_content).tobytes())
8381

8482
self._policy = torch.jit.load(file)

‎exts/StrideSim/StrideSim/anymal_d.py

+20-20
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
from StrideSim.anymal_articulation import AnymalD_Atriculation
1717
from StrideSim.base_sample import BaseSample
18+
from StrideSim.parameters import DEFAULT_WORLD_SETTINGS # , SIMULATION_ENVIRONMENTS
1819

19-
from StrideSim.parameters import DEFAULT_WORLD_SETTINGS, SIMULATION_ENVIRONMENTS
2020

2121
class AnymalD(BaseSample):
2222
def __init__(self) -> None:
@@ -54,27 +54,27 @@ def setup_scene(self) -> None:
5454
if self._world.stage.GetPrimAtPath("/World"):
5555
raise Exception("A primitive already exists at the specified path")
5656

57-
# Create the stage primitive and load the usd into it
58-
prim = self._world.stage.DefinePrim("/World")
59-
success = prim.GetReferences().AddReference(
60-
SIMULATION_ENVIRONMENTS["Flat Plane"]
57+
# # Create the stage primitive and load the usd into it
58+
# prim = self._world.stage.DefinePrim("/World")
59+
# success = prim.GetReferences().AddReference(
60+
# SIMULATION_ENVIRONMENTS["Flat Plane"]
61+
# )
62+
63+
# if not success:
64+
# raise Exception(
65+
# "failed to load the usd asset at path "
66+
# + SIMULATION_ENVIRONMENTS["Flat Plane"]
67+
# )
68+
69+
self._world.scene.add_default_ground_plane(
70+
z_position=0,
71+
name="default_ground_plane",
72+
prim_path="/World/defaultGroundPlane",
73+
static_friction=1.0,
74+
dynamic_friction=1.0,
75+
restitution=0,
6176
)
6277

63-
if not success:
64-
raise Exception(
65-
"failed to load the usd asset at path "
66-
+ SIMULATION_ENVIRONMENTS["Flat Plane"]
67-
)
68-
69-
# self._world.scene.add_default_ground_plane(
70-
# z_position=0,
71-
# name="default_ground_plane",
72-
# prim_path="/World/defaultGroundPlane",
73-
# static_friction=1.0,
74-
# dynamic_friction=1.0,
75-
# restitution=0,
76-
# )
77-
7878
self.AnymalD = AnymalD_Atriculation(
7979
prim_path="/World/AnymalD",
8080
name="AnymalD",

‎exts/StrideSim/StrideSim/parameters.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ def find_isaaclab_dir(start_path="/"):
5656
# Add the Isaac Sim assets to the list
5757
for asset in NVIDIA_SIMULATION_ENVIRONMENTS:
5858
SIMULATION_ENVIRONMENTS[asset] = (
59-
NVIDIA_ASSETS_PATH
60-
+ ISAAC_SIM_ENVIRONMENTS
61-
+ "/"
62-
+ NVIDIA_SIMULATION_ENVIRONMENTS[asset]
59+
NVIDIA_ASSETS_PATH + ISAAC_SIM_ENVIRONMENTS + "/" + NVIDIA_SIMULATION_ENVIRONMENTS[asset]
6360
)
6461

6562
# Define the default settings for the simulation environment

‎exts/StrideSim/data/icon.png

+3
Loading

0 commit comments

Comments
 (0)