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
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ Guidelines for modifications:
* Brayden Zhang
* Brian Bingham
* Brian McCann
* Cameron Upright
* Caelan Garrett
* Calvin Yu
* Cameron Upright
* Cathy Y. Li
* Cheng-Rong Lai
* Chenyu Yang
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
Newton Physics Integration
===========================

`Newton <https://newton-physics.github.io/newton/guide/overview.html>`_ is a GPU-accelerated, extensible, and differentiable physics simulation engine designed for robotics, research,
`Newton <https://newton-physics.github.io/newton/latest/guide/overview.html>`_ is a GPU-accelerated, extensible, and differentiable physics simulation engine designed for robotics, research,
and advanced simulation workflows. Built on top of `NVIDIA Warp <https://nvidia.github.io/warp/>`_ and integrating MuJoCo Warp, Newton provides high-performance
simulation, modern Python APIs, and a flexible architecture for both users and developers.

Newton is an Open Source community-driven project with contributions from NVIDIA, Google Deep Mind, and Disney Research,
managed through the Linux Foundation.

This `experimental feature branch <https://github.com/isaac-sim/IsaacLab/tree/feature/newton>`_ of Isaac Lab provides an initial integration with the Newton Physics Engine, and is
This integration is available on the `develop branch <https://github.com/isaac-sim/IsaacLab/tree/develop>`_ of Isaac Lab as part of Isaac Lab 3.0 Beta, and is
under active development. Many features are not yet supported, and only a limited set of classic RL and flat terrain locomotion
reinforcement learning examples are included at the moment.

Both this Isaac Lab integration branch and Newton itself are under heavy development. We intend to support additional
Both this Isaac Lab integration and Newton itself are under heavy development. We intend to support additional
features for other reinforcement learning and imitation learning workflows in the future, but the above tasks should be
a good lens through which to understand how Newton integration works in Isaac Lab.

We have validated Newton simulation against PhysX by transferring learned policies from Newton to PhysX and vice versa
Furthermore, we have also successfully deployed a Newton-trained locomotion policy to a G1 robot. Please see :ref:`here <sim2real>` for more information.

Newton can support `multiple solvers <https://newton-physics.github.io/newton/api/newton_solvers.html>`_ for handling different types of physics simulation, but for the moment, the Isaac
Newton can support `multiple solvers <https://newton-physics.github.io/newton/latest/api/newton_solvers.html>`_ for handling different types of physics simulation, but for the moment, the Isaac
Lab integration focuses primarily on the MuJoCo-Warp solver.

Future updates of this branch and Newton should include both ongoing improvements in performance as well as integration
Future updates of Isaac Lab and Newton should include both ongoing improvements in performance as well as integration
with additional solvers.

Note that this branch does not include support for the PhysX physics engine - only Newton is supported. We are considering
several possible paths to continue to support PhysX within Lab, and feedback from users about their needs around that would be appreciated.

During the early development phase of both Newton and this Isaac Lab integration, you are likely to encounter breaking
During the development phase of both Newton and this Isaac Lab integration, you are likely to encounter breaking
changes as well as limited documentation. We do not expect to be able to provide official support or debugging assistance
until the framework has reached an official release. We appreciate your understanding and patience as we work to deliver a robust and polished framework!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,62 +1,68 @@
Installation
============

Installing the Newton physics integration branch requires three things:
Installing the Newton physics integration requires three things:

1) The ``feature/newton`` branch of Isaac Lab
2) Ubuntu 22.04 or 24.04 (Windows will be supported soon)
3) [Optional] Isaac sim 5.1 (Isaac Sim is not required if the Omniverse visualizer is not used)
1) The ``develop`` branch of Isaac Lab
2) Ubuntu 22.04 or 24.04
3) [Optional] Isaac Sim 6.0 (Isaac Sim is not required if the Omniverse visualizer is not used)

To begin, verify the version of Isaac Sim by checking the title of the window created when launching the simulation app. Alternatively, you can
find more explicit version information under the ``Help -> About`` menu within the app.
If your version is less than 5.1, you must first `update or reinstall Isaac Sim <https://docs.isaacsim.omniverse.nvidia.com/latest/installation/quick-install.html>`_ before
you can proceed further.
To begin, navigate to the root directory of your local copy of the Isaac Lab repository and open a terminal.

Next, navigate to the root directory of your local copy of the Isaac Lab repository and open a terminal.

Make sure we are on the ``feature/newton`` branch by running the following command:
Make sure we are on the ``develop`` branch by running the following command:

.. code-block:: bash

git checkout feature/newton

Below, we provide instructions for installing Isaac Sim through pip.
git checkout develop


