concepts.dm.crowhat.manipulation_utils.plannar_push_sampler.gen_planar_indirect_push_parameter#

gen_planar_indirect_push_parameter(planning_world, target_id, tool_id, support_id, *, prepush_distance=0.05, max_attempts=10000, batch_size=100, filter_push_dir=None, push_distance_distribution=(0.1, 0.15), push_distance_sample=False, contact_normal_tol=0.01, np_random=None, verbose=False)[source]#

Sample a push of the target object using the tool object. The target object should be placed on the support object.

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

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

  • tool_id (int) – the PyBullet body id of the tool object.

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

  • prepush_distance (float) – the distance to pre-push the tool object before the actual push.

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

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

  • filter_push_dir (ndarray | None) – if specified, the push direction will be filtered to be within 0.2 cosine distance from this direction.

  • push_distance_distribution (Sequence[float]) – the distribution of the push distance. If push_distance_sample is True, this will be used to sample the push distance.

  • push_distance_sample (bool) – whether to sample the push distance from the distribution. If False, the function will enumerate the push distances in the distribution.

  • contact_normal_tol (float) – the tolerance for the contact normal. We will sample the push direction such that the contact normal is within contact_normal_tol degree from the gravity direction.

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

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

Return type:

Iterator[PlanarIndirectPushParameter]