Unverified Commit 03cee3ce authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Uses the configuration to obtain the simulation device (#3636)

# Description

This MR fixes the slow-down observed in recent IsaacLab updates.
Previously, the simulation device was read through the configuration;
later, this was changed to read the device through the simulation
manager.

On profiling, I observed that the simulation manager function took 0.01
s per call. This is quite a bit of overhead, considering that
`env.device` refers to `sim.device` and gets called at multiple
locations in the environment.

This MR reverts back to the previous solution for obtaining the device.

Fixes #3554

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Screenshots

```
./isaaclab.sh -p scripts/benchmarks/benchmark_non_rl.py --task Isaac-Velocity-Flat-Anymal-C-v0 --headless --seed 0 --num_frames 2000
```

The numbers reported here are the average FPS on PC with RTX A6000 GPU
and Intel i9-9820X:

* **Before**: 94784.43553363248
* **Overriding `sim.device`**: 100484.21244511564

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 6131a573
......@@ -113,6 +113,7 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
# override configurations with non-hydra CLI arguments
env_cfg.scene.num_envs = args_cli.num_envs if args_cli.num_envs is not None else env_cfg.scene.num_envs
env_cfg.sim.device = args_cli.device if args_cli.device is not None else env_cfg.sim.device
env_cfg.seed = args_cli.seed if args_cli.seed is not None else env_cfg.sim.seed
# process distributed
world_size = 1
......
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.46.3"
version = "0.46.4"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.46.4 (2025-10-06)
~~~~~~~~~~~~~~~~~~~
Changed
^^^^^^^
* Fixed :attr:`~isaaclab.sim.simulation_context.SimulationContext.device` to return the device from the configuration.
Previously, it was returning the device from the simulation manager, which was causing a performance overhead.
0.46.3 (2025-09-17)
~~~~~~~~~~~~~~~~~~~
......@@ -10,6 +20,7 @@ Added
* Modified setter to support for viscous and dynamic joint friction coefficients in articulation based on IsaacSim 5.0.
* Added randomization of viscous and dynamic joint friction coefficients in event term.
0.46.2 (2025-09-13)
~~~~~~~~~~~~~~~~~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment