grasp_closeness#
Classes#
How close a grasp is to where the robot stands: a grasp nearer by horizontal |
|
The grasps an object offers, ordered by their |
Module Contents#
- class grasp_closeness.GraspCloseness#
How close a grasp is to where the robot stands: a grasp nearer by horizontal distance is closer, and of two equally near grasps the one approached more directly from the standing position is.
- horizontal_distance: float#
The horizontal distance from the standing position to the grasp, in meters.
- approach_angle: float#
The angle between the direction the grasp is approached along and the direction from the standing position to it, in radians.
- classmethod from_grasp(grasp: semantic_digital_twin.grasping.grasp_candidates.GraspCandidate, world_T_object: numpy.typing.NDArray[numpy.float64], world_P_standing: numpy.typing.NDArray[numpy.float64]) GraspCloseness#
- Parameters:
grasp – A grasp on the object.
world_T_object – The object’s root frame in the world frame.
world_P_standing – Where the robot stands, as a homogeneous point in the world frame.
- Returns:
How close grasp is to the standing position.
- class grasp_closeness.GraspsByCloseness#
Bases:
krrood.entity_query_language.predicate.SymbolicFunctionThe grasps an object offers, ordered by their
GraspClosenessto a standing position, the closest first, and at mostnumber_of_graspsof them.- graspable: semantic_digital_twin.semantic_annotations.mixins.HasGraspCandidates#
The object offering the grasps.
- standing_position: krrood_spatial_math.spatial_types.Pose#
Where the robot stands while taking one of the grasps, read when the grasps are ranked, so a pose relative to the robot is where the robot stands then.
- number_of_grasps: int | None = 3#
How many of the closest grasps are kept, all of them if None.
- __call__() list[semantic_digital_twin.grasping.grasp_candidates.GraspCandidate]#
Compute the value for the supplied arguments.
- classmethod _verbalization_fragment_(fields: krrood.entity_query_language.predicate.RenderedFields) krrood.entity_query_language.verbalization.fragments.base.VerbalizationFragment#
- Parameters:
fields – The rendered fragment for each field.
- Returns:
The noun phrase “the grasps by closeness of <graspable> and <standing position>”.