-
Notifications
You must be signed in to change notification settings - Fork 20
Fix croodinate pickment #514
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| import torch | ||
|
|
||
| from embodichain.lab.sim import SimulationManager | ||
| from embodichain.data import get_data_path | ||
| from embodichain.lab.sim.atomic_actions import ( | ||
| ActionBinding, | ||
| ActionInvocation, | ||
|
|
@@ -80,8 +81,8 @@ | |
|
|
||
| PICKMENT_ASSET_ROOT = "CoordinatedPlacementAndPickment" | ||
| GRIPPER_TCP_Z = 0.121 | ||
| SUPPORT_SURFACE_Z = 0.65 | ||
| SUPPORT_SURFACE_SIZE = (0.60, 0.60, 0.02) | ||
| SUPPORT_SURFACE_Z = 0.55 | ||
| SUPPORT_SURFACE_SIZE = (0.7, 1.20, 0.02) | ||
| SUPPORT_SURFACE_CENTER = ( | ||
| 0.0, | ||
| 0.0, | ||
|
|
@@ -133,6 +134,28 @@ class PickmentObjectPreset: | |
| target_world_yaw_deg=0.0, | ||
| hand_close_qpos=0.026, | ||
| ), | ||
| "water_basin": PickmentObjectPreset( | ||
| label="water_basin", | ||
| mesh_path=get_data_path("WaterBasin/water_basin.glb"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If either new asset is absent from the local cache and the download service is unavailable, constructing Prompt To Fix With AIThis is a comment left during a code review.
Path: scripts/tutorials/atomic_action/coordinated_pickment.py
Line: 139
Comment:
**Assets resolve during module import**
If either new asset is absent from the local cache and the download service is unavailable, constructing `OBJECT_PRESETS` invokes `get_data_path` before argument parsing and aborts the import. This prevents the tutorial from running even when the user selects an existing local object such as `pencil` that does not require either new asset.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly. |
||
| init_xy=(0.0, 0.02), | ||
| init_rot=(0.0, 0.0, 0.0), | ||
| surface_clearance=0.008, | ||
| body_scale=(1.0, 1.0, 1.0), | ||
| target_translation=(-0.12, -0.03, 0.12), | ||
| target_world_yaw_deg=0.0, | ||
| hand_close_qpos=0.026, | ||
| ), | ||
| "plastic_tray": PickmentObjectPreset( | ||
| label="plastic_tray", | ||
| mesh_path=get_data_path("PlasticTray/plastic_tray.glb"), | ||
| init_xy=(-0.02, 0.02), | ||
| init_rot=(0.0, 0.0, 90.0), | ||
| surface_clearance=0.008, | ||
| body_scale=(1.0, 1.0, 1.0), | ||
| target_translation=(-0.12, -0.03, 0.12), | ||
| target_world_yaw_deg=0.0, | ||
| hand_close_qpos=0.026, | ||
| ), | ||
| } | ||
| PICKMENT_SAMPLE_INTERVAL = 96 | ||
| PICKMENT_OBJECT_MOTION_KEYFRAMES = 6 | ||
|
|
@@ -160,7 +183,7 @@ def parse_arguments() -> argparse.Namespace: | |
| parser.add_argument( | ||
| "--object", | ||
| choices=sorted(OBJECT_PRESETS), | ||
| default="pencil", | ||
| default="plastic_tray", | ||
| help="Object mesh to grasp in the coordinated pickment demo.", | ||
| ) | ||
| return parser.parse_args() | ||
|
|
@@ -355,6 +378,7 @@ def run_coordinated_pickment_demo( | |
| obj, | ||
| label=preset.label, | ||
| n_sample=args.n_sample, | ||
| # n_sample = 1000, | ||
| force_reannotate=args.force_reannotate, | ||
|
Comment on lines
379
to
382
|
||
| ) | ||
| left_to_right_arm_direction = compute_left_to_right_arm_direction(robot, sim.device) | ||
|
|
@@ -377,6 +401,7 @@ def run_coordinated_pickment_demo( | |
| hold_steps=PICKMENT_HOLD_STEPS, | ||
| object_motion_keyframes=PICKMENT_OBJECT_MOTION_KEYFRAMES, | ||
| left_to_right_arm_direction=left_to_right_arm_direction, | ||
| middle_empty_ratio=0.7, | ||
| ) | ||
| engine = AtomicActionEngine( | ||
| motion_generator=motion_gen, | ||
|
|
||
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.
PlasticTrayandWaterBasinare new public dataset classes, but the module does not declare them through__all__as required for public modules. Because the assets package imports this module with a wildcard, its exported API remains dependent on implementation-level names rather than an explicit declaration.Context Used: CLAUDE.md (source)
Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!