Pip Installation
----------------
Installation
------------

We recommend using conda for managing your python environments. Conda can be downloaded and installed from `here <https://docs.conda.io/en/latest/miniconda.html>`_.
We recommend using **uv** as the package manager — it is significantly faster than pip and conda.
To install ``uv``, please follow the instructions `here <https://docs.astral.sh/uv/getting-started/installation/>`__.

If you previously already have a virtual environment for Isaac Lab, please ensure to start from a fresh environment to avoid any dependency conflicts.
If you have installed earlier versions of mujoco, mujoco-warp, or newton packages through pip, we recommend first
cleaning your pip cache with ``pip cache purge`` to remove any cache of earlier versions that may be conflicting with the latest.

Create a new conda environment:
Create a new virtual environment with Python 3.12:

.. code-block:: bash

conda create -n env_isaaclab python=3.11
uv venv --python 3.12 --seed env_isaaclab

Activate the environment:

.. code-block:: bash

conda activate env_isaaclab
source env_isaaclab/bin/activate

Install the correct version of torch and torchvision:
.. note::

If you are using ``pip`` directly instead of ``uv pip``, replace ``uv pip`` with ``pip`` in the commands below.


Ensure pip is up to date:

.. code-block:: bash

pip install -U torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
uv pip install --upgrade pip

[Optional] Install Isaac Sim 5.1:
[Optional] Install Isaac Sim 6.0:

.. code-block:: bash

pip install "isaacsim[all,extscache]==5.1.0" --extra-index-url https://pypi.nvidia.com
uv pip install "isaacsim[all,extscache]==6.0.0" --extra-index-url https://pypi.nvidia.com

Install Isaac Lab extensions and dependencies:

Install the correct version of torch and torchvision:

.. code-block:: bash

uv pip install -U torch==2.10.0 torchvision==0.25.0 --index-url https://download.pytorch.org/whl/cu128

Install Isaac Lab extensions and dependencies (this includes Newton 1.0):

.. code-block:: bash

Expand All @@ -71,8 +77,3 @@ To verify that the installation was successful, run the following command from t
.. code-block:: bash

./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Cartpole-Direct-v0 --num_envs 128


Note that since Newton requires a more recent version of Warp than Isaac Sim 5.1, there may be some incompatibility issues
that could result in errors such as ``ModuleNotFoundError: No module named 'warp.sim'``. These are ok to ignore and should not
impact usability.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Isaac Lab - Newton Beta 2
=========================
Isaac Lab 3.0 Beta
==================

Isaac Lab - Newton Beta 2 (feature/newton branch) provides Newton physics engine integration for Isaac Lab. We refactored our code so that we can not only support PhysX and Newton, but
Isaac Lab 3.0 Beta (develop branch) provides Newton physics engine integration for Isaac Lab. We refactored our code so that we can not only support PhysX and Newton, but
any other physics engine, enabling users to bring their own physics engine to Isaac Lab if they desire. To enable this, we introduce base implementations of
our ``simulation interfaces``, :class:`~isaaclab.assets.articulation.Articulation` or :class:`~isaaclab.sensors.ContactSensor` for instance. These provide a
set of abstract methods that all physics engines must implement. In turn this allows all of the default Isaac Lab environments to work with any physics engine.
This also allows us to ensure that Isaac Lab - Newton Beta 2 is backwards compatible with Isaac Lab 2.X. For engine specific calls, users could get the underlying view of
This also allows us to ensure that Isaac Lab 3.0 Beta is backwards compatible with Isaac Lab 2.X. For engine specific calls, users could get the underlying view of
the physics engine and call the engine specific APIs directly.

However, as we are refactoring the code, we are also looking at ways to limit the overhead of Isaac Lab's. In an effort to minimize the overhead, we are moving
all our low level code away from torch, and instead will rely heavily on warp. This will allow us to write low level code that is more efficient, and also
to take advantage of the cuda-graphing. However, this means that the ``data classes`` such as :class:`~isaaclab.assets.articulation.ArticulationData` or
:class:`~isaaclab.sensors.ContactSensorData` will only return warp arrays. Users will hence have to call ``wp.to_torch`` to convert them to torch tensors if they desire.
Our setters/writers will support both warp arrays and torch tensors, and will use the most optimal strategy to update the warp arrays under the hood. This minimizes the
amount of changes required for users to migrate to Isaac Lab - Newton Beta 2.
amount of changes required for users to migrate to Isaac Lab 3.0 Beta.

