Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: isaac-sim/IsaacLab
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: WATonomous/IsaacLab
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 6 commits
  • 7 files changed
  • 2 contributors

Commits on Mar 25, 2025

  1. enable-vnc-for-watcloud-use

    wilsonchenghy committed Mar 25, 2025
    Copy the full SHA
    abc02e2 View commit details
  2. Merge pull request #1 from WATonomous/enable-vnc-for-watcloud-use

    enable-vnc-for-watcloud-use
    wilsonchenghy authored Mar 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    11ef377 View commit details
  3. Update README.md

    Signed-off-by: Wilson Cheng <[email protected]>
    wilsonchenghy authored Mar 25, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1fb1618 View commit details

Commits on Mar 26, 2025

  1. Copy the full SHA
    a2b8fd1 View commit details

Commits on May 9, 2025

  1. Add example scripts

    wilsonchenghy committed May 9, 2025
    Copy the full SHA
    ba75a8a View commit details

Commits on May 17, 2025

  1. Update README.md

    Signed-off-by: Wilson Cheng <[email protected]>
    wilsonchenghy authored May 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    abed752 View commit details
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -29,6 +29,16 @@ Isaac Lab offers a comprehensive set of tools and environments designed to facil

## Getting Started

**On WatCloud:**
- SSH into WatCloud and git clone this repo
- Use wato_asd_tooling repo to start ssh session in the slurm nodes (See link: https://wiki.watonomous.ca/autonomous_software_general/watcloud_dev#one-time-setup) (See link for minimum spec on slurm nodes: https://docs.isaacsim.omniverse.nvidia.com/latest/installation/requirements.html)
- On a new terminal, run `ssh -L 5900:localhost:5900 asd-dev-session` to enable ssh tunneling from slurm nodes to local computer
- Run `cd IsaacLab`
- Run `export DISPLAY=:0`
- Run `./docker/container.py start`
- Run `./docker/container.py enter base`
- Download VNC Viewer and choose localhost:5900 to open Isaac Lab (See link: https://www.realvnc.com/en/connect/download/viewer/?lai_vid=63V0dbyEai1ON&lai_sr=5-9&lai_sl=l&lai_p=1)

Our [documentation page](https://isaac-sim.github.io/IsaacLab) provides everything you need to get started, including detailed tutorials and step-by-step guides. Follow these links to learn more about:

- [Installation steps](https://isaac-sim.github.io/IsaacLab/main/source/setup/installation/index.html#local-installation)
19 changes: 19 additions & 0 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ ENV DOCKER_USER_HOME=${DOCKER_USER_HOME_ARG}
# Set environment variables
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV USER=root
ENV DISPLAY=:1.0

USER root

@@ -47,6 +49,23 @@ RUN --mount=type=cache,target=/var/cache/apt \
apt -y autoremove && apt clean autoclean && \
rm -rf /var/lib/apt/lists/*

# VNC dependencies
RUN apt-get update -y
RUN apt-get install -y supervisor
RUN apt-get install -y x11vnc
RUN apt-get install -y xvfb
RUN apt-get install -y mesa-utils
RUN apt-get install -y x11-apps
RUN apt-get purge -y light-locker
RUN apt-get install -y lxde

# Set up VNC
COPY --chown=${USER} docker/supervisord.conf /etc/supervisor/supervisord.conf
RUN chown -R ${USER}:${USER} /etc/supervisor
RUN chmod 777 /var/log/supervisor/
EXPOSE 5900
CMD ["/usr/bin/supervisord"]

# Copy the Isaac Lab directory (files to exclude are defined in .dockerignore)
COPY ../ ${ISAACLAB_PATH}

28 changes: 20 additions & 8 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -37,9 +37,6 @@ x-default-isaac-lab-volumes: &default-isaac-lab-volumes
- type: bind
source: ../source
target: ${DOCKER_ISAACLAB_PATH}/source
- type: bind
source: ../scripts
target: ${DOCKER_ISAACLAB_PATH}/scripts
- type: bind
source: ../docs
target: ${DOCKER_ISAACLAB_PATH}/docs
@@ -64,6 +61,7 @@ x-default-isaac-lab-volumes: &default-isaac-lab-volumes
x-default-isaac-lab-environment: &default-isaac-lab-environment
- ISAACSIM_PATH=${DOCKER_ISAACLAB_PATH}/_isaac_sim
- OMNI_KIT_ALLOW_ROOT=1
- DISPLAY=:1.0

x-default-isaac-lab-deploy: &default-isaac-lab-deploy
resources:
@@ -91,10 +89,17 @@ services:
container_name: isaac-lab-base
environment: *default-isaac-lab-environment
volumes: *default-isaac-lab-volumes
network_mode: host
network_mode: bridge
deploy: *default-isaac-lab-deploy
ports:
- "5900:5900"
# This is the entrypoint for the container
entrypoint: bash
entrypoint: >
bash -c "
Xvfb :1 -screen 0 1280x1024x24 -auth /tmp/.Xauthority &
x11vnc -display :1 -auth /tmp/.Xauthority -nopw -forever -shared &
startlxde &
bash"
stdin_open: true
tty: true

@@ -117,10 +122,17 @@ services:
container_name: isaac-lab-ros2
environment: *default-isaac-lab-environment
volumes: *default-isaac-lab-volumes
network_mode: host
network_mode: bridge
deploy: *default-isaac-lab-deploy
ports:
- "5900:5900"
# This is the entrypoint for the container
entrypoint: bash
entrypoint: >
bash -c "
Xvfb :1 -screen 0 1280x1024x24 -auth /tmp/.Xauthority &
x11vnc -display :1 -auth /tmp/.Xauthority -nopw -forever -shared &
startlxde &
bash"
stdin_open: true
tty: true

@@ -138,4 +150,4 @@ volumes:
# isaac-lab
isaac-lab-docs:
isaac-lab-logs:
isaac-lab-data:
isaac-lab-data:
63 changes: 63 additions & 0 deletions docker/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[supervisord]
nodaemon=true
logfile=/tmp/supervisord.log
loglevel=error

[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket

[program:xvfb]
priority=10
command=/usr/bin/Xvfb :1 -screen 0 1440x1080x24
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/tmp/xvfb.log
redirect_stderr=true

[program:openbox]
priority=15
command=/usr/bin/openbox-session
autostart=true
autorestart=true
stopsignal=QUIT
environment=DISPLAY=":1"
stdout_logfile=/tmp/openbox.log
redirect_stderr=true

[program:lxpanel]
priority=15
command=/usr/bin/lxpanel --profile LXDE
autostart=true
autorestart=true
stopsignal=QUIT
environment=DISPLAY=":1"
stdout_logfile=/tmp/lxpanel.log
redirect_stderr=true

[program:pcmanfm]
priority=15
command=/usr/bin/pcmanfm --desktop --profile LXDE
autostart=true
autorestart=true
stopsignal=QUIT
environment=DISPLAY=":1"
stdout_logfile=/tmp/pcmanfm.log

[program:x11vnc]
priority=20
command=x11vnc -display :1 -xkb -forever -shared -repeat
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/tmp/x11vnc.log
redirect_stderr=true

[group:vnc]
programs=xvfb,openbox,lxpanel,pcmanfm,x11vnc
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
import argparse
from isaaclab.app import AppLauncher

parser = argparse.ArgumentParser(description="Robot Arm with Joint Space Control")
AppLauncher.add_app_launcher_args(parser)
args_cli = parser.parse_args()

app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app

import torch

import isaaclab.sim as sim_utils
from isaaclab.assets import AssetBaseCfg
from isaaclab.controllers import DifferentialIKController, DifferentialIKControllerCfg
from isaaclab.managers import SceneEntityCfg
from isaaclab.markers import VisualizationMarkers
from isaaclab.markers.config import FRAME_MARKER_CFG
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
from isaaclab.utils import configclass
from isaaclab.utils.assets import ISAAC_NUCLEUS_DIR
from isaaclab.utils.math import subtract_frame_transforms

##
# Pre-defined configs
##
from isaaclab_assets import UR10_CFG


@configclass
class TableTopSceneCfg(InteractiveSceneCfg):
"""Configuration for a cart-pole scene."""

# ground plane
ground = AssetBaseCfg(
prim_path="/World/defaultGroundPlane",
spawn=sim_utils.GroundPlaneCfg(),
init_state=AssetBaseCfg.InitialStateCfg(pos=(0.0, 0.0, -1.05)),
)

# lights
dome_light = AssetBaseCfg(
prim_path="/World/Light",
spawn=sim_utils.DomeLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
)

# mount
table = AssetBaseCfg(
prim_path="{ENV_REGEX_NS}/Table",
spawn=sim_utils.UsdFileCfg(
usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Mounts/Stand/stand_instanceable.usd", scale=(2.0, 2.0, 2.0)
),
)

# articulation
robot = UR10_CFG.replace(prim_path="{ENV_REGEX_NS}/Robot")


def run_simulator(sim: sim_utils.SimulationContext, scene: InteractiveScene):

robot = scene["robot"]

# Create controller
diff_ik_cfg = DifferentialIKControllerCfg(command_type="pose", use_relative_mode=False, ik_method="dls")
diff_ik_controller = DifferentialIKController(diff_ik_cfg, num_envs=scene.num_envs, device=sim.device)

# Markers
frame_marker_cfg = FRAME_MARKER_CFG.copy()
frame_marker_cfg.markers["frame"].scale = (0.1, 0.1, 0.1)
ee_marker = VisualizationMarkers(frame_marker_cfg.replace(prim_path="/Visuals/ee_current"))

# Specify robot-specific parameters
robot_entity_cfg = SceneEntityCfg("robot", joint_names=[".*"], body_names=["ee_link"])

# Resolving the scene entities
robot_entity_cfg.resolve(scene)

# Obtain the frame index of the end-effector ; For a fixed base robot, the frame index is one less than the body index. This is because ; the root body is not included in the returned Jacobians.
if robot.is_fixed_base:
ee_jacobi_idx = robot_entity_cfg.body_ids[0] - 1
else:
ee_jacobi_idx = robot_entity_cfg.body_ids[0]

# Define simulation stepping
sim_dt = sim.get_physics_dt()
count = 0
joint_position_index = 0

while simulation_app.is_running():
if count % 150 == 0:
# reset time
count = 0

# cycle between joint state
joint_pos = robot.data.default_joint_pos.clone()
joint_position_list = [
[0.0, -0.712, 0.712, 0.0, 0.0, 0.0],
[0.0, -1.712, 1.712, 0.0, 0.0, 0.0],
[1.0, -1.712, 1.712, 0.0, 0.0, 0.0],
[0.0, 1.712, 1.712, 0.0, 0.0, 0.0],
]
joint_position = torch.tensor(joint_position_list[joint_position_index], device=sim.device)
joint_vel = robot.data.default_joint_vel.clone()

if joint_position_index >= len(joint_position_list) - 1:
joint_position_index = 0
else:
joint_position_index += 1

robot.reset()

joint_pos_des = joint_position.unsqueeze(0)[:, robot_entity_cfg.joint_ids].clone()

# apply actions (Smooth movement)
robot.set_joint_position_target(joint_pos_des, joint_ids=robot_entity_cfg.joint_ids)
scene.write_data_to_sim()

# perform step
sim.step()

# update sim-time
count += 1

# update buffers
scene.update(sim_dt)

# obtain quantities from simulation
ee_pose_w = robot.data.body_state_w[:, robot_entity_cfg.body_ids[0], 0:7]
# update marker positions
ee_marker.visualize(ee_pose_w[:, 0:3], ee_pose_w[:, 3:7])


def main():
# Load kit helper
sim_cfg = sim_utils.SimulationCfg(dt=0.01, device=args_cli.device)
sim = sim_utils.SimulationContext(sim_cfg)

# Set main camera
sim.set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])

# Design scene
scene_cfg = TableTopSceneCfg(num_envs=1, env_spacing=2.0)
scene = InteractiveScene(scene_cfg)

# Play the simulator
sim.reset()

print("[INFO]: Setup complete...")

# Run the simulator
run_simulator(sim, scene)


if __name__ == "__main__":
main()
simulation_app.close()
Loading