Skip to content

Conversation

@pascal-roth
Copy link
Collaborator

Description

Removes dependency on

from isaacsim.core.utils.carb import get_carb_setting, set_carb_setting

Replaces set_carb_setting(carb_settings, <setting-name>, <setting-value> with direct carb call carb_settings.set_string(<setting-name>, <setting-value>), ...set_int..., ...set_bool..., ...set_float.... And replaces get_carb_setting with carb_settings.get()

Type of change

  • Dependency removal

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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

@pascal-roth pascal-roth self-assigned this Nov 3, 2025
@github-actions github-actions bot added enhancement New feature or request isaac-lab Related to Isaac Lab team labels Nov 3, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

Replaces wrapper functions set_carb_setting and get_carb_setting from isaacsim.core.utils.carb with direct carb API calls to remove the dependency. The changes systematically replace the generic wrapper with type-specific methods (set_bool, set_int, set_float, set_string) and direct get() calls.

Key Changes:

  • Removed imports of set_carb_setting and get_carb_setting from 8 files
  • Added explicit type checking using isinstance() to determine which type-specific setter to use
  • Replaced get_carb_setting(settings, key) with settings.get(key)
  • Type checking order is correct (bool before int, since bool is a subclass of int in Python)

Issue Found:

  • Two additional files still use the deprecated imports but were not updated in this PR:
    • source/isaaclab/isaaclab/sim/utils.py (uses get_carb_setting)
    • scripts/tools/check_instanceable.py (uses set_carb_setting)

Confidence Score: 3/5

  • Safe to merge but incomplete - two files still use the deprecated imports
  • The refactoring is technically sound with proper type checking and correct implementation. However, the migration is incomplete as two files still import and use the deprecated carb utility functions that this PR aims to remove. This creates an inconsistent state where some code uses the new approach while other code still depends on the old utilities.
  • Pay attention to source/isaaclab/isaaclab/sim/utils.py and scripts/tools/check_instanceable.py which still use deprecated imports

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/sim/simulation_context.py 4/5 Replaced carb utils with direct API calls and added type-specific setter methods with proper type checking order
source/isaaclab/isaaclab/app/app_launcher.py 5/5 Simple replacement of set_carb_setting with type-specific carb API calls for rendering and animation recording

Sequence Diagram

sequenceDiagram
    participant App as AppLauncher
    participant Sim as SimulationContext
    participant Carb as carb.settings
    
    Note over App,Carb: Before: Using wrapper functions
    App->>Carb: set_carb_setting(settings, key, value)
    Note over Carb: Type inference in wrapper
    Carb-->>App: Setting applied
    
    Note over App,Carb: After: Direct API calls
    App->>App: Check isinstance(value, bool/int/float/str)
    App->>Carb: settings.set_bool/set_int/set_float/set_string(key, value)
    Carb-->>App: Setting applied
    
    Sim->>Sim: _apply_render_settings_from_cfg()
    Sim->>Sim: Type check preset values
    Sim->>Carb: settings.set_bool/set_int/set_float/set_string(key, value)
    Carb-->>Sim: Setting applied
    
    Note over Sim: Uses settings.get() instead of get_carb_setting()
    Sim->>Carb: settings.get(key)
    Carb-->>Sim: Return value
Loading

8 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

import isaacsim.core.utils.stage as stage_utils
import omni.log
import omni.physx
import omni.usd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Two files still import and use the deprecated carb utils but weren't updated:

  • source/isaaclab/isaaclab/sim/utils.py:23 imports and uses get_carb_setting on line 1075
  • scripts/tools/check_instanceable.py:70 imports and uses set_carb_setting on line 99

These should be updated to use direct carb API calls for consistency.

)
key = rendering_setting_name_mapping[key]
set_carb_setting(self.carb_settings, key, value)
if isinstance(value, bool):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In simcontext, we have a function called set_setting you can just put this logic there and later only call self.set_setting.

@pascal-roth pascal-roth moved this to In review in Isaac Lab Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request isaac-lab Related to Isaac Lab team

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants