pycram.designators.actions.actions

Module Contents

Classes

ActionAbstract

Base class for performable actions.

MoveTorsoActionPerformable

Move the torso of the robot up and down.

SetGripperActionPerformable

Set the gripper state of the robot.

ReleaseActionPerformable

Releases an Object from the robot.

GripActionPerformable

Grip an object with the robot.

ParkArmsActionPerformable

Park the arms of the robot.

PickUpActionPerformable

Let the robot pick up an object.

PlaceActionPerformable

Places an Object at a position using an arm.

NavigateActionPerformable

Navigates the Robot to a position.

TransportActionPerformable

Transports an object to a position using an arm

LookAtActionPerformable

Lets the robot look at a position.

DetectActionPerformable

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

OpenActionPerformable

Opens a container like object

CloseActionPerformable

Closes a container like object.

GraspingActionPerformable

Grasps an object described by the given Object Designator description

FaceAtPerformable

Turn the robot chassis such that is faces the pose and after that perform a look at action.

MoveAndPickUpPerformable

Navigate to standing_position, then turn towards the object and pick it up.

class pycram.designators.actions.actions.ActionAbstract

Bases: pycram.designator.ActionDesignatorDescription.Action, abc.ABC

Base class for performable actions.

orm_class: typing_extensions.Type[pycram.orm.action_designator.Action]

The ORM class that is used to insert this action into the database. Must be overwritten by every action in order to be able to insert the action into the database.

abstract perform() None

Perform the action.

Will be overwritten by each action.

to_sql() pycram.orm.action_designator.Action

Convert this action to its ORM equivalent.

Needs to be overwritten by an action if it didn’t overwrite the orm_class attribute with its ORM equivalent.

Returns:

An instance of the ORM equivalent of the action with the parameters set

insert(session: pycram.designators.motion_designator.Session, **kwargs) pycram.orm.action_designator.Action

Insert this action into the database.

Needs to be overwritten by an action if the action has attributes that do not exist in the orm class equivalent. In that case, the attributes need to be inserted into the session manually.

Parameters:
  • session – Session with a database that is used to add and commit the objects

  • kwargs – Possible extra keyword arguments

Returns:

The completely instanced ORM action that was inserted into the database

class pycram.designators.actions.actions.MoveTorsoActionPerformable

Bases: ActionAbstract

Move the torso of the robot up and down.

position: float

Target position of the torso joint

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.SetGripperActionPerformable

Bases: ActionAbstract

Set the gripper state of the robot.

gripper: str

The gripper that should be set

motion: str

The motion that should be set on the gripper

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.ReleaseActionPerformable

Bases: ActionAbstract

Releases an Object from the robot.

Note: This action can not ve used yet.

gripper: str
object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object
abstract perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.GripActionPerformable

Bases: ActionAbstract

Grip an object with the robot.

Note: This action can not be used yet.

gripper: str
object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object
effort: float
abstract perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.ParkArmsActionPerformable

Bases: ActionAbstract

Park the arms of the robot.

arm: pycram.datastructures.enums.Arms

Entry from the enum for which arm should be parked

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.PickUpActionPerformable

Bases: ActionAbstract

Let the robot pick up an object.

object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object

Object designator describing the object that should be picked up

arm: str

The arm that should be used for pick up

grasp: str

The grasp that should be used. For example, ‘left’ or ‘right’

object_at_execution: pycram.designators.motion_designator.Optional[pycram.designators.motion_designator.ObjectDesignatorDescription.Object]

The object at the time this Action got created. It is used to be a static, information holding entity. It is not updated when the BulletWorld object is changed.

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.PlaceActionPerformable

Bases: ActionAbstract

Places an Object at a position using an arm.

object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object

Object designator describing the object that should be place

arm: str

Arm that is currently holding the object

target_location: pycram.datastructures.pose.Pose

Pose in the world at which the object should be placed

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.NavigateActionPerformable

Bases: ActionAbstract

Navigates the Robot to a position.

target_location: pycram.datastructures.pose.Pose

Location to which the robot should be navigated

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.TransportActionPerformable

Bases: ActionAbstract

Transports an object to a position using an arm

object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object

Object designator describing the object that should be transported.

arm: str

Arm that should be used

target_location: pycram.datastructures.pose.Pose

Target Location to which the object should be transported

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.LookAtActionPerformable

Bases: ActionAbstract

Lets the robot look at a position.

target: pycram.datastructures.pose.Pose

Position at which the robot should look, given as 6D pose

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.DetectActionPerformable

Bases: ActionAbstract

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

object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object

Object designator loosely describing the object, e.g. only type.

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.OpenActionPerformable

Bases: ActionAbstract

Opens a container like object

object_designator: pycram.designators.motion_designator.ObjectPart.Object

Object designator describing the object that should be opened

arm: str

Arm that should be used for opening the container

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.CloseActionPerformable

Bases: ActionAbstract

Closes a container like object.

object_designator: pycram.designators.motion_designator.ObjectPart.Object

Object designator describing the object that should be closed

arm: str

Arm that should be used for closing

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.GraspingActionPerformable

Bases: ActionAbstract

Grasps an object described by the given Object Designator description

arm: str

The arm that should be used to grasp

object_desig: typing_extensions.Union[pycram.designators.motion_designator.ObjectDesignatorDescription.Object, pycram.designators.motion_designator.ObjectPart.Object]

Object Designator for the object that should be grasped

orm_class: typing_extensions.Type[ActionAbstract]
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.FaceAtPerformable

Bases: ActionAbstract

Turn the robot chassis such that is faces the pose and after that perform a look at action.

pose: pycram.datastructures.pose.Pose

The pose to face

orm_class
perform() None

Perform the action.

Will be overwritten by each action.

class pycram.designators.actions.actions.MoveAndPickUpPerformable

Bases: ActionAbstract

Navigate to standing_position, then turn towards the object and pick it up.

standing_position: pycram.datastructures.pose.Pose

The pose to stand before trying to pick up the object

object_designator: pycram.designators.motion_designator.ObjectDesignatorDescription.Object

The object to pick up

arm: pycram.datastructures.enums.Arms

The arm to use

grasp: pycram.datastructures.enums.Grasp

The grasp to use

perform()

Perform the action.

Will be overwritten by each action.