Skip to content

Commit e956ddb

Browse files
authored
Fixes errors in tools and tutorial scripts (#1669)
# Description A few scripts in the tools and tutorials folder had outdated APIs that caused errors when run. This scripts fixes issues with 2 scripts: - check_instanceable.py used an old `enable_flatcache` API that no longer exists. this has been replaced with the new `enable_fabric` API - run_usd_camera.py was indexing camera data outputs with incorrect keys/indices, which is now fixed ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - 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 - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
1 parent a73b63c commit e956ddb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/standalone/tools/check_instanceable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ def main():
8282
sim = SimulationContext(
8383
stage_units_in_meters=1.0, physics_dt=0.01, rendering_dt=0.01, backend="torch", device="cuda:0"
8484
)
85-
# enable flatcache which avoids passing data over to USD structure
85+
# enable fabric which avoids passing data over to USD structure
8686
# this speeds up the read-write operation of GPU buffers
8787
if sim.get_physics_context().use_gpu_pipeline:
88-
sim.get_physics_context().enable_flatcache(True)
88+
sim.get_physics_context().enable_fabric(True)
8989
# enable hydra scene-graph instancing
90-
# this is needed to visualize the scene when flatcache is enabled
90+
# this is needed to visualize the scene when fabric is enabled
9191
set_carb_setting(sim._settings, "/persistent/omnihydra/useSceneGraphInstancing", True)
9292

9393
# Create interface to clone the scene

source/standalone/tutorials/04_sensors/run_usd_camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def run_simulator(sim: sim_utils.SimulationContext, scene_entities: dict):
252252
# Derive pointcloud from camera at camera_index
253253
pointcloud = create_pointcloud_from_depth(
254254
intrinsic_matrix=camera.data.intrinsic_matrices[camera_index],
255-
depth=camera.data.output[camera_index]["distance_to_image_plane"],
255+
depth=camera.data.output["distance_to_image_plane"][camera_index],
256256
position=camera.data.pos_w[camera_index],
257257
orientation=camera.data.quat_w_ros[camera_index],
258258
device=sim.device,

0 commit comments

Comments
 (0)