-
Notifications
You must be signed in to change notification settings - Fork 3k
Load real2sim asset in locomanipulation SDG #4394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile SummaryThis PR adds support for loading USD background scenes in the locomanipulation SDG pipeline. It enables instantiating packing tables within background freespace and projecting initial robot/object states from input episodes into the environment. Key changes:
Critical Issues Found:
Confidence Score: 0/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Main
participant Env as G1LocomanipulationSDGEnv
participant Scene as setup_navigation_scene
participant Fixtures as SceneFixtures
participant Occupancy as OccupancyMap
participant PathPlanner as plan_path
participant StateProj as project_*_state_into_env
User->>Main: Run with --background_usd_path & --background_occupancy_yaml_file
Main->>Env: Create environment with cfg
Env->>Env: add_background_asset(background_usd_path)
Env->>Env: add_robot_pov_cam(height, width)
Env->>Env: _setup_background_mesh()
Note over Env: Hide mesh, enable collision
Main->>Scene: setup_navigation_scene(env, input_episode_data)
Scene->>Env: get_background_fixture()
Env-->>Scene: background_fixture with occupancy_map
alt Background exists
Scene->>Occupancy: Get background occupancy map
Scene->>Fixtures: Randomize start, end, obstacles in freespace
loop For each fixture
Fixtures->>Fixtures: place_randomly()
Fixtures->>Scene: sync_simulation_state()
Scene->>Occupancy: merge_occupancy_maps()
end
else No background
Scene->>Occupancy: Create empty occupancy map
Scene->>Fixtures: Randomize end and obstacles only
end
Scene->>StateProj: project_robot_state_into_env()
StateProj->>Env: Transform and write robot pose/joints
Scene->>StateProj: project_object_state_into_env()
StateProj->>Env: Transform and write object pose
Scene->>PathPlanner: plan_path(start, end, occupancy_map)
PathPlanner-->>Scene: base_path (waypoints)
alt Path valid (>2 points)
Scene-->>Main: NavigationScene
Main->>Main: Execute state machine with navigation
else Path invalid
Scene-->>Main: None (failure)
Main->>Main: Retry with different demo
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9 files reviewed, 6 comments
scripts/imitation_learning/locomanipulation_sdg/generate_data.py
Outdated
Show resolved
Hide resolved
scripts/imitation_learning/locomanipulation_sdg/generate_data.py
Outdated
Show resolved
Hide resolved
scripts/imitation_learning/locomanipulation_sdg/generate_data.py
Outdated
Show resolved
Hide resolved
84b712f to
500a157
Compare
500a157 to
a401bac
Compare
a401bac to
1f9b421
Compare
|
|
||
|
|
||
| def sync_simulation_state(env: LocomanipulationSDGEnv) -> None: | ||
| """Push USD pose updates into physics, advance the sim, and sync back.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please follow the docstring style for arguments as well? we have some guidelines documented here - https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html
| return torch.any( | ||
| torch.max(torch.norm(net_contact_forces[:, :, sensor_cfg.body_ids], dim=-1), dim=1)[0] > threshold, dim=1 | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please run the formatter with ./isaaclab.sh -f
Description
This PR adds support to load a USD background in locomanipulation SDG pipeline.
NavigationScenedata wrapper class for navigation scenes, so that whensetup_navigation_scenefails, it returns None, instead of (None, None, ..)object_too_far_from_robot, to check if robot picks up the wheel.It was tested by:
Generate locomanipulation SDG data with the hand_hold-endeavor-wormhole dataset at: https://huggingface.co/datasets/nvidia/PhysicalAI-Robotics-NuRec/tree/main
Type of change
Screenshots
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there