-
Notifications
You must be signed in to change notification settings - Fork 3k
Adds check script with raycaster attached to H1 robot #4489
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?
Adds check script with raycaster attached to H1 robot #4489
Conversation
…#4046) Cleans up new util functions - Bug fix (non-breaking change which fixes an issue) - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) 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 --------- Signed-off-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com> Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
Greptile OverviewGreptile SummaryFixed deprecated PyTorch tensor initialization and migrated codebase from IsaacSim's SimulationContext to IsaacLab's implementation. Added new H1 robot demo with multi-mesh ray caster for testing raycasting with dynamic obstacles. Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant AppLauncher
participant H1Demo
participant ManagerBasedRLEnv
participant SimulationContext
participant Scene
participant MultiMeshRayCaster
participant H1Robot
User->>AppLauncher: Launch with --num_objects arg
AppLauncher->>H1Demo: Initialize H1RoughDemoWithRayCaster
H1Demo->>H1Demo: Load H1RoughEnvCfg_PLAY_WITH_RAYCASTER
Note over H1Demo: Bug: num_obstacles hardcoded to 10<br/>ignores args_cli.num_objects
H1Demo->>H1Demo: Create obstacle configs (0 to num_obstacles)
H1Demo->>H1Demo: Configure MultiMeshRayCasterCfg
Note over H1Demo: Ray caster attached to Robot/torso_link<br/>with 5x5m grid pattern
H1Demo->>ManagerBasedRLEnv: Create environment
ManagerBasedRLEnv->>SimulationContext: Initialize simulation
ManagerBasedRLEnv->>Scene: Setup scene with robot and obstacles
Scene->>H1Robot: Spawn robot at origin
loop For each obstacle
Scene->>Scene: Spawn obstacle_i with random size/position
end
Scene->>MultiMeshRayCaster: Create ray caster sensor
MultiMeshRayCaster->>MultiMeshRayCaster: Setup raycast targets<br/>/World/ground<br/>/World/envs/env_.*/obstacle_.*
H1Demo->>H1Demo: Load pretrained policy
loop Simulation Loop
User->>H1Demo: Step simulation
H1Demo->>H1Robot: Get observations
H1Demo->>H1Demo: Run policy inference
H1Demo->>ManagerBasedRLEnv: Execute actions
ManagerBasedRLEnv->>MultiMeshRayCaster: Update ray caster (50Hz)
MultiMeshRayCaster->>MultiMeshRayCaster: Cast rays in 5x5m grid
MultiMeshRayCaster->>Scene: Detect ground and obstacles
MultiMeshRayCaster-->>H1Demo: Return distance data
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.
3 files reviewed, 1 comment
|
|
||
| # Add obstacles individually to the scene | ||
| # Default number of obstacles | ||
| num_obstacles = 10 |
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.
Hardcoded num_obstacles = 10 in __post_init__ ignores the --num_objects CLI argument. The CLI arg on line 34 is parsed but never used.
| num_obstacles = 10 | |
| num_obstacles = args_cli.num_objects if hasattr(args_cli, 'num_objects') else 10 |
Signed-off-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
| sim = SimulationContext( | ||
| physics_dt=1.0 / 60.0, rendering_dt=1.0 / 60.0, sim_params=sim_params, backend="torch", device="cuda:0" | ||
| ) | ||
| sim = SimulationContext(SimulationCfg()) |
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.
This needs to be undone. It is isaacsim script.
Mayankm96
left a comment
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.
The Isaac Sim script needs to be fixed. Those scripts are minimal repros using Isaac Sim for their team so shouldn't have Isaac Lab code in there.
Other than that, the demo looks pretty cool! <3
Description
Fixes check multi mesh raycaster script and adds additional check script with raycaster attached to H1 robot
Type of change
Screenshots
multi_mesh_ray_caster.mp4
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there