predicates#

Classes#

GripperOccupancy

Base class for predicates that check the gripper occupancy.

GripperIsFree

Checks if the gripper is holding something. Checks this by looking at the kinematic structure of the end_effector.

GripperIsNotFree

Checks if the gripper is free at the moment, so it can be used to grab something. This is checked by looking at the

Module Contents#

class predicates.GripperOccupancy#

Base class for predicates that check the gripper occupancy.

end_effector: semantic_digital_twin.robots.robot_parts.EndEffector#

Semantic annotation for the gripper that should be evaluated.

check_man_occupancy(condition: Callable[List[semantic_digital_twin.world_description.world_entity.Body], bool]) bool#

Checks the occupancy of the gripper against a condition. The condition get the list of bodies that are under the TCP in the kinematic structure and returns a boolean.

Parameters:

condition – The condition that should be evaluated.

Returns:

True if the condition is satisfied, False otherwise.

class predicates.GripperIsFree#

Bases: GripperOccupancy, krrood.entity_query_language.predicate.Predicate

Checks if the gripper is holding something. Checks this by looking at the kinematic structure of the end_effector.

__call__() bool#

Evaluate the predicate for the supplied values.

class predicates.GripperIsNotFree#

Bases: GripperOccupancy, krrood.entity_query_language.predicate.Predicate

Checks if the gripper is free at the moment, so it can be used to grab something. This is checked by looking at the kinematic structure.

__call__() bool#

Evaluate the predicate for the supplied values.