concepts.simulator.pybullet.manipulation_utils.contact_samplers.sample_indirect_push_with_support#

sample_indirect_push_with_support(robot, target_id, tool_id, support_object_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:
  • robot (BulletArmRobotBase) – the robot.

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

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

  • support_object_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:

Iterable[IndirectPushParameter]