Skip to content

Conversation

@mingxin-zheng
Copy link
Contributor

@mingxin-zheng mingxin-zheng commented Mar 29, 2025

Fixes #86

Description

This PR upgrades the simulation framework to work with IsaacSim 4.5 and IsaacLab 2.0.2 by updating all import paths and dependencies from the old omni.isaac.lab modules to their new counterparts in isaaclab and isaacsim.

It also fixes the pydantic error by versioning to 2.10.6

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the simulation framework to work with IsaacSim 4.5 and IsaacLab 2.0.2 by updating all import paths and dependencies from the old omni.isaac.lab modules to their new counterparts in isaaclab and isaacsim.

  • Update import paths across simulation tasks, configuration files, environment modules, and annotators.
  • Replace deprecated package references with the new IsaacLab/IsaacSim modules.
  • Adjust default parameters in command-line arguments where applicable.

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/tasks/ultrasound/approach/mdp/events.py Updated package imports from omni.isaac.lab to isaaclab.
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/tasks/ultrasound/approach/mdp/init.py Updated imports to new IsaacLab modules.
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/tasks/ultrasound/approach/config/teleop/ik_rel_env_cfg.py Updated configuration imports from omni.isaac.lab to isaaclab.
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/tasks/ultrasound/approach/config/franka/franka_manager_rl_env_cfg.py Replaced omni.isaac.lab references with updated references in isaaclab.
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/tasks/ultrasound/approach/config/franka/init.py Adjusted the environment entry points to reference isaaclab.
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/tasks/init.py Updated task module import from omni.isaac.lab_tasks to isaaclab_tasks.
workflows/robotic_ultrasound/scripts/simulation/exts/robotic_us_ext/robotic_us_ext/lab_assets/franka.py Updated asset and actuator imports with the new package names.
workflows/robotic_ultrasound/scripts/simulation/examples/sim_with_dds.py Updated application launcher and config parser imports.
workflows/robotic_ultrasound/scripts/simulation/environments/teleoperation/teleop_se3_agent.py Replaced multiple omni.isaac.lab imports with their isaaclab equivalents.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/utils.py Updated math utility function imports.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/pi0_policy/eval.py Modified command-line argument defaults and updated config parser import.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/modules/path_planning_module.py Updated math utility import as per new package structure.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/modules/orientation_module.py Updated math utility function imports.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/meta_state_machine/ultrasound_state_machine.py Updated prim view import to align with new isaacsim paths.
workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/liver_scan_sm.py Updated application launcher and config parser imports.
workflows/robotic_ultrasound/scripts/simulation/annotators/ultrasound.py Updated prim import from omni.isaac.lab to isaacsim.
workflows/robotic_ultrasound/scripts/simulation/annotators/target.py Updated prim import from omni.isaac.lab to isaacsim.
workflows/robotic_ultrasound/scripts/simulation/annotators/franka.py Updated robot and controller imports, and adjusted type annotations.
workflows/robotic_ultrasound/scripts/simulation/annotators/base.py Updated world import path to use isaacsim.
Files not reviewed (1)
  • tools/env_setup_robot_us.sh: Language not supported
Comments suppressed due to low confidence (2)

workflows/robotic_ultrasound/scripts/simulation/annotators/franka.py:46

  • [nitpick] Consider adding a type annotation for the 'franka' parameter for consistency and improved clarity across the codebase.
def __init__(self, franka, ik: bool, prim_path: str, topic: str, period: float, domain_id):

workflows/robotic_ultrasound/scripts/simulation/environments/state_machine/pi0_policy/eval.py:40

  • Verify that updating the default task parameter from None to the specified environment name is intentional, as this may affect environment instantiation.
parser.add_argument("--task", type=str, default="Isaac-Teleop-Torso-FrankaUsRs-IK-RL-Rel-v0", help="Name of the task.")

@mingxin-zheng
Copy link
Contributor Author

image

Working for eval.py

Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

@KumoLiu Could you please help modify the training part accordingly?
I think you can refer to the IsaacSim doc: https://docs.isaacsim.omniverse.nvidia.com/latest/overview/extensions_renaming.html
CC @NigelNelson , @masoudmoghani .

Thanks in advance.

Signed-off-by: Mingxin Zheng <[email protected]>
KumoLiu and others added 2 commits March 31, 2025 16:29
…tate_machine/meta_state_machine/ultrasound_state_machine.py

Signed-off-by: YunLiu <[email protected]>
Signed-off-by: Mingxin Zheng <[email protected]>
@Nic-Ma Nic-Ma requested a review from NigelNelson April 1, 2025 00:59
@KumoLiu
Copy link
Contributor

KumoLiu commented Apr 1, 2025

@KumoLiu Could you please help modify the training part accordingly?

I tested the training component in this branch, and it works well. Several minor import issues mentioned above have been addressed. While I only tested robotic_ultrasound_lora in terms of memory usage, I also verified the code for robotic_ultrasound. The latter should work fine since the only difference is that robotic_ultrasound_lora involves fine-tuning a subset of the model parameters.

BTW, 30000 training steps need to train over 40 hours, does it expected? @NigelNelson

@NigelNelson
Copy link
Contributor

@KumoLiu Could you please help modify the training part accordingly?

I tested the training component in this branch, and it works well. Several minor import issues mentioned above have been addressed. While I only tested robotic_ultrasound_lora in terms of memory usage, I also verified the code for robotic_ultrasound. The latter should work fine since the only difference is that robotic_ultrasound_lora involves fine-tuning a subset of the model parameters.

BTW, 30000 training steps need to train over 40 hours, does it expected? @NigelNelson

Yes this seems reasonable, it is a relatively large model to be training on a single consumer GPU.

@KumoLiu
Copy link
Contributor

KumoLiu commented Apr 1, 2025

Yes this seems reasonable, it is a relatively large model to be training on a single consumer GPU.

Thanks @NigelNelson for the confirmation!

Signed-off-by: Mingxin Zheng <[email protected]>
Signed-off-by: Mingxin Zheng <[email protected]>
Signed-off-by: Mingxin Zheng <[email protected]>
Signed-off-by: Mingxin Zheng <[email protected]>
Signed-off-by: Mingxin Zheng <[email protected]>
@mingxin-zheng
Copy link
Contributor Author

integration.log
unit.log

Signed-off-by: Mingxin Zheng <[email protected]>
@mingxin-zheng mingxin-zheng merged commit 6f24573 into main Apr 2, 2025
3 checks passed
@mingxin-zheng mingxin-zheng deleted the mz/us_sim45 branch April 2, 2025 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pydantic error when running eval.py

5 participants