hylo.manip.grasp_quality¶
Package: hylo-manip · Core contracts
grasp_quality ¶
Grasp quality from contacts: point contacts with Coulomb friction, their friction cones as a few edge forces, the wrenches those forces exert on the object, force closure and the largest-ball (epsilon) measure of the wrench hull, and the effort needed to hold the object against gravity.
Conventions: a contact is a point p on the object surface and the unit normal n pointing INTO the object (the direction the finger pushes). Forces are unit normal force plus friction up to mu (friction cone edges f_j = n + mu (cos t_j u + sin t_j v)). Torques are taken about the object's reference point c and divided by a length rho (usually the object's radius), so forces and torques are commensurate: w = [f, (p - c) x f / rho]. The epsilon measure is the distance from the origin to the nearest facet of the convex hull of every contact's edge wrenches: the largest wrench of any direction the grasp resists with unit total normal force (summed over contacts, an L1 bound). It is positive exactly when the grasp is force closure; zero or negative otherwise.
cone_edges ¶
(k, 3) edge forces of the linearised friction cone around normal (unit normal component).
contact_wrenches ¶
contact_wrenches(points: ndarray, normals: ndarray, centre: ndarray, mu: float, k: int = 8, rho: float = 1.0) -> np.ndarray
(m * k, 6) primitive wrenches of m contacts (inward normals).
epsilon ¶
Signed distance from the origin to the boundary of the convex hull of the wrenches W (n, 6): positive inside (force closure; the value is the largest-ball radius), negative outside, 0 when the hull is flat (rank < 6).
grasp_epsilon ¶
grasp_epsilon(points: ndarray, normals: ndarray, centre: ndarray, mu: float = 0.5, k: int = 8, rho: float = 1.0) -> float
holding_effort ¶
holding_effort(points: ndarray, normals: ndarray, centre: ndarray, external: ndarray, mu: float = 0.5, k: int = 8, rho: float = 1.0) -> float
Smallest total normal force (in units of |external force|) whose cone forces balance the external wrench (e.g. gravity [0, 0, -m g, 0, 0, 0] at the centre): sum of edge weights with sum lambda_j w_j = -external. inf when no combination balances it.