Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Ignore all other files
.python.env
*.json

# Note: These files are kept for development purposes only.
!tools/settings.template.json
!tools/setup_vscode.py
!extensions.json
!launch.json
!tasks.json

# Ignore all other files
.python.env
*.json
16 changes: 16 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.cpptools",
"ms-python.python",
"ms-python.vscode-pylance",
"ban.spellright",
"streetsidesoftware.code-spell-checker",
"ms-iot.vscode-ros",
"ExecutableBookProject.myst-highlight",
"ms-python.black-formatter",
"ms-python.flake8",
"njpwerner.autodocstring"
]
}
26 changes: 26 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "setup_python_env",
"type": "shell",
"linux": {
"command": "${workspaceFolder}/../IsaacLab/isaaclab.sh -p ${workspaceFolder}/.vscode/tools/setup_vscode.py"
},
"windows": {
"command": "${workspaceFolder}/../IsaacLab/isaaclab.bat -p ${workspaceFolder}/.vscode/tools/setup_vscode.py"
}
},
{
// run formatter
"label": "run_formatter",
"type": "shell",
"linux": {
"command": "${workspaceFolder}/../IsaacLab/isaaclab.sh --format"
},
"windows": {
"command": "${workspaceFolder}/../IsaacLab/isaaclab.bat --format"
}
}
],
}
108 changes: 108 additions & 0 deletions .vscode/tools/settings.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"files.exclude": {
"**/.mypy_cache": true,
"**/__pycache__": true,
"**/*.egg-info": true
},
"files.associations": {
"*.tpp": "cpp",
"*.kit": "toml",
"*.rst": "restructuredtext"
},
"editor.rulers": [120],

