concepts.dm.crowhat.manipulation_utils.pick_place_sampler.gen_placement_parameter#

gen_placement_parameter(planning_world, target_id, support_id, *, retain_target_orientation=False, batch_size=100, max_attempts=10000, placement_tol=0.03, support_dir_tol=30, np_random=None, verbose=False)[source]#

Sample a placement of the target object on the support object.

Parameters:
  • planning_world (PlanningWorldInterface) – the planning world.

  • robot – the robot interface.

  • target_id (int) – the id of the target object.

  • support_id (int) – the id of the support object.

  • retain_target_orientation (bool) – if True, the target object will be placed with the same orientation as the current one.

  • batch_size (int) – the number of samples in batch processing.

  • max_attempts (int) – the maximum number of attempts for sampling.

  • placement_tol (float) – the tolerance for the placement. To check collision, we will place the object at a position that is placement_tol away from the support surface and check for collision.

  • support_dir_tol (float) – the tolerance for the support direction. We will sample the placement direction such that the support direction is within support_dir_tol degree from the gravity direction.

  • np_random (RandomState | None) – the random state.

  • verbose (bool) – whether to print the sampling information.

Yields:

the placement parameters.

Return type:

Iterator[PlacementParameter]