pycram.designators.GAP#

Attributes#

Classes#

GAP

The performable designator_description with a single element for each list of possible parameter.

MixingAction

The performable designator_description with a single element for each list of possible parameter.

CuttingAction

The performable designator_description with a single element for each list of possible parameter.

PouringAction

The performable designator_description with a single element for each list of possible parameter.

Module Contents#

class pycram.designators.GAP.GAP#

Bases: pycram.designator.ActionDescription

The performable designator_description with a single element for each list of possible parameter.

object_: pycram.world_concepts.world_object.Object#
tool: pycram.world_concepts.world_object.Object#
arm: pycram.datastructures.enums.Arms#
technique: str | None = None#
validate(result: typing_extensions.Any | None = None, max_wait_time: datetime.timedelta | None = None)#

Validate the action after performing it, by checking if the action effects are as expected.

Parameters:
  • result – The result of the action if there is any

  • max_wait_time – The maximum time to wait for the action to be validated, before raising an error.

abstract plan() None#

Plan of the action. To be overridden by subclasses.

Returns:

The result of the action, if there is any

class pycram.designators.GAP.MixingAction#

Bases: GAP

The performable designator_description with a single element for each list of possible parameter.

plan() None#

Plan of the action. To be overridden by subclasses.

Returns:

The result of the action, if there is any

classmethod description(object_: Iterable[pycram.world_concepts.world_object.Object] | pycram.world_concepts.world_object.Object, tool: Iterable[pycram.world_concepts.world_object.Object] | pycram.world_concepts.world_object.Object, arm: Iterable[pycram.datastructures.enums.Arms] | pycram.datastructures.enums.Arms | None = None, technique: Iterable[str] | str | None = None)#
class pycram.designators.GAP.CuttingAction#

Bases: GAP

The performable designator_description with a single element for each list of possible parameter.

slice_thickness: float | None = 0.03#
plan() None#

Plan of the action. To be overridden by subclasses.

Returns:

The result of the action, if there is any

classmethod description(object_: Iterable[pycram.world_concepts.world_object.Object] | pycram.world_concepts.world_object.Object, tool: Iterable[pycram.world_concepts.world_object.Object] | pycram.world_concepts.world_object.Object, arm: Iterable[pycram.datastructures.enums.Arms] | pycram.datastructures.enums.Arms | None = None, technique: Iterable[str] | str | None = None, slice_thickness: float | None = 0.03)#
calculate_slices(obj_length)#
static perpendicular_pose(slice_pose, angle) pycram.datastructures.pose.PoseStamped#
static get_rotation_offset_from_axis_preference(pose_a, pose_b: pycram.datastructures.pose.PoseStamped) Tuple[int, float]#

Compute a discrete rotation offset (-90 or 90 degrees) to align this pose’s local axes with the direction toward a target pose, based on which axis (X or Y) is more aligned.

Parameters:
  • pose_a – The source pose.

  • pose_b – The target pose to align with.

Returns:

Tuple of (rotation offset in degrees, signed angle difference in radians for Y axis).

class pycram.designators.GAP.PouringAction#

Bases: GAP

The performable designator_description with a single element for each list of possible parameter.

angle: float | None = 90#
plan() None#

Plan of the action. To be overridden by subclasses.

Returns:

The result of the action, if there is any

classmethod description(object_: Iterable[pycram.world_concepts.world_object.Object] | pycram.world_concepts.world_object.Object, tool: Iterable[pycram.world_concepts.world_object.Object] | pycram.world_concepts.world_object.Object, arm: Iterable[pycram.datastructures.enums.Arms] | pycram.datastructures.enums.Arms | None = None, technique: Iterable[str] | str | None = None, angle: Iterable[float] | float | None = 90)#
pycram.designators.GAP.PouringActionDescription#
pycram.designators.GAP.MixingActionDescription#
pycram.designators.GAP.CuttingActionDescription#