Skip to content

fix(demo-collision-free-grasps): target object ID (+3 more) - #65

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/demo-collision-free-grasps-assorted-152b4794
Open

fix(demo-collision-free-grasps): target object ID (+3 more)#65
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/demo-collision-free-grasps-assorted-152b4794

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Small fixes in scripts/demo_collision_free_grasps.py:

fix: target object ID hardcoded to 1

Fix: Replace:

    parser.add_argument(
        "--max_scene_points",
        type=int,
        default=8192,
        help="Maximum number of scene points to use for collision checking (for speed optimization)",
    )
    parser.add_argument(
        "--visualize",

with:

    parser.add_argument(
        "--max_scene_points",
        type=int,
        default=8192,
        help="Maximum number of scene points to use for collision checking (for speed optimization)",
    )
    parser.add_argument(
        "--target_object_id",
        type=int,
        default=1,
        help="Instance ID of the target object in the segmentation mask",
    )
    parser.add_argument(
        "--visualize",

fix: target object ID hardcoded to 1

Fix: Replace:

                target_object_id=1,  # Assuming object has ID 1

with:

                target_object_id=args.target_object_id,

fix: contradictory required/default for camera_intrinsics

Fix: Replace:

    parser.add_argument(
        "--camera_intrinsics",
        type=float,
        nargs=4,
        required=True,
        default=[1480.589599609375, 1480.589599609375, 960.0, 540.0],
        help="Camera intrinsics as [fx, fy, cx, cy]",
    )

with:

    parser.add_argument(
        "--camera_intrinsics",
        type=float,
        nargs=4,
        default=[1480.589599609375, 1480.589599609375, 960.0, 540.0],
        help="Camera intrinsics as [fx, fy, cx, cy]",
    )

fix: results omit T_center, preventing frame recovery

Fix: Replace:

    results = {
        "all_grasps": grasps_centered,
        "all_scores": grasp_conf_inferred,
        "collision_free_mask": collision_free_mask,
        "collision_free_grasps": collision_free_grasps,
        "collision_free_scores": collision_free_scores,
        "scene_pc": scene_pc_centered,
        "object_pc": pc_centered,
        "camera_intrinsics": {"fx": fx, "fy": fy, "cx": cx, "cy": cy},
    }

with:

    results = {
        "all_grasps": grasps_centered,
        "all_scores": grasp_conf_inferred,
        "collision_free_mask": collision_free_mask,
        "collision_free_grasps": collision_free_grasps,
        "collision_free_scores": collision_free_scores,
        "scene_pc": scene_pc_centered,
        "object_pc": pc_centered,
        "camera_intrinsics": {"fx": fx, "fy": fy, "cx": cx, "cy": cy},
        "T_center": T_center,
    }

Files changed

  • scripts/demo_collision_free_grasps.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:08
@andrewwhitecdw

Copy link
Copy Markdown
Author

Closing this sweep-generated PR: sole commit is missing a valid Signed-off-by trailer. It does not meet the sweep requirements (single signed-off commit).

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.

1 participant