$search
Class for doing grasp planning on point clusters. More...
Public Member Functions | |
def | __init__ |
def | check_box_plane_collisions |
check if a box goes through the x-y plane ranges is [[xmin, ymin, zmin], [xmax, ymax, zmax]] pose is a 4x4 scipy matrix | |
def | check_grasp_neighbors |
check both sides of a grasp to see if they are also viable grasps | |
def | check_gripper_pose |
check for collisions and points within the gripper when placed at a given pose (4x4 scipy mat) returns -1 for colliding with points, -2 for colliding with the table, and the number of points inside the gripper otherwise table is assumed to be the xy plane | |
def | draw_gripper_model |
draw the box model of the gripper, placed at pose_mat (4x4 scipy matrix) in frame (defaults to the object frame) | |
def | evaluate_arbitrary_grasp |
given a cluster and a grasp pose (4x4 scipy mat in object frame), guess at the probability of success for the grasp | |
def | evaluate_point_cluster_grasps |
evaluate grasps on the point cluster | |
def | find_best_palm_dir_grasp |
find the best grasp from a given start pose along the palm (gripper x) direction, in steps of size palm_step moving the gripper inward until/as long as there are object points within the gripper, until there are collisions checking for collisions with the table (assumed to be the xy plane) returns the grasp pose if a good grasp is found, None if not | |
def | find_fingertip_object_center_dists |
find the distances from the object box center to the fingertip center when projected on the gripper x-, y-, and z-axes | |
def | find_grasps_along_direction |
for a given gripper pose and axis (0=x, 1=y, 2=z), both expressed in the points frame, find grasps at a fixed spacing along that axis in both directions while varying the palm dist (inward by steps of palm_step) as long as there are object points within the gripper, until there are collisions start_pose is a 4x4 scipy mat, object_bounding_box is [[xmin, ymin, zmin], [xmax, ymax, zmax]] min_points is the minimum number of points that need to be inside the hand for the grasp to be okay | |
def | find_high_point_grasps |
find grasps of high points on the object, pointing in towards the bottom center of the object | |
def | find_points_in_bounding_box |
return a count of points (4xn scipy mat) contained in a bounding box (ranges is a 2-list (min, max) of 3-lists (x,y,z)) | |
def | grasp_quality |
assign a numerical quality value for this grasp | |
def | gripper_model |
return the xyz bounding box ranges for the parts of the gripper model placed at 3-list pos and 3x3 scipy matrix rot uses a really simple model of the fully-open gripper as three boxes (2 fingers and a palm), with a box for the empty space in-between gripper_boxes is a list of boxes, each of which is a 2-list (min, max) of 3-lists (x,y,z) of corner coords space boxes is a list of lists of box ranges; there must be points contained in each box-list for the grasp to be valid (points are summed within lists) origin of gripper is at the ?_wrist_roll_link | |
def | init_cluster_grasper |
initialization for planning grasps | |
def | keypause |
pause for enter | |
def | object_fits_in_hand |
figure out whether all the points fit within the gripper for an arbitrary pose (no more than gripper width/2 away from gripper x-z plane) | |
def | orthogonal_measure |
how far is the pose from being orthogonal to the object frame? returns a measure of angle of the closest rotation that would make the pose orthogonal to the object frame | |
def | overhead_angle |
angle of gripper pose x-axis away from directly overhead (global -z) | |
def | plan_point_cluster_grasps |
plan grasps for a point cluster | |
def | pplist |
pretty-print list to string | |
def | quality_to_probability |
turn a quality value into a 'probability' value (fairly arbitrary, not based on real data) | |
def | transform_ranges |
transform ranges for a bounding box using transform | |
Public Attributes | |
actual_wrist_frame_in_model_frame | |
backoff_depth_steps | |
cbbf | |
cluster_frame | |
collision_point_id_start | |
debug | |
disable_grasp_neighbor_check | |
draw_functions | |
draw_gripper | |
gripper_box_id_start | |
gripper_boxes | |
gripper_opening | |
height_good_for_side_grasps | |
include_high_point_grasps | |
min_good_grasp_points | |
model_frame_in_actual_wrist_frame | |
overhead_grasps_only | |
palm_step | |
point_id_start | |
pregrasp_dist | |
pregrasp_just_outside_box | |
side_grasp_start_height | |
side_grasps_only | |
side_step | |
space_boxes | |
tf_broadcaster | |
tf_listener | |
Private Attributes | |
_box_fits_in_hand | |
_outfile | |
_output_features | |
_points_per_sq_cm | |
_wrist_to_fingertip_center_dist | |
_wrist_to_palm_dist |
Class for doing grasp planning on point clusters.
Definition at line 69 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::__init__ | ( | self, | ||
tf_listener = None , |
||||
tf_broadcaster = None | ||||
) |
Definition at line 71 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::check_box_plane_collisions | ( | self, | ||
pose, | ||||
ranges | ||||
) |
check if a box goes through the x-y plane ranges is [[xmin, ymin, zmin], [xmax, ymax, zmax]] pose is a 4x4 scipy matrix
Definition at line 269 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::check_grasp_neighbors | ( | self, | ||
points, | ||||
grasp | ||||
) |
check both sides of a grasp to see if they are also viable grasps
Definition at line 477 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::check_gripper_pose | ( | self, | ||
points, | ||||
pose | ||||
) |
check for collisions and points within the gripper when placed at a given pose (4x4 scipy mat) returns -1 for colliding with points, -2 for colliding with the table, and the number of points inside the gripper otherwise table is assumed to be the xy plane
Definition at line 287 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::draw_gripper_model | ( | self, | ||
pose_mat, | ||||
frame = 'object_frame' , |
||||
pause_after_broadcast = 0 | ||||
) |
draw the box model of the gripper, placed at pose_mat (4x4 scipy matrix) in frame (defaults to the object frame)
Definition at line 182 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::evaluate_arbitrary_grasp | ( | self, | ||
points, | ||||
pose | ||||
) |
given a cluster and a grasp pose (4x4 scipy mat in object frame), guess at the probability of success for the grasp
Definition at line 358 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::evaluate_point_cluster_grasps | ( | self, | ||
grasps, | ||||
frame | ||||
) |
evaluate grasps on the point cluster
Definition at line 763 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::find_best_palm_dir_grasp | ( | self, | ||
points, | ||||
start_pose, | ||||
palm_step, | ||||
object_bounding_box | ||||
) |
find the best grasp from a given start pose along the palm (gripper x) direction, in steps of size palm_step moving the gripper inward until/as long as there are object points within the gripper, until there are collisions checking for collisions with the table (assumed to be the xy plane) returns the grasp pose if a good grasp is found, None if not
Definition at line 540 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::find_fingertip_object_center_dists | ( | self, | ||
pose | ||||
) |
find the distances from the object box center to the fingertip center when projected on the gripper x-, y-, and z-axes
Definition at line 442 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::find_grasps_along_direction | ( | self, | ||
points, | ||||
start_pose, | ||||
axis, | ||||
spacing, | ||||
palm_step, | ||||
object_bounding_box, | ||||
max_side_move = None , |
||||
omit_center = False | ||||
) |
for a given gripper pose and axis (0=x, 1=y, 2=z), both expressed in the points frame, find grasps at a fixed spacing along that axis in both directions while varying the palm dist (inward by steps of palm_step) as long as there are object points within the gripper, until there are collisions start_pose is a 4x4 scipy mat, object_bounding_box is [[xmin, ymin, zmin], [xmax, ymax, zmax]] min_points is the minimum number of points that need to be inside the hand for the grasp to be okay
Definition at line 584 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::find_high_point_grasps | ( | self, | ||
points, | ||||
object_bounding_box, | ||||
object_bounding_box_dims, | ||||
palm_step, | ||||
max_grasps_to_return = 40 | ||||
) |
find grasps of high points on the object, pointing in towards the bottom center of the object
Definition at line 630 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::find_points_in_bounding_box | ( | self, | ||
wrist_frame_points, | ||||
ranges, | ||||
return_points = 0 | ||||
) |
return a count of points (4xn scipy mat) contained in a bounding box (ranges is a 2-list (min, max) of 3-lists (x,y,z))
Definition at line 233 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::grasp_quality | ( | self, | ||
point_count, | ||||
palm_dist, | ||||
side_dist, | ||||
overhead_grasp, | ||||
fits_in_hand, | ||||
not_edge, | ||||
orthogonality = 1 , |
||||
centered_dist = 0 , |
||||
points = None , |
||||
grasp = None , |
||||
collision_point_count = 0 | ||||
) |
assign a numerical quality value for this grasp
Definition at line 509 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::gripper_model | ( | self | ) |
return the xyz bounding box ranges for the parts of the gripper model placed at 3-list pos and 3x3 scipy matrix rot uses a really simple model of the fully-open gripper as three boxes (2 fingers and a palm), with a box for the empty space in-between gripper_boxes is a list of boxes, each of which is a 2-list (min, max) of 3-lists (x,y,z) of corner coords space boxes is a list of lists of box ranges; there must be points contained in each box-list for the grasp to be valid (points are summed within lists) origin of gripper is at the ?_wrist_roll_link
Definition at line 217 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::init_cluster_grasper | ( | self, | ||
cluster | ||||
) |
initialization for planning grasps
Definition at line 731 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::keypause | ( | self | ) |
pause for enter
Definition at line 724 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::object_fits_in_hand | ( | self, | ||
points, | ||||
pose | ||||
) |
figure out whether all the points fit within the gripper for an arbitrary pose (no more than gripper width/2 away from gripper x-z plane)
Definition at line 459 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::orthogonal_measure | ( | self, | ||
pose | ||||
) |
how far is the pose from being orthogonal to the object frame? returns a measure of angle of the closest rotation that would make the pose orthogonal to the object frame
Definition at line 409 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::overhead_angle | ( | self, | ||
pose | ||||
) |
angle of gripper pose x-axis away from directly overhead (global -z)
Definition at line 469 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::plan_point_cluster_grasps | ( | self | ) |
plan grasps for a point cluster
Definition at line 782 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::pplist | ( | self, | ||
list | ||||
) |
pretty-print list to string
Definition at line 177 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::quality_to_probability | ( | self, | ||
quality | ||||
) |
turn a quality value into a 'probability' value (fairly arbitrary, not based on real data)
Definition at line 395 of file point_cluster_grasp_planner.py.
def pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::transform_ranges | ( | self, | ||
transform, | ||||
ranges | ||||
) |
transform ranges for a bounding box using transform
Definition at line 257 of file point_cluster_grasp_planner.py.
Definition at line 742 of file point_cluster_grasp_planner.py.
pr2_gripper_grasp_planner_cluster::point_cluster_grasp_planner::PointClusterGraspPlanner::_outfile [private] |
Definition at line 169 of file point_cluster_grasp_planner.py.
Definition at line 167 of file point_cluster_grasp_planner.py.
Definition at line 100 of file point_cluster_grasp_planner.py.
Definition at line 126 of file point_cluster_grasp_planner.py.
Definition at line 129 of file point_cluster_grasp_planner.py.
Definition at line 113 of file point_cluster_grasp_planner.py.
Definition at line 159 of file point_cluster_grasp_planner.py.
Definition at line 86 of file point_cluster_grasp_planner.py.
Definition at line 733 of file point_cluster_grasp_planner.py.
Definition at line 96 of file point_cluster_grasp_planner.py.
Definition at line 172 of file point_cluster_grasp_planner.py.
Definition at line 164 of file point_cluster_grasp_planner.py.
Definition at line 89 of file point_cluster_grasp_planner.py.
Definition at line 173 of file point_cluster_grasp_planner.py.
Definition at line 97 of file point_cluster_grasp_planner.py.
Definition at line 105 of file point_cluster_grasp_planner.py.
Definition at line 132 of file point_cluster_grasp_planner.py.
Definition at line 135 of file point_cluster_grasp_planner.py.
Definition at line 153 of file point_cluster_grasp_planner.py.
Definition at line 123 of file point_cluster_grasp_planner.py.
Definition at line 117 of file point_cluster_grasp_planner.py.
Definition at line 147 of file point_cluster_grasp_planner.py.
Definition at line 144 of file point_cluster_grasp_planner.py.
Definition at line 95 of file point_cluster_grasp_planner.py.
Definition at line 120 of file point_cluster_grasp_planner.py.
Definition at line 156 of file point_cluster_grasp_planner.py.
Definition at line 138 of file point_cluster_grasp_planner.py.
Definition at line 150 of file point_cluster_grasp_planner.py.
Definition at line 141 of file point_cluster_grasp_planner.py.
Definition at line 106 of file point_cluster_grasp_planner.py.
Definition at line 81 of file point_cluster_grasp_planner.py.
Definition at line 75 of file point_cluster_grasp_planner.py.