Another new feature of the writers and setters is the ability to provide them with masks and complete data (as opposed to indices and partial data in Isaac Lab 2.X).
Note that this feature will be available along with the ability to provide indices and partial data, and that the default behavior will still be to provide indices and partial data.
Expand Down Expand Up @@ -41,12 +41,3 @@ we are introducing cuda-graphing support for direct rl tasks. This drastically r
.. code-block:: bash

./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py --task Isaac-Humanoid-Direct-Warp-v0 --num_envs 4096 --headless


What's Next?
============

Isaac Lab 3.0 is the upcoming release of Isaac Lab, which will be compatible with Isaac Sim 6.0, and at the same time will support the new Newton physics engine.
This will allow users to train policies on the Newton physics engine, or PhysX. To accommodate this major code refactoring are required. In this section, we
will go over some of the changes, how that will affect Isaac Lab 2.X users, and how to migrate to Isaac Lab 3.0. The current branch of ``feature/newton`` gives
a glance of what is to come. While the changes to the internal code structure are significant, the changes to the user API are minimal.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ The currently supported tasks are as follows:

* Isaac-Cartpole-Direct-v0
* Isaac-Cartpole-v0
* Isaac-Cartpole-RGB-Camera-Direct-v0
* Isaac-Cartpole-Depth-Camera-Direct-v0
* Isaac-Cartpole-Camera-Presets-Direct-v0
* Isaac-Ant-Direct-v0
* Isaac-Ant-v0
* Isaac-Dexsuite-Kuka-Allegro-Lift-v0
* Isaac-Humanoid-Direct-v0
* Isaac-Humanoid-v0
* Isaac-Velocity-Flat-Anymal-B-v0
* Isaac-Velocity-Flat-Anymal-C-v0
* Isaac-Velocity-Flat-Anymal-D-v0
* Isaac-Velocity-Flat-Cassie-v0
* Isaac-Velocity-Flat-G1-v0
* Isaac-Velocity-Flat-G1-v1 (Sim-to-Real tested)
* Isaac-Velocity-Flat-H1-v0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Launch visualizers from the command line with ``--visualizer``:

.. code-block:: bash

# Launch all visualizers
python scripts/reinforcement_learning/rsl_rl/train.py --task Isaac-Cartpole-v0 --visualizer omniverse newton rerun
# Launch all visualizers (comma-delimited list, no spaces)
python scripts/reinforcement_learning/rsl_rl/train.py --task Isaac-Cartpole-v0 --visualizer kit,newton,rerun

# Launch just newton visualizer
python scripts/reinforcement_learning/rsl_rl/train.py --task Isaac-Cartpole-v0 --visualizer newton
Expand All @@ -77,18 +77,20 @@ If ``--headless`` is given, no visualizers will be launched.
Configuration
~~~~~~~~~~~~~

Launching visualizers with the command line will use default visualizer configurations. Default configs can be found and edited in ``source/isaaclab/isaaclab/visualizers``.
Launching visualizers with the command line will use default visualizer configurations. Visualizer backends live in the ``isaaclab_visualizers`` package (e.g. ``source/isaaclab_visualizers/isaaclab_visualizers/kit``, ``newton``, ``rerun``).

You can also configure custom visualizers in the code by defining new ``VisualizerCfg`` instances for the ``SimulationCfg``, for example:
You can also configure custom visualizers in the code by defining ``VisualizerCfg`` instances for the ``SimulationCfg``, for example:

.. code-block:: python

from isaaclab.sim import SimulationCfg
from isaaclab.visualizers import NewtonVisualizerCfg, OVVisualizerCfg, RerunVisualizerCfg
from isaaclab_visualizers.kit import KitVisualizerCfg
from isaaclab_visualizers.newton import NewtonVisualizerCfg
from isaaclab_visualizers.rerun import RerunVisualizerCfg

