Updates task deprecation call sites#5410
Conversation
ae8f2f4 to
f228f89
Compare
Greptile SummaryThis PR is a mechanical migration of call sites away from deprecated Confidence Score: 4/5Safe to merge; all functional changes are semantically equivalent and all backends support the new APIs. Only P2 style findings (stale "Tiled" naming in class names, field names, and function names). All logic changes are verified to be correct substitutions for deprecated APIs. cartpole_camera_presets_env_cfg.py, cartpole_showcase/cartpole_camera/cartpole_camera_env_cfg.py, shadow_hand_vision_env_cfg.py — stale "Tiled" naming. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Camera Call Sites] --> B{Deprecated?}
B -- TiledCamera / TiledCameraCfg --> C[Migrate to Camera / CameraCfg]
B -- root_state_w / body_link_state_w --> D[Migrate to explicit split props]
B -- Newton vs PhysX write dispatch --> E[Hardcode _index APIs - both backends supported]
C --> F[Updated: cartpole, shadow_hand, dexsuite, stack, pick_place, tacsl]
D --> G[Updated: dexsuite/rewards.py, pick_place/observations.py]
E --> H[Updated: inhand_manipulation_env.py]
F & G & H --> I[Version bumps: isaaclab_tasks 1.5.30, isaaclab_contrib 0.3.1]
|
| # bind backend-optimal write methods (Newton prefers mask-based, PhysX prefers indexed) | ||
| use_mask = "newton" in self.sim.physics_manager.__name__.lower() | ||
| if use_mask: | ||
| self._set_joint_pos_target = self.hand.set_joint_position_target | ||
| self._write_obj_root_pose = self.object.write_root_pose_to_sim | ||
| self._write_obj_root_vel = self.object.write_root_velocity_to_sim | ||
| self._write_hand_joint_pos = self.hand.write_joint_position_to_sim | ||
| self._write_hand_joint_vel = self.hand.write_joint_velocity_to_sim | ||
| else: | ||
| self._set_joint_pos_target = self.hand.set_joint_position_target_index | ||
| self._write_obj_root_pose = self.object.write_root_pose_to_sim_index | ||
| self._write_obj_root_vel = self.object.write_root_velocity_to_sim_index | ||
| self._write_hand_joint_pos = self.hand.write_joint_position_to_sim_index | ||
| self._write_hand_joint_vel = self.hand.write_joint_velocity_to_sim_index | ||
| # bind write methods | ||
| self._set_joint_pos_target = self.hand.set_joint_position_target_index | ||
| self._write_obj_root_pose = self.object.write_root_pose_to_sim_index | ||
| self._write_obj_root_vel = self.object.write_root_velocity_to_sim_index | ||
| self._write_hand_joint_pos = self.hand.write_joint_position_to_sim_index | ||
| self._write_hand_joint_vel = self.hand.write_joint_velocity_to_sim_index |
There was a problem hiding this comment.
This is the correct change. write_joint_velocity_to_sim resolves to write_joint_velocity_to_sim_index by default regardless of the framework.
|
@pbarejko @bdilinila could one of you approve this PR. It's meant to reduce the number of warnings we're seeing in CI. |
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR migrates task and contrib modules from deprecated TiledCamera/TiledCameraCfg aliases to the canonical Camera/CameraCfg classes, and updates task state reads and simulation write calls to use explicit indexed APIs. The changes are mechanical find-and-replace operations that appear correct, though one semantic change in the inhand manipulation env removes backend-adaptive write method selection that may have performance implications.
Architecture Impact
Cross-module impact is minimal. The TiledCamera/TiledCameraCfg types were aliases pointing to Camera/CameraCfg, so this is purely a naming cleanup. The changes touch:
isaaclab_contribsensors (TacSL visuotactile sensor)isaaclab_tasksdirect environments (cartpole, shadow_hand, inhand_manipulation)isaaclab_tasksmanager-based environments (cartpole, dexsuite, pick_place, stack)
The removal of backend-adaptive write methods in inhand_manipulation_env.py changes behavior but shouldn't break functionality since the indexed APIs work across backends.
Implementation Verdict
Ship it — This is a straightforward deprecation cleanup with one minor concern noted below.
Test Coverage
The existing test test_visuotactile_sensor.py is updated to use CameraCfg and provides adequate coverage for the TacSL sensor changes. However, there are no new tests added for the inhand manipulation write method changes. The CI shows isaaclab_tasks tests passing across all 3 shards, which provides confidence the changes don't break functionality.
CI Status
All relevant checks pass:
- ✅
isaaclab_tasks [1/3],[2/3],[3/3]: success - ✅
isaaclab_contrib: success - ✅
pre-commit: success - ✅
environments_training: success
Multiple core tests are skipped but this appears intentional based on the change detection system.
Findings
🔵 Improvement: source/isaaclab_tasks/isaaclab_tasks/direct/inhand_manipulation/inhand_manipulation_env.py:80-84 — Removed backend-adaptive optimization
The original code selected between mask-based writes (preferred by Newton) and indexed writes (preferred by PhysX) based on the physics backend. The new code unconditionally uses indexed writes. While this is functionally correct (indexed APIs work on both backends), it may have minor performance implications on Newton. The original comment stated "Newton prefers mask-based, PhysX prefers indexed" — if this optimization was meaningful, consider documenting why it was removed or whether the indexed path is now universally optimal.
# Before: Adaptive selection based on backend
use_mask = "newton" in self.sim.physics_manager.__name__.lower()
if use_mask:
self._set_joint_pos_target = self.hand.set_joint_position_target
...
else:
self._set_joint_pos_target = self.hand.set_joint_position_target_index
...
# After: Always use indexed
self._set_joint_pos_target = self.hand.set_joint_position_target_index🔵 Improvement: source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/mdp/rewards.py:221 — State access change is correct but verify equivalence
The change from asset.data.root_state_w.torch[:, 3:7] to asset.data.root_link_quat_w.torch is semantically cleaner. However, verify that root_link_quat_w provides the same reference frame as the quaternion component of root_state_w. Based on Isaac Lab conventions, these should be equivalent for the root link, but confirm this doesn't change the orientation tracking reward behavior.
🔵 Improvement: source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/pick_place/mdp/observations.py:83-90 — Explicit concatenation is clearer
The change from accessing the compound body_link_state_w to explicitly concatenating body_link_pose_w and body_link_vel_w is clearer and aligns with the PR's goal of using explicit state properties. This is a good change.
🔵 Improvement: source/isaaclab_tasks/docs/CHANGELOG.rst:4 — Changelog entry date appears to be in the future
The changelog entry shows date 2026-04-27 which appears to be a placeholder or future date. This should be updated to the actual merge date. (Same issue in source/isaaclab_contrib/docs/CHANGELOG.rst:4)
🔵 Improvement: source/isaaclab_contrib/docs/README.md:259,291 — Documentation update is complete
The README documentation correctly updates both the import statement and the usage example to use CameraCfg instead of TiledCameraCfg. Good attention to documentation consistency.
| from isaaclab.envs import DirectRLEnvCfg, ViewerCfg | ||
| from isaaclab.scene import InteractiveSceneCfg | ||
| from isaaclab.sensors import TiledCameraCfg | ||
| from isaaclab.sensors import CameraCfg |
|
I think we can merge #5377 first and rebase this one on top. This seems to cover some additional updates than just the cameras. but 5377 had more thorough coverage of the camera APIs. |
a747e6d to
c35a47b
Compare
Summary
Verification
Rebased onto develop after PR #5304 merged.