concepts.dm.crowhat.manipulation_utils.contact_point_sampler.gen_contact_point_with_normal_constraint#
- gen_contact_point_with_normal_constraint(planning_world, object_id, normal_constraint, normal_tol=0.1, nr_trials=10000, batch_size=100, max_returns=1000)[source]#
Sample contact points on the object with the given normal constraint.
- Parameters:
planning_world (PlanningWorldInterface) – the PlanningWorldInterface instance.
object_id (int) – the ID of the object to sample the contact points.
normal_constraint (Tuple[float, float, float] | List[float] | ndarray | None) – the normal constraint.
normal_tol (float) – the tolerance of the dot product between the normal and the constraint. If the dot product is bigger than this value (meaning that they are not perpendicular), the point will be discarded.
nr_trials (int) – the number of trials to sample the contact points.
batch_size (int) – the number of points to sample in each trial.
max_returns (int) – the maximum number of contact points to return.
- Return type: