pycram.robot_plans.actions.composite.tool_based#

Attributes#

Classes#

MixingAction

Mixes contents of an object using a tool in a spiral motion.

PouringAction

Performs a pouring action with a tool over an object, typically used for liquids.

CuttingAction

Performs a cutting action on an object using a specified tool.

Module Contents#

class pycram.robot_plans.actions.composite.tool_based.MixingAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Mixes contents of an object using a tool in a spiral motion.

object_: semantic_digital_twin.world_description.world_entity.Body#

The object to be mixed.

tool: semantic_digital_twin.world_description.world_entity.SemanticAnnotation#

The tool to be used for mixing.

arm: pycram.datastructures.enums.Arms#

The arm to be used for the mixing action.

technique: typing_extensions.Optional[str] = None#

The technique to be used for mixing, e.g. ‘Spiral Mixing’.

plan() None#

Symbolic plan. Should only call motions or sub-actions.

classmethod description(object_: typing_extensions.Union[typing_extensions.Iterable[semantic_digital_twin.world_description.world_entity.Body], semantic_digital_twin.world_description.world_entity.Body], tool: typing_extensions.Union[typing_extensions.Iterable[semantic_digital_twin.world_description.world_entity.SemanticAnnotation], semantic_digital_twin.world_description.world_entity.SemanticAnnotation], arm: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms]] = None, technique: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[str], str]] = None)#
class pycram.robot_plans.actions.composite.tool_based.PouringAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Performs a pouring action with a tool over an object, typically used for liquids.

object_: semantic_digital_twin.world_description.world_entity.Body#

The object over which the pouring action is performed.

tool: semantic_digital_twin.world_description.world_entity.SemanticAnnotation#

The tool used for pouring, e.g., a jug or a bottle.

arm: pycram.datastructures.enums.Arms#

The arm to be used for the pouring action.

technique: typing_extensions.Optional[str] = None#

The technique to be used for pouring, e.g., ‘Pouring’.

angle: typing_extensions.Optional[float] = 90#

The angle at which the tool is tilted during the pouring action, in degrees.

plan() None#

Symbolic plan. Should only call motions or sub-actions.

classmethod description(object_: typing_extensions.Union[typing_extensions.Iterable[semantic_digital_twin.world_description.world_entity.Body], semantic_digital_twin.world_description.world_entity.Body], tool: typing_extensions.Union[typing_extensions.Iterable[semantic_digital_twin.world_description.world_entity.SemanticAnnotation], semantic_digital_twin.world_description.world_entity.SemanticAnnotation], arm: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms]] = None, technique: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[str], str]] = None, angle: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[float], float]] = 90)#
class pycram.robot_plans.actions.composite.tool_based.CuttingAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Performs a cutting action on an object using a specified tool.

object_: semantic_digital_twin.world_description.world_entity.Body#

The object to be cut.

tool: semantic_digital_twin.world_description.world_entity.SemanticAnnotation#

The tool used for cutting, e.g., a knife or a saw.

arm: pycram.datastructures.enums.Arms#

The arm to be used for the cutting action.

technique: typing_extensions.Optional[str] = None#

The technique to be used for cutting, e.g., ‘Slicing’, ‘Halving’, etc.

slice_thickness: typing_extensions.Optional[float] = 0.03#

The thickness of each slice to be cut from the object, in meters.

plan() None#

Symbolic plan. Should only call motions or sub-actions.

classmethod description(object_: typing_extensions.Union[typing_extensions.Iterable[semantic_digital_twin.world_description.world_entity.Body], semantic_digital_twin.world_description.world_entity.Body], tool: typing_extensions.Union[typing_extensions.Iterable[semantic_digital_twin.world_description.world_entity.SemanticAnnotation], semantic_digital_twin.world_description.world_entity.SemanticAnnotation], arm: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms]] = None, technique: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[str], str]] = None, slice_thickness: typing_extensions.Optional[float] = 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).

pycram.robot_plans.actions.composite.tool_based.CuttingActionDescription#
pycram.robot_plans.actions.composite.tool_based.PouringActionDescription#
pycram.robot_plans.actions.composite.tool_based.MixingActionDescription#