concepts.dm.crowhat.manipulation_utils.contact_point_sampler.gen_candidate_pose_b_from_two_contact_points#

gen_candidate_pose_b_from_two_contact_points(planning_world, a, b, contact_point_a, contact_point_b, nr_trials=4, distance=0.01)[source]#

Generate candidate poses of object B by moving object B so that the contact_point_b aligns with the contact_point_a. This function assumes that we are going to align contact_point_b.normal with -contact_point_a.normal. That is, B will exert a force on A “inwards”.

Parameters:
  • planning_world (PlanningWorldInterface) – the PlanningWorldInterface instance.

  • a (int) – the ID of object A.

  • b (int) – the ID of object B.

  • contact_point_a (ContactPointProposal) – the contact point on object A.

  • contact_point_b (ContactPointProposal) – the contact point on object B.

  • nr_trials (int) – the number of trials to sample the contact points.

  • distance (float) – the distance between the contact points.

Returns:

an iterator of the possible poses of object B.

Return type:

Iterator[Tuple[Tuple[float, float, float] | List[float] | ndarray, Tuple[float, float, float, float] | List[float] | ndarray]]