Skip to content

Commit

Permalink
add grasp pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
NishanthJKumar committed May 28, 2024
1 parent 9d435fd commit 59873dd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions predicators/spot_utils/sample_and_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
sample_move_offset_from_target, spot_pose_to_geom2d
from predicators.spot_utils.skills.spot_stow_arm import stow_arm
from predicators.spot_utils.skills.spot_navigation import navigate_to_absolute_pose
from predicators.spot_utils.skills.spot_grasp import grasp_at_pixel
from predicators.spot_utils.skills.spot_grasp import grasp_at_pixel, get_pixel_from_user
from predicators.spot_utils.utils import get_spot_home_pose


Expand Down Expand Up @@ -141,8 +141,11 @@ def reward_function(input_traj: List[Tuple[float, float]]) -> float:
visualize_all_artifacts(artifacts, detections_outfile,
no_detections_outfile)

pixel, _ = get_grasp_pixel(rgbds, artifacts, language_ids[-1],
hand_camera, rng)
# Automatically get grasp pixel via vision
# pixel, _ = get_grasp_pixel(rgbds, artifacts, language_ids[-1],
# hand_camera, rng)
# Get grasp pixel via user query.
pixel = get_pixel_from_user(rgbds[hand_camera].rgb)
grasp_at_pixel(robot, rgbds[hand_camera], pixel)
stow_arm(robot)

Expand Down

0 comments on commit 59873dd

Please sign in to comment.