Skip to content

Commit

Permalink
fix: fix minor error when building dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mqjinwon committed Oct 30, 2024
1 parent 8d346e3 commit 6093dd4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ pre-commit run --all-files
Dockerfile을 통해 컨테이너를 빌드하고 실행할 수 있습니다.

```bash
docker build -t stride-sim docker
docker build -t stride-sim:v0.0.1 docker

docker run --name isaac-sim-4.0.0 --entrypoint bash -it --runtime=nvidia --gpus all -e "ACCEPT_EULA=Y" --network=host \
docker run --name stride-sim-0.0.1 --entrypoint bash -it --runtime=nvidia --gpus all -e "ACCEPT_EULA=Y" --network=host \
-e "PRIVACY_CONSENT=Y" \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
Expand All @@ -116,7 +116,7 @@ docker run --name isaac-sim-4.0.0 --entrypoint bash -it --runtime=nvidia --gpus
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
-v ~/docker/isaac-sim/documents:/root/Documents:rw \
stride-sim
stride-sim:v0.0.1
```

## 라이선스
Expand Down
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ RUN apt-get install -y build-essential gcc g++ sudo wget unzip software-properti
RUN git clone https://github.com/AuTURBO/StrideSim.git && \
git clone https://github.com/isaac-sim/IsaacLab.git -b v1.0.0

# pull lfs files in StrideSim
WORKDIR /StrideSim

# update git lfs
RUN git lfs fetch && \
git lfs pull

# Install ROS 2 Humble
RUN apt-get update && apt-get install -y locales software-properties-common && \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
apt-get install -y locales software-properties-common && \
locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
add-apt-repository universe && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" > /etc/apt/sources.list.d/ros2.list && \
apt-get update && \
apt-get install -y ros-humble-desktop
DEBIAN_FRONTEND=noninteractive apt-get install -y ros-humble-desktop

# Install Miniconda (latest version)
WORKDIR /
Expand Down
43 changes: 21 additions & 22 deletions exts/StrideSim/StrideSim/omnigraph_input.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import carb # noqa: F401
import omni.graph.core as og
import carb


class ROS2OmniInput:
Expand Down Expand Up @@ -89,25 +89,24 @@ def connect_nodes(self, connections):
{self._keys.CONNECT: connections},
)


# TODO: 여기서부터 다시 작업~
def setup_graph_monitoring():
# Get a handle to the graph
keys = og.Controller.Keys
(graph_handle, _, _, _) = og.Controller.edit({"graph_path": "/action_graph_input"})

# Access the output attribute
output_attr = og.Controller.attribute(
"/action_graph_input/Ros_Twist_sub.outputs:angularVelocity"
)

# Define callback
def on_value_change(attr):
new_value = attr.get()
carb.log_info(f"Output value updated: {new_value}")

# Register callback
output_attr.add_value_changed_fn(on_value_change)

# Get the initial value
initial_value = output_attr.get()
carb.log_info(f"Initial value: {initial_value}")
# def setup_graph_monitoring():
# # Get a handle to the graph
# keys = og.Controller.Keys
# (graph_handle, _, _, _) = og.Controller.edit({"graph_path": "/action_graph_input"})

# # Access the output attribute
# output_attr = og.Controller.attribute("/action_graph_input/Ros_Twist_sub.outputs:angularVelocity")

# # Define callback
# def on_value_change(attr):
# new_value = attr.get()
# carb.log_info(f"Output value updated: {new_value}")

# # Register callback
# output_attr.add_value_changed_fn(on_value_change)

# # Get the initial value
# initial_value = output_attr.get()
# carb.log_info(f"Initial value: {initial_value}")
2 changes: 1 addition & 1 deletion exts/StrideSim/StrideSim/omnigraph_output.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import omni.graph.core as og


class ROS2OmniOutput():
class ROS2OmniOutput:
def __init__(self, prim_paths: dict):
super().__init__()
self._prim_paths = self.initialize_prim_paths(prim_paths)
Expand Down

0 comments on commit 6093dd4

Please sign in to comment.