Skip to content

Commit

Permalink
sync main branch (#4)
Browse files Browse the repository at this point in the history
* Updates pre-merge and post-merge CI (isaac-sim#1118)

# Description

- Improving CI code formatting and readability
- Updated AMI: nvidia-container-toolkit vulnerability fix
- Making Isaac SIM base image an argument in Dockerfile

---------

Co-authored-by: Alexander Poddubny <[email protected]>
Co-authored-by: David Hoeller <[email protected]>

* Adds buildspec for mirroring job (isaac-sim#1177)

# Description

Adding a buildspec for repo mirroring job:
- Mirrors a branch
- Uses personal github token
- Target repo and branch names are coming from env variables
- Pushing code with force

* Fix Cartpole Manager-based Vision-Based Environment Task Name in Docs (isaac-sim#1176)

# Description

Name of Cartpole Manager-based Vision-Based was incorrect in docs,
changed to match the exact argument that should be passed as task to
workflows

## Type of change
- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update

## Checklist

- [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
- [x] 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

* Fixes Isaac Sim executable on pip installation (isaac-sim#1172)

# Description

This PR fix isaac-sim#831 by taking
into account the Isaac Sim installation using PIP

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

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] 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
- [ ] 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

* Fixes the event for randomizing rigid body material (isaac-sim#1140)

# Description

The current friction randomization event only selects a single random
number in the given range and does not vary them. With the given PR,
this is getting fixed, and there is a sampling of the entire given
range.

## Type of change

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

## Screenshots

| Before | After |
| ------ | ----- |
| ![Screenshot from 2024-10-03
22-26-49](https://github.com/user-attachments/assets/d13f86ee-c776-4046-af2e-46be8f271a00)
| ![Screenshot from 2024-10-03
22-27-15](https://github.com/user-attachments/assets/cf0a536d-20d0-47f1-b580-25241049cdd4)
|


## Checklist

- [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

---------

Co-authored-by: Mayank Mittal <[email protected]>

* Adds configuration classes for spawning different assets at prim paths (isaac-sim#1164)

# Description

This MR adds configuration classes that allow spawning different assets
at the resolved prim paths. For instance, for the prim path expression
"/World/envs/env_.*/Object", these configuration instances allow
spawning a different type of prim at individual path locations.

Fixes isaac-sim#186

## Type of change

- New feature (non-breaking change which adds functionality)

## Checklist

- [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

---------

Signed-off-by: Mayank Mittal <[email protected]>
Co-authored-by: David Hoeller <[email protected]>

* Moves codebuild pipeline files to `.aws` directory (isaac-sim#1196)

# Description

Moving codebuild pipelines out of github folder to avoid github actions
being triggered on them.

* Fixes the ray_caster_camera tutorial script when saving the data (isaac-sim#1198)

There was a minor error in the `run_ray_caster_camera.py` tutorial
script that prevented it from saving images.

- [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
- [X] 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

* Fixes running the docker container when the DISPLAY env variable is not defined (isaac-sim#1163)

# Description

This PR attempts to fix isaac-sim#1162 by adding the possibility to do not pass
the `DISPLAY` env to the docker exec command if the variable is not
defined

Fixes isaac-sim#1162

## Type of change

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

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] 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
- [ ] 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

* Fixes default joint pos when setting joint limits (isaac-sim#1040)

# Description

When setting joint limits, the existing default joint positions can fall
outside of the bounds of the new joint limits. This change clips the
default joint positions to ensure they are within the bounds of the new
limits.

## Type of change

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


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] 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
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

* Adds benchmark script to measure robot loading (isaac-sim#1195)

# Description

This MR makes a minimal script to measure how long it takes to load
different robots.

## Type of change

- New feature (non-breaking change which adds functionality)

## Screenshots

For loading 2048 robots headless:

| **Metric** | **H1** | **G1** | **Anymal_D** |

|-------------------|-------------------|-------------------|-------------------|
| App start time | 3791.73 ms | 3660.98 ms | 3597.30 ms |
| Imports time | 1116.61 ms | 1132.87 ms | 1142.27 ms |
| Scene creation time | 1584.14 ms | 1674.18 ms | 2000.40 ms |
| Sim start time | 1451.94 ms | 2647.43 ms | 1778.49 ms |
| Per step time | 2.31 ms | 4.71 ms | 3.67 ms |

Computer specs:

* OS: Ubuntu 20.04.6 LTS x86_64 
* CPU: 12th Gen Intel i9-12900K (24) @ 5.100GHz 
* GPU: NVIDIA 4090 RTX

## Checklist

- [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
- [ ] 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

* Fixes formatting issues in the robot loading benchmark script

* Fixes device propogation for noise and adds noise tests (isaac-sim#1175)

# Description

This PR adds in logic to fix errors when noise config parameters are
tensor based and do not have the correct device setting. This adds a
check at the beginning of each noise function to correct the config
parameters device if they are torch.tensors. In addition this PR adds
tests for noise models.

## Type of change

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

## Checklist

- [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
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] 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

* Removes extension startup messages from the Simulation App (isaac-sim#1217)

# Description

This MR disables terminal spamming when launching the app. With the flag
`/app/enableStdoutOutput` disabled, we no longer have the app output
when the kit extensions are startup.

Fixes isaac-sim#1097, isaac-sim#196

## Type of change

- Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## Screenshots

```
./isaaclab.sh -p source/standalone/environments/zero_agent.py --task Isaac-Velocity-Rough-Anymal-C-v0 --num_envs 32
```

Output:

```
[INFO] Using python from: /home/mayank/mambaforge/envs/isaaclab-rsl/bin/python                                                   
[INFO][AppLauncher]: Loading experience file: /home/mayank/git_nv/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/../../../../../../apps/isaaclab.python.kit
Loading user config located at: '/media/vulcan/packman-repo/chk/kit-kernel/106.1.0+release.140981.10a4b5c0.gl.linux-x86_64.release/data/Kit/Isaac-Sim/4.2/user.config.json'
[Info] [carb] Logging to file: /media/vulcan/packman-repo/chk/kit-kernel/106.1.0+release.140981.10a4b5c0.gl.linux-x86_64.release/logs/Kit/Isaac-Sim/4.2/kit_20241011_180901.log
2024-10-11 16:09:01 [0ms] [Warning] [omni.kit.app.plugin] No crash reporter present, dumps uploading isn't available.

|---------------------------------------------------------------------------------------------|
| Driver Version: 535.183.01    | Graphics API: Vulkan
|=============================================================================================|
| GPU | Name                             | Active | LDA | GPU Memory | Vendor-ID | LUID       |
|     |                                  |        |     |            | Device-ID | UUID       |
|     |                                  |        |     |            | Bus-ID    |            |
|---------------------------------------------------------------------------------------------|
| 0   | NVIDIA RTX A6000                 | Yes: 0 |     | 49386   MB | 10de      | 0          |
|     |                                  |        |     |            | 2230      | bffafd0e.. |
|     |                                  |        |     |            | 68        |            |
|=============================================================================================|
| OS: 20.04.6 LTS (Focal Fossa) ubuntu, Version: 20.04.6, Kernel: 5.15.0-122-generic
| XServer Vendor: The X.Org Foundation, XServer Version: 12013000 (1.20.13.0)
| Processor: Intel(R) Core(TM) i9-9820X CPU @ 3.30GHz | Cores: 10 | Logical: 20
|---------------------------------------------------------------------------------------------|
| Total Memory (MB): 63970 | Free Memory: 41524
| Total Page/Swap (MB): 2047 | Free Page/Swap: 2047
|---------------------------------------------------------------------------------------------|
2024-10-11 16:09:07 [6,565ms] [Warning] [omni.replicator.core.scripts.annotators] Annotator PostProcessDispatch is already registered, overwriting annotator template
2024-10-11 16:09:08 [7,613ms] [Warning] [omni.kit.widget.cache_indicator.cache_state_menu] Unable to detect Omniverse Cache Server. Consider installing it for better IO performance.
[INFO]: Parsing configuration from: <class 'omni.isaac.lab_tasks.manager_based.locomotion.velocity.config.anymal_c.rough_env_cfg.AnymalCRoughEnvCfg'>
2024-10-11 16:09:17 [16,685ms] [Warning] [omni.isaac.lab.envs.manager_based_env] Seed not set for the environment. The environment creation may not be deterministic.
[INFO]: Base environment:
    Environment device    : cuda:0
    Environment seed      : None
    Physics step-size     : 0.005
    Rendering step-size   : 0.02
    Environment step-size : 0.02
[INFO] Generating terrains based on curriculum took : 1.881988 seconds
[INFO]: Time taken for scene creation : 4.564743 seconds
[INFO]: Scene manager:  <class InteractiveScene>
    Number of environments: 32
    Environment spacing   : 2.5
    Source prim name      : /World/envs/env_0
    Global prim paths     : ['/World/ground']
    Replicate physics     : True
[INFO]: Starting the simulation. This may take a few seconds. Please wait...
2024-10-11 16:09:29 [27,861ms] [Warning] [omni.hydra.scene_delegate.plugin] Calling getBypassRenderSkelMeshProcessing for prim /World/envs/env_0/Robot/LF_THIGH/visuals.proto_mesh_1_id1 that has not been populated
2024-10-11 16:09:29 [27,880ms] [Warning] [omni.hydra] Mesh '/World/envs/env_0/Robot/base/visuals.proto_mesh_0_id0' has corrupted data in primvar 'st': buffer size 702 doesn't match expected size 12828 in faceVarying primvars
[INFO]: Time taken for simulation start : 7.193578 seconds
[INFO] Command Manager:  <CommandManager> contains 1 active terms.
+------------------------------------------------+
|              Active Command Terms              |
+-------+---------------+------------------------+
| Index | Name          |          Type          |
+-------+---------------+------------------------+
|   0   | base_velocity | UniformVelocityCommand |
+-------+---------------+------------------------+

[INFO] Action Manager:  <ActionManager> contains 1 active terms.
+------------------------------------+
|  Active Action Terms (shape: 12)   |
+--------+-------------+-------------+
| Index  | Name        |   Dimension |
+--------+-------------+-------------+
|   0    | joint_pos   |          12 |
+--------+-------------+-------------+

Module omni.isaac.lab.utils.warp.kernels 6cb40f6 load on device 'cuda:0' took 0.44 ms
[INFO] Observation Manager: <ObservationManager> contains 1 groups.
+----------------------------------------------------------+
| Active Observation Terms in Group: 'policy' (shape: (235,)) |
+-----------+--------------------------------+-------------+
|   Index   | Name                           |    Shape    |
+-----------+--------------------------------+-------------+
|     0     | base_lin_vel                   |     (3,)    |
|     1     | base_ang_vel                   |     (3,)    |
|     2     | projected_gravity              |     (3,)    |
|     3     | velocity_commands              |     (3,)    |
|     4     | joint_pos                      |    (12,)    |
|     5     | joint_vel                      |    (12,)    |
|     6     | actions                        |    (12,)    |
|     7     | height_scan                    |    (187,)   |
+-----------+--------------------------------+-------------+

[INFO] Event Manager:  <EventManager> contains 3 active terms.
+--------------------------------------+
| Active Event Terms in Mode: 'startup' |
+----------+---------------------------+
|  Index   | Name                      |
+----------+---------------------------+
|    0     | physics_material          |
|    1     | add_base_mass             |
+----------+---------------------------+
+---------------------------------------+
|  Active Event Terms in Mode: 'reset'  |
+--------+------------------------------+
| Index  | Name                         |
+--------+------------------------------+
|   0    | base_external_force_torque   |
|   1    | reset_base                   |
|   2    | reset_robot_joints           |
+--------+------------------------------+
+----------------------------------------------+
|    Active Event Terms in Mode: 'interval'    |
+-------+------------+-------------------------+
| Index | Name       | Interval time range (s) |
+-------+------------+-------------------------+
|   0   | push_robot |       (10.0, 15.0)      |
+-------+------------+-------------------------+

[INFO] Termination Manager:  <TerminationManager> contains 2 active terms.
+---------------------------------+
|     Active Termination Terms    |
+-------+--------------+----------+
| Index | Name         | Time Out |
+-------+--------------+----------+
|   0   | time_out     |   True   |
|   1   | base_contact |  False   |
+-------+--------------+----------+

[INFO] Reward Manager:  <RewardManager> contains 11 active terms.
+-----------------------------------------+
|           Active Reward Terms           |
+-------+----------------------+----------+
| Index | Name                 |   Weight |
+-------+----------------------+----------+
|   0   | track_lin_vel_xy_exp |      1.0 |
|   1   | track_ang_vel_z_exp  |      0.5 |
|   2   | lin_vel_z_l2         |     -2.0 |
|   3   | ang_vel_xy_l2        |    -0.05 |
|   4   | dof_torques_l2       |   -1e-05 |
|   5   | dof_acc_l2           | -2.5e-07 |
|   6   | action_rate_l2       |    -0.01 |
|   7   | feet_air_time        |    0.125 |
|   8   | undesired_contacts   |     -1.0 |
|   9   | flat_orientation_l2  |      0.0 |
|   10  | dof_pos_limits       |      0.0 |
+-------+----------------------+----------+

[INFO] Curriculum Manager:  <CurriculumManager> contains 1 active terms.
+---------------------------+
|  Active Curriculum Terms  |
+--------+------------------+
| Index  | Name             |
+--------+------------------+
|   0    | terrain_levels   |
+--------+------------------+

Creating window for environment.
[INFO]: Completed setting up the environment...
[INFO]: Gym observation space: Dict('policy': Box(-inf, inf, (32, 235), float32))
[INFO]: Gym action space: Box(-inf, inf, (32, 12), float32)
```

## Checklist

- [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
- [ ] 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

* Removes additional sbatch and fixes default profile in cluster deployment (isaac-sim#1229)

# Description

In the slum workflow, currently, there was an unnecessary `sbatch`
command; this PR removes it. In addition, the profile argument was
marked as optional, but when a job was submitted, and job arguments were
passed, it became necessary. This PR fixes this behavior.

## Type of change

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

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] 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
- [ ] 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

* Fixes the checkpoint loading error in RSL-RL training script (isaac-sim#1210)

# Description

An error of `No checkpoints in the directory` will throw when resume
from a previous training with `--video` set. This is because a new log
folder will be created before the check.

This MR fixes this issue by loading the checkpoint before.

Fixes isaac-sim#1209 

## Type of change

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

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] 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
- [ ] 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

* Makes pre and post merge pipelines more flexible on the Isaac SIM base image version (isaac-sim#1211)

# Description

Making the base image version a parameter so the pipelines can use
different versions without the need to hardcode that.

* Disables backward pass compilation of warp kernels (isaac-sim#1222)

# Description

Many of the warp kernels don't need backward pass compilation. This MR
disables the computation of the backward passes within the kernels. This
should reduce the kernel compile times.

Reference:
https://nvidia.github.io/warp/configuration.html#kernel-settings

## Type of change

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

## Checklist

- [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
- [ ] 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

* Switches from `carb` to `omni.log` for logging (isaac-sim#1215)

# Description

Earlier, we used [`Carbonite
SDK`](https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/api/dir_carb_logging.html)
to log directly. However, this has limited functionalities compared to
[`omni.log`](https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/api/namespace_omni__log.html)
in Omniverse. Using `omni.log`, you can fine-grain the channels and
print levels better.

Link to omni.log documentation:
https://docs.omniverse.nvidia.com/kit/docs/carbonite/latest/docs/omni.log/Logging.html

This MR migrates all `carb` references to the new API.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## Screenshot

Checking the performance:
```
./isaaclab.sh -p source/standalone/benchmarks/benchmark_load_robot.py --num_envs 2048 --robot g1 --headless
```

**Before (carb logging)**
[INFO]: App start time: 4676.57 ms
[INFO]: Imports time: 2008.77 ms
[INFO]: Scene creation time: 2966.36 ms
[INFO]: Sim start time: 5782.76 ms
[INFO]: Per step time: 15.80 ms

**After (omni.log logging)**
[INFO]: App start time: 4833.56 ms
[INFO]: Imports time: 1983.67 ms
[INFO]: Scene creation time: 2792.97 ms
[INFO]: Sim start time: 5805.97 ms
[INFO]: Per step time: 15.86 ms


## Checklist

- [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
- [ ] 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

* Excludes cache files from vscode explorer (isaac-sim#1131)

Small quality of life change that excludes cache files from VSCode File
Explorer when attached to sim container.

---------

Signed-off-by: Mayank Mittal <[email protected]>
Co-authored-by: Alexander Poddubny <[email protected]>
Co-authored-by: Alexander Poddubny <[email protected]>
Co-authored-by: David Hoeller <[email protected]>
Co-authored-by: glvov-bdai <[email protected]>
Co-authored-by: Toni-SM <[email protected]>
Co-authored-by: Pascal Roth <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]>
Co-authored-by: Mayank Mittal <[email protected]>
Co-authored-by: Michael Gussert <[email protected]>
Co-authored-by: Giulio Romualdi <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: jtigue-bdai <[email protected]>
Co-authored-by: Wei Yang <[email protected]>
Co-authored-by: Sergei Sergienko <[email protected]>
  • Loading branch information
15 people authored Oct 14, 2024
1 parent 9a9cbe4 commit 47b06f7
Show file tree
Hide file tree
Showing 74 changed files with 1,743 additions and 286 deletions.
15 changes: 15 additions & 0 deletions .aws/mirror-buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 0.2

phases:
install:
runtime-versions:
nodejs: 14
pre_build:
commands:
- git config --global user.name "Isaac LAB CI Bot"
- git config --global user.email "[email protected]"
build:
commands:
- git remote set-url origin https://github.com/${TARGET_REPO}.git
- git checkout $SOURCE_BRANCH
- git push --force https://[email protected]/${TARGET_REPO}.git $SOURCE_BRANCH:$TARGET_BRANCH
44 changes: 44 additions & 0 deletions .aws/postmerge-ci-buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 0.2

phases:
build:
commands:
- echo "Building and pushing Docker image"
- |
# Determine branch name or use fallback
if [ -n "$CODEBUILD_WEBHOOK_HEAD_REF" ]; then
BRANCH_NAME=$(echo $CODEBUILD_WEBHOOK_HEAD_REF | sed 's/refs\/heads\///')
elif [ -n "$CODEBUILD_SOURCE_VERSION" ]; then
BRANCH_NAME=$CODEBUILD_SOURCE_VERSION
else
BRANCH_NAME="unknown"
fi
# Replace '/' with '-' and remove any invalid characters for Docker tag
SAFE_BRANCH_NAME=$(echo $BRANCH_NAME | sed 's/[^a-zA-Z0-9._-]/-/g')
# Use "latest" if branch name is empty or only contains invalid characters
if [ -z "$SAFE_BRANCH_NAME" ]; then
SAFE_BRANCH_NAME="latest"
fi
# Get the git repository short name
REPO_SHORT_NAME=$(basename -s .git `git config --get remote.origin.url`)
if [ -z "$REPO_SHORT_NAME" ]; then
REPO_SHORT_NAME="verification"
fi
# Combine repo short name and branch name for the tag
COMBINED_TAG="${REPO_SHORT_NAME}-${SAFE_BRANCH_NAME}"
docker login -u \$oauthtoken -p $NGC_TOKEN nvcr.io
docker build -t $IMAGE_NAME:$COMBINED_TAG \
--build-arg ISAACSIM_BASE_IMAGE_ARG=$ISAACSIM_BASE_IMAGE \
--build-arg ISAACSIM_VERSION_ARG=$ISAACSIM_BASE_VERSION \
--build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim \
--build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab \
--build-arg DOCKER_USER_HOME_ARG=/root \
-f docker/Dockerfile.base .
docker push $IMAGE_NAME:$COMBINED_TAG
docker tag $IMAGE_NAME:$COMBINED_TAG $IMAGE_NAME:$COMBINED_TAG-b$CODEBUILD_BUILD_NUMBER
docker push $IMAGE_NAME:$COMBINED_TAG-b$CODEBUILD_BUILD_NUMBER
84 changes: 84 additions & 0 deletions .aws/premerge-ci-buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: 0.2

phases:
pre_build:
commands:
- echo "Launching EC2 instance to run tests"
- |
INSTANCE_ID=$(aws ec2 run-instances \
--image-id ami-0b3a9d48380433e49 \
--count 1 \
--instance-type g5.2xlarge \
--key-name production/ssh/isaaclab \
--security-group-ids sg-02617e4b8916794c4 \
--subnet-id subnet-0907ceaeb40fd9eac \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":500}}]' \
--output text \
--query 'Instances[0].InstanceId')
- aws ec2 wait instance-running --instance-ids $INSTANCE_ID
- |
EC2_INSTANCE_IP=$(aws ec2 describe-instances \
--filters "Name=instance-state-name,Values=running" "Name=instance-id,Values=$INSTANCE_ID" \
--query 'Reservations[*].Instances[*].[PrivateIpAddress]' \
--output text)
- mkdir -p ~/.ssh
- |
aws ec2 describe-key-pairs --include-public-key --key-name production/ssh/isaaclab \
--query 'KeyPairs[0].PublicKey' --output text > ~/.ssh/id_rsa.pub
- |
aws secretsmanager get-secret-value --secret-id production/ssh/isaaclab \
--query SecretString --output text > ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_*
- echo "Host $EC2_INSTANCE_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- |
aws ec2-instance-connect send-ssh-public-key \
--instance-id $INSTANCE_ID \
--availability-zone us-west-2a \
--ssh-public-key file://~/.ssh/id_rsa.pub \
--instance-os-user ubuntu
build:
commands:
- echo "Running tests on EC2 instance"
- SRC_DIR=$(basename $CODEBUILD_SRC_DIR)
- cd ..
- |
bash -c '
function retry_scp() {
local retries=5
local wait_time=30
local count=0
while [ $count -lt $retries ]; do
sleep $wait_time
scp -r $SRC_DIR ubuntu@$EC2_INSTANCE_IP:~
if [ $? -eq 0 ]; then
echo "SCP command succeeded"
return 0
fi
count=$((count + 1))
echo "SCP command failed. Retrying in $wait_time seconds..."
done
echo "SCP command failed after $retries attempts."
return 1
}
retry_scp
'
- ssh ubuntu@$EC2_INSTANCE_IP "docker login -u \\\$oauthtoken -p $NGC_TOKEN nvcr.io"
- |
ssh ubuntu@$EC2_INSTANCE_IP "
cd $SRC_DIR
DOCKER_BUILDKIT=1 docker build -t isaac-lab-dev \
--build-arg ISAACSIM_BASE_IMAGE_ARG=$ISAACSIM_BASE_IMAGE \
--build-arg ISAACSIM_VERSION_ARG=$ISAACSIM_BASE_VERSION \
--build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim \
--build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab \
--build-arg DOCKER_USER_HOME_ARG=/root \
-f docker/Dockerfile.base .
docker run --rm --entrypoint bash --gpus all --network=host \
--name isaac-lab-test isaac-lab-dev ./isaaclab.sh -t && exit \$?
"
post_build:
commands:
- echo "Terminating EC2 instance"
- aws ec2 terminate-instances --instance-ids $INSTANCE_ID
12 changes: 0 additions & 12 deletions .github/workflows/postmerge-ci-buildspec.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/premerge-ci-buildspec.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .vscode/tools/settings.template.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"files.exclude": {
"**/.mypy_cache": true,
"**/__pycache__": true,
"**/*.egg-info": true
},
"files.associations": {
"*.tpp": "cpp",
"*.kit": "toml",
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Guidelines for modifications:
* Chenyu Yang
* David Yang
* Gary Lvov
* Giulio Romualdi
* HoJin Jeon
* Jean Tampon
* Jia Lin Yuan
Expand All @@ -62,6 +63,7 @@ Guidelines for modifications:
* Rosario Scalise
* Shafeef Omar
* Vladimir Fokow
* Wei Yang
* Xavier Nal
* Yang Jin
* Zhengyu Zhang
Expand Down
2 changes: 2 additions & 0 deletions docker/.env.base
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Accept the NVIDIA Omniverse EULA by default
ACCEPT_EULA=Y
# NVIDIA Isaac Sim base image
ISAACSIM_BASE_IMAGE=nvcr.io/nvidia/isaac-sim
# NVIDIA Isaac Sim version to use (e.g. 4.2.0)
ISAACSIM_VERSION=4.2.0
# Derived from the default path in the NVIDIA provided Isaac Sim container
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
# Please check above link for license information.

# Base image
ARG ISAACSIM_BASE_IMAGE_ARG
ARG ISAACSIM_VERSION_ARG
FROM nvcr.io/nvidia/isaac-sim:${ISAACSIM_VERSION_ARG} AS base
FROM ${ISAACSIM_BASE_IMAGE_ARG}:${ISAACSIM_VERSION_ARG} AS base
ENV ISAACSIM_VERSION=${ISAACSIM_VERSION_ARG}

# Set default RUN shell to bash
Expand Down
18 changes: 11 additions & 7 deletions docker/cluster/cluster_interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ submit_job() {

case $CLUSTER_JOB_SCHEDULER in
"SLURM")
CMD=sbatch
job_script_file=submit_job_slurm.sh
;;
"PBS")
CMD=bash
job_script_file=submit_job_pbs.sh
;;
*)
Expand All @@ -75,7 +73,7 @@ submit_job() {
;;
esac

ssh $CLUSTER_LOGIN "cd $CLUSTER_ISAACLAB_DIR && $CMD $CLUSTER_ISAACLAB_DIR/docker/cluster/$job_script_file \"$CLUSTER_ISAACLAB_DIR\" \"isaac-lab-$profile\" ${@}"
ssh $CLUSTER_LOGIN "cd $CLUSTER_ISAACLAB_DIR && bash $CLUSTER_ISAACLAB_DIR/docker/cluster/$job_script_file \"$CLUSTER_ISAACLAB_DIR\" \"isaac-lab-$profile\" ${@}"
}

#==
Expand Down Expand Up @@ -162,11 +160,17 @@ case $command in
scp $SCRIPT_DIR/exports/isaac-lab-$profile.tar $CLUSTER_LOGIN:$CLUSTER_SIF_PATH/isaac-lab-$profile.tar
;;
job)
[ $# -ge 1 ] && profile=$1 && shift
if [ $# -ge 1 ]; then
passed_profile=$1
if [ -f ".env.$passed_profile" ]; then
profile=$passed_profile
shift
fi
fi
job_args="$@"
echo "Executing job command"
[ -n "$profile" ] && echo "Using profile: $profile"
[ -n "$job_args" ] && echo "Job arguments: $job_args"
echo "[INFO] Executing job command"
[ -n "$profile" ] && echo -e "\tUsing profile: $profile"
[ -n "$job_args" ] && echo -e "\tJob arguments: $job_args"
source $SCRIPT_DIR/.env.cluster
# Get current date and time
current_datetime=$(date +"%Y%m%d_%H%M%S")
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ services:
context: ../
dockerfile: 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}
Expand Down
3 changes: 1 addition & 2 deletions docker/utils/container_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ def enter(self):
"exec",
"--interactive",
"--tty",
"-e",
f"DISPLAY={os.environ['DISPLAY']}",
*(["-e", f"DISPLAY={os.environ['DISPLAY']}"] if "DISPLAY" in os.environ else []),
f"{self.container_name}",
"bash",
])
Expand Down
Binary file added docs/source/_static/demos/multi_asset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/source/api/lab/omni.isaac.lab.sim.spawners.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
sensors
from_files
materials
wrappers

.. rubric:: Classes

Expand Down Expand Up @@ -302,3 +303,27 @@ Physical Materials
.. autoclass:: DeformableBodyMaterialCfg
:members:
:exclude-members: __init__, func

Wrappers
--------

.. automodule:: omni.isaac.lab.sim.spawners.wrappers

.. rubric:: Classes

.. autosummary::

MultiAssetSpawnerCfg
MultiUsdFileCfg

.. autofunction:: spawn_multi_asset

.. autoclass:: MultiAssetSpawnerCfg
:members:
:exclude-members: __init__, func

.. autofunction:: spawn_multi_usd_file

.. autoclass:: MultiUsdFileCfg
:members:
:exclude-members: __init__, func
11 changes: 11 additions & 0 deletions docs/source/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ a fixed base robot. This guide goes over the various considerations and steps to

make_fixed_prim

Spawning Multiple Assets
------------------------

This guide explains how to import and configure different assets in each environment. This is
useful when you want to create diverse environments with different objects.

.. toctree::
:maxdepth: 1

multi_asset_spawning

Saving Camera Output
--------------------

Expand Down
Loading

0 comments on commit 47b06f7

Please sign in to comment.