-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Supports vectorized environments for pick and place demo #3996
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 OverviewGreptile SummaryThis PR successfully vectorizes the pick-and-place demo to support multiple environments simultaneously. The implementation converts scalar control flags to per-environment boolean tensors, updates keyboard event handlers to broadcast commands to all environments, and properly indexes tensors for selective environment updates. Key changes:
The previous comment correctly identified the Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant KeyboardHandler
participant PickAndPlaceEnv
participant Robot[N]
participant Cube[N]
participant Gripper[N]
User->>KeyboardHandler: Press key (A/D/W/S/Q/E)
KeyboardHandler->>PickAndPlaceEnv: _on_keyboard_event()
PickAndPlaceEnv->>PickAndPlaceEnv: Update control flags for ALL envs<br/>(go_to_cube[:] or go_to_target[:])
loop Simulation Step
PickAndPlaceEnv->>PickAndPlaceEnv: _apply_action()
alt go_to_cube.any()
PickAndPlaceEnv->>Robot[N]: Get head positions [go_to_cube]
PickAndPlaceEnv->>Cube[N]: Get cube positions [go_to_cube]
PickAndPlaceEnv->>PickAndPlaceEnv: Calculate proportional control<br/>for selected envs
PickAndPlaceEnv->>PickAndPlaceEnv: instant_controls[go_to_cube] = ...
end
alt go_to_target.any()
PickAndPlaceEnv->>Robot[N]: Get head positions [go_to_target]
PickAndPlaceEnv->>PickAndPlaceEnv: Calculate proportional control<br/>for selected envs
PickAndPlaceEnv->>PickAndPlaceEnv: instant_controls[go_to_target] = ...
end
PickAndPlaceEnv->>Robot[N]: set_joint_effort_target(x, y, z)<br/>for ALL envs
PickAndPlaceEnv->>Gripper[N]: set_grippers_command()<br/>for ALL envs
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.
1 file reviewed, 1 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.
1 file reviewed, no comments
ooctipus
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.
LGTM!
| dt=1 / 60, | ||
| device="cpu", | ||
| render_interval=decimation, | ||
| use_fabric=True, |
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.
maybe false?
Description
Adds support for vectorizing the pick and place demo to test performance for multi-environments.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there