hylo.manip.collision¶
Package: hylo-manip · Core contracts
collision ¶
Collision checking of an arm and its hand: the model's collision geoms (as surface samples) against the table plane and observed points (KD-tree, a margin), and self-collision from MuJoCo contacts.
Obstacles
dataclass
¶
Obstacles(table: float | None = None, clearance: float = 0.01, points: ndarray | None = None, margin: float = 0.01, check_self: bool = True, attached: ndarray | None = None, soft_fingers: bool = False)
What an arm must not touch: the table plane (z, with a clearance) and points (KD-tree, a margin).
Collider ¶
Collision geoms of one arm's model: those of the bodies its joints move (with the hand) are checked against obstacles; self-collision uses MuJoCo contacts between robot geoms, minus pairs already touching at home and pairs within the hand.
hand_sample
instance-attribute
¶
finger_sample
instance-attribute
¶
robot_geoms
instance-attribute
¶
robot_geoms = {g for g in range(m.ngeom) if collidable[g] and m.geom_bodyid[g] in self.robot_bodies}
seen_geom
instance-attribute
¶
points_world ¶
Surface samples in the world at the current model state (after arm.forward()).
seen_world ¶
Surface samples of every robot geom (visual and collision, moving and fixed) in the world at the current
model state (after arm.forward()): what cameras see of the robot.
check ¶
None when q is free, else "self", "table" or "points". attached: points held in the TCP frame (default:
the obstacles' attached).
hand_points_in_tcp ¶
Hand surface samples (about spacing apart) in the TCP frame with the fingers at command cmd.
geom_surface ¶
Points on the surface of geom g in its own frame, about h apart.