// files to be ignored by the linter
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/_isaac_sim/**": true,
"**/_compiler/**": true
},
// Configuration for spelling checker
"spellright.language": [
"en-US-10-1."
],
"spellright.documentTypes": [
"markdown",
"latex",
"plaintext",
"cpp",
"asciidoc",
"python",
"restructuredtext"
],
"cSpell.words": [
"literalinclude",
"linenos",
"instanceable",
"isaacSim",
"jacobians",
"pointcloud",
"ridgeback",
"rllib",
"robomimic",
"teleoperation",
"xform",
"numpy",
"flatcache",
"physx",
"dpad",
"gamepad",
"linspace",
"upsampled",
"downsampled",
"arange",
"discretization",
"trimesh",
"uninstanceable",
"***SUPPLIMENTARY_KEYWORDS***",
"configclass",
"isaaclab",
"***UWLAB_KEYWORDS***",
"teleop",
"octi",
"uwlab",
"realsense",
"rokoko",
"ikabsolute",
"ikabs",
"ikdelta",
"ikdel",
"***ROBOTS_KEYWORDS***",
"franka",
"tycho",
"hebi",
"xarm"
],
// This enables python language server. Seems to work slightly better than jedi:
"python.languageServer": "Pylance",
// We use "black" as a formatter:
"python.formatting.provider": "black",
"python.formatting.blackArgs": ["--line-length", "120"],
// Use flake8 for linting
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--max-line-length=120"
],
// Use docstring generator
"autoDocstring.docstringFormat": "google",
"autoDocstring.guessTypes": true,
// Python environment path
// note: the default interpreter is overridden when user selects a workspace interpreter
// in the status bar. For example, the virtual environment python interpreter
"python.defaultInterpreterPath": "${workspaceFolder}/_isaac_sim/python.sh",
// ROS distribution
"ros.distro": "noetic",
// Language specific settings
"[python]": {
"editor.tabSize": 4
},
"[restructuredtext]": {
"editor.tabSize": 2
},
// Python extra paths
// Note: this is filled up when "./isaaclab.sh -i" is run
"python.analysis.extraPaths": []
}
61 changes: 61 additions & 0 deletions scripts/tutorials/00_sim/create_empty.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright (c) 2024-2025, The UW Lab Project Developers. (https://github.com/uw-lab/UWLab/blob/main/CONTRIBUTORS.md).
# All Rights Reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""This script demonstrates how to create a simple stage in Isaac Sim.

.. code-block:: bash

# Usage
./isaaclab.sh -p scripts/tutorials/00_sim/create_empty.py

"""

"""Launch Isaac Sim Simulator first."""


import argparse

from isaaclab.app import AppLauncher

# create argparser
parser = argparse.ArgumentParser(description="Tutorial on creating an empty stage.")
# append AppLauncher cli args
AppLauncher.add_app_launcher_args(parser)
# parse the arguments
args_cli = parser.parse_args()
# launch omniverse app
app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app

"""Rest everything follows."""

from isaaclab.sim import SimulationCfg, SimulationContext


def main():
"""Main function."""

# Initialize the simulation context
sim_cfg = SimulationCfg(dt=0.01)
sim = SimulationContext(sim_cfg)
# Set main camera
sim.set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])

# Play the simulator
sim.reset()
# Now we are ready!
print("[INFO]: Setup complete...")

# Simulate physics
while simulation_app.is_running():
# perform step
sim.step()


if __name__ == "__main__":
# run the main function
main()
# close sim app
simulation_app.close()
96 changes: 96 additions & 0 deletions scripts/tutorials/00_sim/launch_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Copyright (c) 2024-2025, The UW Lab Project Developers. (https://github.com/uw-lab/UWLab/blob/main/CONTRIBUTORS.md).
# All Rights Reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""
This script demonstrates how to run IsaacSim via the AppLauncher

.. code-block:: bash

# Usage
./isaaclab.sh -p scripts/tutorials/00_sim/launch_app.py

"""

"""Launch Isaac Sim Simulator first."""


import argparse

from isaaclab.app import AppLauncher

# create argparser
parser = argparse.ArgumentParser(description="Tutorial on running IsaacSim via the AppLauncher.")
parser.add_argument("--size", type=float, default=1.0, help="Side-length of cuboid")
# SimulationApp arguments https://docs.omniverse.nvidia.com/py/isaacsim/source/isaacsim.simulation_app/docs/index.html?highlight=simulationapp#isaacsim.simulation_app.SimulationApp
parser.add_argument(
"--width", type=int, default=1280, help="Width of the viewport and generated images. Defaults to 1280"
)
parser.add_argument(
"--height", type=int, default=720, help="Height of the viewport and generated images. Defaults to 720"
)

# append AppLauncher cli args
AppLauncher.add_app_launcher_args(parser)
# parse the arguments
args_cli = parser.parse_args()
# launch omniverse app
app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app

"""Rest everything follows."""

import isaaclab.sim as sim_utils


def design_scene():
"""Designs the scene by spawning ground plane, light, objects and meshes from usd files."""
# Ground-plane
cfg_ground = sim_utils.GroundPlaneCfg()
cfg_ground.func("/World/defaultGroundPlane", cfg_ground)

# spawn distant light
cfg_light_distant = sim_utils.DistantLightCfg(
intensity=3000.0,
color=(0.75, 0.75, 0.75),
)
cfg_light_distant.func("/World/lightDistant", cfg_light_distant, translation=(1, 0, 10))

# spawn a cuboid
cfg_cuboid = sim_utils.CuboidCfg(
size=[args_cli.size] * 3,
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(1.0, 1.0, 1.0)),
)
# Spawn cuboid, altering translation on the z-axis to scale to its size
cfg_cuboid.func("/World/Object", cfg_cuboid, translation=(0.0, 0.0, args_cli.size / 2))


def main():
"""Main function."""

# Initialize the simulation context
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.0, 0.0, 2.5], [-0.5, 0.0, 0.5])

# Design scene by adding assets to it
design_scene()

# Play the simulator
sim.reset()
# Now we are ready!
print("[INFO]: Setup complete...")

# Simulate physics
while simulation_app.is_running():
# perform step
sim.step()


if __name__ == "__main__":
# run the main function
main()
# close sim app
simulation_app.close()
Loading
Loading