concepts.simulator.pybullet.manipulation_utils.grasping_samplers.GraspSampler#

class GraspSampler[source]#

Bases: object

Generate grasps for the input mesh.

Methods

sample_grasp(input_shape)

Sample a grasp from the input point cloud, or mesh

__init__(robot, gripper_size, gripper_gap, reachability_min_bound=None, reachability_max_bound=None)[source]#

Initialize the grasp generator.

Parameters:
  • robot (BulletArmRobotBase) – the robot instance.

  • gripper_size (float) – the size of the gripper (assumed to be a square contact surface).

  • gripper_gap (float) – the gap between the gripper fingers.

  • reachability_min_bound (ndarray | None) – the minimum bound of the reachable workspace. If specified, will be used to filter out grasps that are not reachable.

  • reachability_max_bound (ndarray | None) – the maximum bound of the reachable workspace. If specified, will be used to filter out grasps that are not reachable.

__new__(**kwargs)#
sample_grasp(input_shape)[source]#

Sample a grasp from the input point cloud, or mesh

Parameters:
  • input_pc – the input point cloud.

  • input_shape (ndarray | open3d.geometry.PointCloud | open3d.geometry.TriangleMesh)

Returns:

The sampled grasp.

Return type:

GraspReturn