pycram.designators.action_designator

Module Contents

Classes

MoveTorsoAction

Action Designator for Moving the torso of the robot up and down

SetGripperAction

Set the gripper state of the robot

ReleaseAction

Releases an Object from the robot.

GripAction

Grip an object with the robot.

ParkArmsAction

Park the arms of the robot.

PickUpAction

Designator to let the robot pick up an object.

PlaceAction

Places an Object at a position using an arm.

NavigateAction

Navigates the Robot to a position.

TransportAction

Transports an object to a position using an arm

LookAtAction

Lets the robot look at a position.

DetectAction

Detects an object that fits the object description and returns an object designator describing the object.

OpenAction

Opens a container like object

CloseAction

Closes a container like object.

GraspingAction

Grasps an object described by the given Object Designator description

class pycram.designators.action_designator.MoveTorsoAction(positions: typing_extensions.List[float], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Action Designator for Moving the torso of the robot up and down

Create a designator description to move the torso of the robot up and down.

Parameters:
  • positions – List of possible positions of the robots torso, possible position is a float of height in metres

  • resolver – An optional resolver that returns a performable designator for a designator description.

ground() pycram.designators.actions.actions.MoveTorsoActionPerformable

Creates a performable action designator with the first element from the list of possible torso heights.

Returns:

A performable action designator

__iter__()

Iterates over all possible values for this designator and returns a performable action designator with the value.

Returns:

A performable action designator

class pycram.designators.action_designator.SetGripperAction(grippers: typing_extensions.List[str], motions: typing_extensions.List[str], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Set the gripper state of the robot

Sets the gripper state, the desired state is given with the motion. Motion can either be ‘open’ or ‘close’.

Parameters:
  • grippers – A list of possible grippers

  • motions – A list of possible motions

  • resolver – An alternative resolver that returns a performable designator for a designator description

ground() pycram.designators.actions.actions.SetGripperActionPerformable

Default resolver that returns a performable designator with the first element in the grippers and motions list.

Returns:

A performable designator

__iter__()

Iterates over all possible combinations of grippers and motions

Returns:

A performable designator with a combination of gripper and motion

class pycram.designators.action_designator.ReleaseAction(grippers: typing_extensions.List[str], object_designator_description: pycram.designators.object_designator.ObjectDesignatorDescription, resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Releases an Object from the robot.

Note: This action can not be used yet.

Create a Designator description.

Parameters:

resolver – The grounding method used for the description. The grounding method creates a location instance that matches the description.

ground() pycram.designators.actions.actions.ReleaseActionPerformable

Fill all missing parameters and chose plan to execute.

class pycram.designators.action_designator.GripAction(grippers: typing_extensions.List[str], object_designator_description: pycram.designators.object_designator.ObjectDesignatorDescription, efforts: typing_extensions.List[float], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Grip an object with the robot.

Variables:
  • grippers – The grippers to consider

  • object_designator_description – The description of objects to consider

  • efforts – The efforts to consider

Note: This action can not be used yet.

Create a Designator description.

Parameters:

resolver – The grounding method used for the description. The grounding method creates a location instance that matches the description.

ground() pycram.designators.actions.actions.GripActionPerformable

Fill all missing parameters and chose plan to execute.

class pycram.designators.action_designator.ParkArmsAction(arms: typing_extensions.List[pycram.datastructures.enums.Arms], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Park the arms of the robot.

Moves the arms in the pre-defined parking position. Arms are taken from pycram.enum.Arms

Parameters:
  • arms – A list of possible arms, that could be used

  • resolver – An optional resolver that returns a performable designator from the designator description

ground() pycram.designators.actions.actions.ParkArmsActionPerformable

Default resolver that returns a performable designator with the first element of the list of possible arms

Returns:

A performable designator

class pycram.designators.action_designator.PickUpAction(object_designator_description: typing_extensions.Union[pycram.designators.object_designator.ObjectDesignatorDescription, pycram.designators.object_designator.ObjectDesignatorDescription.Object], arms: typing_extensions.List[str], grasps: typing_extensions.List[str], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Designator to let the robot pick up an object.

Lets the robot pick up an object. The description needs an object designator describing the object that should be picked up, an arm that should be used as well as the grasp from which side the object should be picked up.

Parameters:
  • object_designator_description – List of possible object designator

  • arms – List of possible arms that could be used

  • grasps – List of possible grasps for the object

  • resolver – An optional resolver that returns a performable designator with elements from the lists of possible paramter

ground() pycram.designators.actions.actions.PickUpActionPerformable

Default resolver, returns a performable designator with the first entries from the lists of possible parameter.

Returns:

A performable designator

class pycram.designators.action_designator.PlaceAction(object_designator_description: typing_extensions.Union[pycram.designators.object_designator.ObjectDesignatorDescription, pycram.designators.object_designator.ObjectDesignatorDescription.Object], target_locations: typing_extensions.List[pycram.datastructures.pose.Pose], arms: typing_extensions.List[str], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Places an Object at a position using an arm.

Create an Action Description to place an object

Parameters:
  • object_designator_description – Description of object to place.

  • target_locations – List of possible positions/orientations to place the object

  • arms – List of possible arms to use

  • resolver – Grounding method to resolve this designator

ground() pycram.designators.actions.actions.PlaceActionPerformable

Default resolver that returns a performable designator with the first entries from the list of possible entries.

Returns:

A performable designator

class pycram.designators.action_designator.NavigateAction(target_locations: typing_extensions.List[pycram.datastructures.pose.Pose], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Navigates the Robot to a position.

Navigates the robot to a location.

Parameters:
  • target_locations – A list of possible target locations for the navigation.

  • resolver – An alternative resolver that creates a performable designator from the list of possible parameter

ground() pycram.designators.actions.actions.NavigateActionPerformable

Default resolver that returns a performable designator with the first entry of possible target locations.

Returns:

A performable designator

class pycram.designators.action_designator.TransportAction(object_designator_description: typing_extensions.Union[pycram.designators.object_designator.ObjectDesignatorDescription, pycram.designators.object_designator.ObjectDesignatorDescription.Object], arms: typing_extensions.List[str], target_locations: typing_extensions.List[pycram.datastructures.pose.Pose], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Transports an object to a position using an arm

Designator representing a pick and place plan.

Parameters:
  • object_designator_description – Object designator description or a specified Object designator that should be transported

  • arms – A List of possible arms that could be used for transporting

  • target_locations – A list of possible target locations for the object to be placed

  • resolver – An alternative resolver that returns a performable designator for the list of possible parameter

ground() pycram.designators.actions.actions.TransportActionPerformable

Default resolver that returns a performable designator with the first entries from the lists of possible parameter.

Returns:

A performable designator

class pycram.designators.action_designator.LookAtAction(targets: typing_extensions.List[pycram.datastructures.pose.Pose], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Lets the robot look at a position.

Moves the head of the robot such that it points towards the given target location.

Parameters:
  • targets – A list of possible locations to look at

  • resolver – An alternative resolver that returns a performable designator for a list of possible target locations

ground() pycram.designators.actions.actions.LookAtActionPerformable

Default resolver that returns a performable designator with the first entry in the list of possible targets

Returns:

A performable designator

class pycram.designators.action_designator.DetectAction(object_designator_description: pycram.designators.object_designator.ObjectDesignatorDescription, resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Detects an object that fits the object description and returns an object designator describing the object.

Tries to detect an object in the field of view (FOV) of the robot.

Parameters:
  • object_designator_description – Object designator describing the object

  • resolver – An alternative resolver

ground() pycram.designators.actions.actions.DetectActionPerformable

Default resolver that returns a performable designator with the resolved object description.

Returns:

A performable designator

class pycram.designators.action_designator.OpenAction(object_designator_description: pycram.designators.object_designator.ObjectPart, arms: typing_extensions.List[str], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Opens a container like object

Can currently not be used

Moves the arm of the robot to open a container.

Parameters:
  • object_designator_description – Object designator describing the handle that should be used to open

  • arms – A list of possible arms that should be used

  • resolver – A alternative resolver that returns a performable designator for the lists of possible parameter.

ground() pycram.designators.actions.actions.OpenActionPerformable

Default resolver that returns a performable designator with the resolved object description and the first entries from the lists of possible parameter.

Returns:

A performable designator

class pycram.designators.action_designator.CloseAction(object_designator_description: pycram.designators.object_designator.ObjectPart, arms: typing_extensions.List[str], resolver=None)

Bases: pycram.designator.ActionDesignatorDescription

Closes a container like object.

Can currently not be used

Attempts to close an open container

Parameters:
  • object_designator_description – Object designator description of the handle that should be used

  • arms – A list of possible arms to use

  • resolver – An alternative resolver that returns a performable designator for the list of possible parameter

ground() pycram.designators.actions.actions.CloseActionPerformable

Default resolver that returns a performable designator with the resolved object designator and the first entry from the list of possible arms.

Returns:

A performable designator

class pycram.designators.action_designator.GraspingAction(arms: typing_extensions.List[str], object_description: typing_extensions.Union[pycram.designators.object_designator.ObjectDesignatorDescription, pycram.designators.object_designator.ObjectPart], resolver: typing_extensions.Callable = None)

Bases: pycram.designator.ActionDesignatorDescription

Grasps an object described by the given Object Designator description

Will try to grasp the object described by the given description. Grasping is done by moving into a pre grasp position 10 cm before the object, opening the gripper, moving to the object and then closing the gripper.

Parameters:
  • arms – List of Arms that should be used for grasping

  • object_description – Description of the object that should be grasped

  • resolver – An alternative resolver to get a specified designator from the designator description

ground() pycram.designators.actions.actions.GraspingActionPerformable

Default resolver that takes the first element from the list of arms and the first solution for the object designator description ond returns it.

Returns:

A performable action designator that contains specific arguments