Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker/.env.base
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ISAACSIM_VERSION=5.1.0
DOCKER_ISAACSIM_ROOT_PATH=/isaac-sim
# The Isaac Lab path in the container
DOCKER_ISAACLAB_PATH=/workspace/isaaclab
# rsl_rl path in the container
RSL_RL_PATH=/workspace/rsl_rl
# Docker user directory - by default this is the root user's home directory
DOCKER_USER_HOME=/root
# Docker image and container name suffix (default "", set by the container_interface.py script)
Expand Down
12 changes: 11 additions & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ENV ISAACSIM_ROOT_PATH=${ISAACSIM_ROOT_PATH_ARG}
# Path to the Isaac Lab directory
ARG ISAACLAB_PATH_ARG
ENV ISAACLAB_PATH=${ISAACLAB_PATH_ARG}
# Path to the rsl_rl directory
ARG RSL_RL_PATH_ARG
ENV RSL_RL_PATH=${RSL_RL_PATH_ARG}
# Home dir of docker user, typically '/root'
ARG DOCKER_USER_HOME_ARG
ENV DOCKER_USER_HOME=${DOCKER_USER_HOME_ARG}
Expand All @@ -49,7 +52,9 @@ RUN --mount=type=cache,target=/var/cache/apt \
rm -rf /var/lib/apt/lists/*

# Copy the Isaac Lab directory (files to exclude are defined in .dockerignore)
COPY ../ ${ISAACLAB_PATH}
# pwd is ../../ from Dockerfile.base
COPY ./IsaacLab ${ISAACLAB_PATH}
COPY ./rsl_rl ${RSL_RL_PATH}

# Ensure isaaclab.sh has execute permissions
RUN chmod +x ${ISAACLAB_PATH}/isaaclab.sh
Expand Down Expand Up @@ -94,6 +99,11 @@ RUN --mount=type=cache,target=${DOCKER_USER_HOME}/.cache/pip \
# HACK: Remove install of quadprog dependency
RUN ${ISAACLAB_PATH}/isaaclab.sh -p -m pip uninstall -y quadprog

# Install rsl_rl in editable mode
RUN mv /workspace/isaaclab/_isaac_sim/kit/python/lib/python3.11/site-packages/rsl_rl /workspace/isaaclab/_isaac_sim/kit/python/lib/python3.11/site-packages/rsl_rl_old
RUN cd ${RSL_RL_PATH} && \
${ISAACLAB_PATH}/isaaclab.sh -p -m pip install -e .

# aliasing isaaclab.sh and python for convenience
RUN echo "export ISAACLAB_PATH=${ISAACLAB_PATH}" >> ${HOME}/.bashrc && \
echo "alias isaaclab=${ISAACLAB_PATH}/isaaclab.sh" >> ${HOME}/.bashrc && \
Expand Down
8 changes: 6 additions & 2 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ x-default-isaac-lab-volumes: &default-isaac-lab-volumes
- type: bind
source: .isaac-lab-docker-history
target: ${DOCKER_USER_HOME}/.bash_history
- type: bind
source: ../../rsl_rl
target: ${RSL_RL_PATH}

x-default-isaac-lab-environment: &default-isaac-lab-environment
- ISAACSIM_PATH=${DOCKER_ISAACLAB_PATH}/_isaac_sim
Expand All @@ -88,13 +91,14 @@ services:
profiles: [ "base" ]
env_file: .env.base
build:
context: ../
dockerfile: docker/Dockerfile.base
context: ../../
dockerfile: IsaacLab/docker/Dockerfile.base
args:
- ISAACSIM_BASE_IMAGE_ARG=${ISAACSIM_BASE_IMAGE}
- ISAACSIM_VERSION_ARG=${ISAACSIM_VERSION}
- ISAACSIM_ROOT_PATH_ARG=${DOCKER_ISAACSIM_ROOT_PATH}
- ISAACLAB_PATH_ARG=${DOCKER_ISAACLAB_PATH}
- RSL_RL_PATH_ARG=${RSL_RL_PATH}
- DOCKER_USER_HOME_ARG=${DOCKER_USER_HOME}
image: isaac-lab-base${DOCKER_NAME_SUFFIX-}
container_name: isaac-lab-base${DOCKER_NAME_SUFFIX-}
Expand Down
4 changes: 3 additions & 1 deletion scripts/reinforcement_learning/rsl_rl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

import gymnasium as gym
import torch
from rsl_rl.runners import DistillationRunner, OnPolicyRunner
from rsl_rl.runners import DistillationRunner, OnPolicyRunner, OnPolicyRunnerWithDepth
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning: Unconditional import of non-standard class. OnPolicyRunnerWithDepth doesn't exist in the official rsl_rl package (leggedrobotics/rsl_rl). This unconditional import will cause ImportError for every user with the standard rsl_rl installation.

Consider a conditional import:

try:
    from rsl_rl.runners import OnPolicyRunnerWithDepth
except ImportError:
    OnPolicyRunnerWithDepth = None


from isaaclab.envs import (
DirectMARLEnv,
Expand Down Expand Up @@ -200,6 +200,8 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
# create runner from rsl-rl
if agent_cfg.class_name == "OnPolicyRunner":
runner = OnPolicyRunner(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device)
elif agent_cfg.class_name == "OnPolicyRunnerWithDepth":
runner = OnPolicyRunnerWithDepth(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device)
elif agent_cfg.class_name == "DistillationRunner":
runner = DistillationRunner(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
from .sawyer import *
from .shadow_hand import *
from .spot import *
from .tong_system import *
from .unitree import *
from .universal_robots import *
36 changes: 36 additions & 0 deletions source/isaaclab_assets/isaaclab_assets/robots/tong_system.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

import isaaclab.sim as sim_utils
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Missing license header. All files in Isaac Lab require the BSD-3-Clause license header:

# Copyright (c) 2022-2026, The Isaac Lab Project Developers (...)
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

Also, RemotizedPDActuatorCfg is imported but unused.

from isaaclab.actuators import DelayedPDActuatorCfg, RemotizedPDActuatorCfg
from isaaclab.assets.articulation import ArticulationCfg

TONG_SYSTEM_CFG = ArticulationCfg(
spawn=sim_utils.UsdFileCfg(
usd_path="/workspace/isaaclab/source/isaaclab_assets/isaaclab_assets/robots/usd/tong_system/tong_system.usd",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: Hardcoded absolute container path. This path /workspace/isaaclab/source/... only works inside the specific Docker container. All other robot configs in Isaac Lab use ISAACLAB_NUCLEUS_DIR or ISAAC_NUCLEUS_DIR for portable asset resolution. This will cause a FileNotFoundError for anyone running Isaac Lab outside Docker.

Consider using a path relative to this module or a standard Isaac Lab asset directory variable.

activate_contact_sensors=False,
rigid_props=sim_utils.RigidBodyPropertiesCfg(
disable_gravity=True,
retain_accelerations=True,
max_depenetration_velocity=1000.0,
),
articulation_props=sim_utils.ArticulationRootPropertiesCfg(
enabled_self_collisions=True,
solver_position_iteration_count=8,
solver_velocity_iteration_count=0,
sleep_threshold=0.005,
stabilization_threshold=0.0005,
),
),
init_state=ArticulationCfg.InitialStateCfg(
joint_pos={
".*_joint": 0.0,
},
joint_vel={".*": 0.0},
),
actuators={
"actuator": DelayedPDActuatorCfg(
joint_names_expr=[".*"],
stiffness=100.0,
damping=1.0,
),
},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Blender MTL File: 'None'
# Material Count: 1

newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
Loading