sim_cfg = SimulationCfg(
visualizer_cfgs=[
OVVisualizerCfg(
KitVisualizerCfg(
viewport_name="Visualizer Viewport",
create_viewport=True,
dock_position="SAME",
Expand Down Expand Up @@ -128,9 +130,9 @@ Omniverse Visualizer

.. code-block:: python

from isaaclab.visualizers import OVVisualizerCfg
from isaaclab_visualizers.kit import KitVisualizerCfg

visualizer_cfg = OVVisualizerCfg(
visualizer_cfg = KitVisualizerCfg(
# Viewport settings
viewport_name="Visualizer Viewport", # Viewport window name
create_viewport=True, # Create new viewport vs. use existing
Expand Down Expand Up @@ -176,8 +178,6 @@ Newton Visualizer
- Look around
* - **Mouse Scroll**
- Zoom in/out
* - **Space**
- Pause/resume rendering (physics continues)
* - **H**
- Toggle UI sidebar
* - **ESC**
Expand All @@ -187,7 +187,7 @@ Newton Visualizer

.. code-block:: python

from isaaclab.visualizers import NewtonVisualizerCfg
from isaaclab_visualizers.newton import NewtonVisualizerCfg

visualizer_cfg = NewtonVisualizerCfg(
# Window settings
Expand Down Expand Up @@ -233,12 +233,14 @@ Rerun Visualizer

.. code-block:: python

from isaaclab.visualizers import RerunVisualizerCfg
from isaaclab_visualizers.rerun import RerunVisualizerCfg

visualizer_cfg = RerunVisualizerCfg(
# Server settings
app_id="isaaclab-simulation", # Application identifier for viewer
grpc_port=9876, # gRPC endpoint for logging SDK connection
web_port=9090, # Port for local web viewer (launched in browser)
bind_address="0.0.0.0", # Endpoint host formatting/reuse checks

# Camera settings
camera_position=(8.0, 8.0, 3.0), # Initial camera position (x, y, z)
Expand All @@ -252,6 +254,10 @@ Rerun Visualizer
record_to_rrd="recording.rrd", # Path to save .rrd file (None = no recording)
)

Rerun startup uses the Python SDK through ``newton.viewer.ViewerRerun`` (no external ``rerun`` CLI process
management). If ``grpc_port`` is already active, Isaac Lab reuses that server. If ``web_port`` is occupied while
starting a new server, initialization fails with a clear port-conflict error.


Performance Note
----------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/setup/installation/source_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ variables to your terminal for the remaining of the installation instructions:
.. code:: bash

# Isaac Sim root directory
export ISAACSIM_PATH="${pwd}/_build/linux-x86_64/release"
export ISAACSIM_PATH="$(pwd)/_build/linux-x86_64/release"
# Isaac Sim python executable
export ISAACSIM_PYTHON_EXE="${ISAACSIM_PATH}/python.sh"

Expand Down
16 changes: 8 additions & 8 deletions source/isaaclab_rl/isaaclab_rl/rsl_rl/distillation_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RslRlDistillationAlgorithmCfg:
"""Configuration for the distillation algorithm."""

class_name: str = "Distillation"
"""The algorithm class name. Default is Distillation."""
"""The algorithm class name. Defaults to Distillation."""

num_learning_epochs: int = MISSING
"""The number of updates performed with each sample."""
Expand All @@ -34,13 +34,13 @@ class RslRlDistillationAlgorithmCfg:
"""The number of environment steps the gradient flows back."""

max_grad_norm: None | float = None
"""The maximum norm the gradient is clipped to."""
"""The maximum norm the gradient is clipped to. Defaults to None."""

optimizer: Literal["adam", "adamw", "sgd", "rmsprop"] = "adam"
"""The optimizer to use for the student policy."""
"""The optimizer to use for the student policy. Defaults to adam."""

loss_type: Literal["mse", "huber"] = "mse"
"""The loss type to use for the student policy."""
"""The loss type to use for the student policy. Defaults to mse."""


#########################
Expand All @@ -53,7 +53,7 @@ class RslRlDistillationRunnerCfg(RslRlBaseRunnerCfg):
"""Configuration of the runner for distillation algorithms."""

class_name: str = "DistillationRunner"
"""The runner class name. Default is DistillationRunner."""
"""The runner class name. Defaults to DistillationRunner."""

student: RslRlMLPModelCfg = MISSING
"""The student configuration."""
Expand Down Expand Up @@ -85,13 +85,13 @@ class RslRlDistillationStudentTeacherCfg:
"""

class_name: str = "StudentTeacher"
"""The policy class name. Default is StudentTeacher."""
"""The policy class name. Defaults to StudentTeacher."""

init_noise_std: float = MISSING
"""The initial noise standard deviation for the student policy."""

noise_std_type: Literal["scalar", "log"] = "scalar"
"""The type of noise standard deviation for the policy. Default is scalar."""
"""The type of noise standard deviation for the policy. Defaults to scalar."""

student_obs_normalization: bool = MISSING
"""Whether to normalize the observation for the student network."""
Expand All @@ -117,7 +117,7 @@ class RslRlDistillationStudentTeacherRecurrentCfg(RslRlDistillationStudentTeache
"""

class_name: str = "StudentTeacherRecurrent"
"""The policy class name. Default is StudentTeacherRecurrent."""
"""The policy class name. Defaults to StudentTeacherRecurrent."""

rnn_type: str = MISSING
"""The type of the RNN network. Either "lstm" or "gru"."""
Expand Down
Loading
Loading