pycram.designators.action_designator
====================================

.. py:module:: pycram.designators.action_designator


Attributes
----------

.. autoapisummary::

   pycram.designators.action_designator.SPECIAL_KNOWLEDGE
   pycram.designators.action_designator.MoveTorsoActionDescription
   pycram.designators.action_designator.SetGripperActionDescription
   pycram.designators.action_designator.ParkArmsActionDescription
   pycram.designators.action_designator.ReachToPickUpActionDescription
   pycram.designators.action_designator.PickUpActionDescription
   pycram.designators.action_designator.PlaceActionDescription
   pycram.designators.action_designator.NavigateActionDescription
   pycram.designators.action_designator.TransportActionDescription
   pycram.designators.action_designator.LookAtActionDescription
   pycram.designators.action_designator.DetectActionDescription
   pycram.designators.action_designator.OpenActionDescription
   pycram.designators.action_designator.CloseActionDescription
   pycram.designators.action_designator.GraspingActionDescription
   pycram.designators.action_designator.FaceAtActionDescription
   pycram.designators.action_designator.MoveAndPickUpActionDescription
   pycram.designators.action_designator.MoveAndPlaceActionDescription
   pycram.designators.action_designator.ReleaseActionDescription
   pycram.designators.action_designator.GripActionDescription
   pycram.designators.action_designator.SearchActionDescription


Classes
-------

.. autoapisummary::

   pycram.designators.action_designator.MoveTorsoAction
   pycram.designators.action_designator.SetGripperAction
   pycram.designators.action_designator.ReleaseAction
   pycram.designators.action_designator.GripAction
   pycram.designators.action_designator.ParkArmsAction
   pycram.designators.action_designator.ReachToPickUpAction
   pycram.designators.action_designator.PickUpAction
   pycram.designators.action_designator.PlaceAction
   pycram.designators.action_designator.NavigateAction
   pycram.designators.action_designator.TransportAction
   pycram.designators.action_designator.LookAtAction
   pycram.designators.action_designator.DetectAction
   pycram.designators.action_designator.OpenAction
   pycram.designators.action_designator.CloseAction
   pycram.designators.action_designator.GraspingAction
   pycram.designators.action_designator.FaceAtAction
   pycram.designators.action_designator.MoveAndPickUpAction
   pycram.designators.action_designator.MoveAndPlaceAction
   pycram.designators.action_designator.SearchAction


Functions
---------

.. autoapisummary::

   pycram.designators.action_designator.record_object_pre_perform
   pycram.designators.action_designator.validate_close_open
   pycram.designators.action_designator.check_opened
   pycram.designators.action_designator.check_closed


Module Contents
---------------

.. py:function:: record_object_pre_perform(action)

   Record the object before the action is performed.

   This should be appended to the pre performs of every action that interacts with an object.


.. py:class:: MoveTorsoAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Move the torso of the robot up and down.


   .. py:attribute:: torso_state
      :type:  pycram.datastructures.enums.TorsoState

      The state of the torso that should be set



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: datetime.timedelta = timedelta(seconds=2))

      Create a goal validator for the joint positions and wait until the goal is achieved or the timeout is reached.



   .. py:method:: description(torso_state: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.TorsoState], pycram.datastructures.enums.TorsoState]) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[MoveTorsoAction]]
      :classmethod:



.. py:class:: SetGripperAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Set the gripper state of the robot.


   .. py:attribute:: gripper
      :type:  pycram.datastructures.enums.Arms

      The gripper that should be set 



   .. py:attribute:: motion
      :type:  pycram.datastructures.enums.GripperState

      The motion that should be set on the gripper



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: datetime.timedelta = timedelta(seconds=2))

      Needs gripper state to be read or perceived.



   .. py:method:: description(gripper: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms], motion: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.GripperState], pycram.datastructures.enums.GripperState] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[SetGripperAction]]
      :classmethod:



.. py:class:: ReleaseAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Releases an Object from the robot.

   Note: This action can not ve used yet.


   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      The object that should be released



   .. py:attribute:: object_at_execution
      :type:  typing_extensions.Optional[pycram.datastructures.dataclasses.FrozenObject]
      :value: None


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



   .. py:attribute:: gripper
      :type:  pycram.datastructures.enums.Arms

      The gripper that should be used to release the object



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None
      :abstractmethod:


      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: description(object_designator: pycram.designator.ObjectDesignatorDescription, gripper: typing_extensions.Optional[typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms]] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[ReleaseAction]]
      :classmethod:



.. py:class:: GripAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Grip an object with the robot.

   Note: This action can not be used yet.


   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      The object that should be gripped



   .. py:attribute:: object_at_execution
      :type:  typing_extensions.Optional[pycram.datastructures.dataclasses.FrozenObject]
      :value: None


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



   .. py:attribute:: gripper
      :type:  pycram.datastructures.enums.Arms

      The gripper that should be used to grip the object



   .. py:attribute:: effort
      :type:  float
      :value: None


      The effort that should be used to grip the object



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None
      :abstractmethod:


      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: description(object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], gripper: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, effort: typing_extensions.Union[typing_extensions.Iterable[float], float] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[GripAction]]
      :classmethod:



.. py:class:: ParkArmsAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Park the arms of the robot.


   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      Entry from the enum for which arm should be parked



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: get_joint_poses() -> typing_extensions.Dict[str, float]

      :return: The joint positions that should be set for the arm to be in the park position.



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: datetime.timedelta = timedelta(seconds=2))

      Create a goal validator for the joint positions and wait until the goal is achieved or the timeout is reached.



   .. py:method:: description(arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms]) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[ParkArmsAction]]
      :classmethod:



.. py:data:: SPECIAL_KNOWLEDGE

.. py:class:: ReachToPickUpAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Let the robot reach a specific pose.


   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      Object designator_description describing the object that should be picked up



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      The arm that should be used for pick up



   .. py:attribute:: grasp_description
      :type:  pycram.datastructures.grasp.GraspDescription

      The grasp description that should be used for picking up the object



   .. py:attribute:: object_at_execution
      :type:  typing_extensions.Optional[pycram.datastructures.dataclasses.FrozenObject]
      :value: None


      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 world object is changed.



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: move_gripper_to_pose(pose: pycram.datastructures.pose.PoseStamped, movement_type: pycram.datastructures.enums.MovementType = MovementType.CARTESIAN, add_vis_axis: bool = True)

      Move the gripper to a specific pose.

      :param pose: The pose to go to.
      :param movement_type: The type of movement that should be performed.
      :param add_vis_axis: If a visual axis should be added to the world.



   .. py:property:: local_transformer
      :type: pycram.local_transformer.LocalTransformer



   .. py:property:: arm_chain
      :type: pycram.robot_description.KinematicChainDescription



   .. py:property:: end_effector
      :type: pycram.robot_description.EndEffectorDescription



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

      Check if object is contained in the gripper such that it can be grasped and picked up.



   .. py:method:: description(object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, grasp: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Grasp], pycram.datastructures.enums.Grasp] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[ReachToPickUpAction]]
      :classmethod:



.. py:class:: PickUpAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Let the robot pick up an object.


   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      Object designator_description describing the object that should be picked up



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      The arm that should be used for pick up



   .. py:attribute:: grasp_description
      :type:  pycram.datastructures.grasp.GraspDescription

      The GraspDescription that should be used for picking up the object



   .. py:attribute:: object_at_execution
      :type:  typing_extensions.Optional[pycram.datastructures.dataclasses.FrozenObject]
      :value: None


      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.



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: lift_object(distance: float = 0.1)


   .. py:method:: gripper_pose() -> pycram.datastructures.pose.PoseStamped

      Get the pose of the gripper.

      :return: The pose of the gripper.



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

      Check if picked up object is in contact with the gripper.



   .. py:property:: arm_chain
      :type: pycram.robot_description.KinematicChainDescription



   .. py:method:: description(object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, grasp_description: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.grasp.GraspDescription], pycram.datastructures.grasp.GraspDescription] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[PickUpAction]]
      :classmethod:



.. py:class:: PlaceAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Places an Object at a position using an arm.


   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      Object designator_description describing the object that should be place



   .. py:attribute:: target_location
      :type:  pycram.datastructures.pose.PoseStamped

      Pose in the world at which the object should be placed



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      Arm that is currently holding the object



   .. py:attribute:: object_at_execution
      :type:  typing_extensions.Optional[pycram.datastructures.dataclasses.FrozenObject]
      :value: None


      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.



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:property:: gripper_link
      :type: pycram.description.Link



   .. py:property:: arm_chain
      :type: pycram.robot_description.KinematicChainDescription



   .. py:property:: end_effector
      :type: pycram.robot_description.EndEffectorDescription



   .. py:property:: local_transformer
      :type: pycram.local_transformer.LocalTransformer



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

      Check if the object is placed at the target location.



   .. py:method:: validate_loss_of_contact()

      Check if the object is still in contact with the robot after placing it.



   .. py:method:: validate_placement_location()

      Check if the object is placed at the target location.



   .. py:method:: description(object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], target_location: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[PlaceAction]]
      :classmethod:



.. py:class:: NavigateAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Navigates the Robot to a position.


   .. py:attribute:: target_location
      :type:  pycram.datastructures.pose.PoseStamped

      Location to which the robot should be navigated



   .. py:attribute:: keep_joint_states
      :type:  bool

      Keep the joint states of the robot the same during the navigation.



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(target_location: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], keep_joint_states: typing_extensions.Union[typing_extensions.Iterable[bool], bool] = ActionConfig.navigate_keep_joint_states) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[NavigateAction]]
      :classmethod:



.. py:class:: TransportAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Transports an object to a position using an arm


   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      Object designator_description describing the object that should be transported.



   .. py:attribute:: target_location
      :type:  pycram.datastructures.pose.PoseStamped

      Target Location to which the object should be transported



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      Arm that should be used



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], target_location: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[TransportAction]]
      :classmethod:



.. py:class:: LookAtAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Lets the robot look at a position.


   .. py:attribute:: target
      :type:  pycram.datastructures.pose.PoseStamped

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



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

      Check if the robot is looking at the target location by spawning a virtual object at the target location and
      creating a ray from the camera and checking if it intersects with the object.



   .. py:method:: description(target: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped]) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[LookAtAction]]
      :classmethod:



.. py:class:: DetectAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


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

   If no object is found, an PerceptionObjectNotFound error is raised.


   .. py:attribute:: technique
      :type:  pycram.datastructures.enums.DetectionTechnique

      The technique that should be used for detection



   .. py:attribute:: state
      :type:  pycram.datastructures.enums.DetectionState
      :value: None


      The state of the detection, e.g Start Stop for continues perception



   .. py:attribute:: object_designator
      :type:  typing_extensions.Optional[pycram.world_concepts.world_object.Object]
      :value: None


      The type of the object that should be detected, only considered if technique is equal to Type



   .. py:attribute:: region
      :type:  pycrap.ontologies.Location
      :value: None


      The region in which the object should be detected



   .. py:attribute:: _pre_perform_callbacks
      :value: []


      List to save the callbacks which should be called before performing the action.



   .. py:method:: __post_init__()


   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(technique: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.DetectionTechnique], pycram.datastructures.enums.DetectionTechnique], state: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.DetectionState], pycram.datastructures.enums.DetectionState] = None, object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object] = None, region: typing_extensions.Union[typing_extensions.Iterable[pycrap.ontologies.Location], pycrap.ontologies.Location] = None) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[DetectAction]]
      :classmethod:



.. py:class:: OpenAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Opens a container like object


   .. py:attribute:: object_designator
      :type:  pycram.description.ObjectDescription.Link

      Object designator_description describing the object that should be opened



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      Arm that should be used for opening the container



   .. py:attribute:: grasping_prepose_distance
      :type:  float

      The distance in meters the gripper should be at in the x-axis away from the handle.



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

      Check if the container is opened, this assumes that the container state can be read accurately from the
      real world.



   .. py:method:: description(object_designator_description: typing_extensions.Union[typing_extensions.Iterable[pycram.description.ObjectDescription.Link], pycram.description.ObjectDescription.Link], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, grasping_prepose_distance: typing_extensions.Union[typing_extensions.Iterable[float], float] = ActionConfig.grasping_prepose_distance) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[OpenAction]]
      :classmethod:



.. py:class:: CloseAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Closes a container like object.


   .. py:attribute:: object_designator
      :type:  pycram.description.ObjectDescription.Link

      Object designator_description describing the object that should be closed



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      Arm that should be used for closing



   .. py:attribute:: grasping_prepose_distance
      :type:  float

      The distance in meters between the gripper and the handle before approaching to grasp.



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

      Check if the container is closed, this assumes that the container state can be read accurately from the
      real world.



   .. py:method:: description(object_designator_description: typing_extensions.Union[typing_extensions.Iterable[pycram.description.ObjectDescription.Link], pycram.description.ObjectDescription.Link], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, grasping_prepose_distance: typing_extensions.Union[typing_extensions.Iterable[float], float] = ActionConfig.grasping_prepose_distance) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[CloseAction]]
      :classmethod:



.. py:function:: validate_close_open(object_designator: pycram.description.ObjectDescription.Link, arm: pycram.datastructures.enums.Arms, action_type: typing_extensions.Union[typing_extensions.Type[OpenAction], typing_extensions.Type[CloseAction]])

   Validates if the container is opened or closed by checking the joint position of the container.

   :param object_designator: The object designator_description describing the object that should be opened or closed.
   :param arm: The arm that should be used for opening or closing the container.
   :param action_type: The type of the action that should be validated.


.. py:function:: check_opened(joint_obj: pycram.description.Joint, obj_part: pycram.description.Link, arm: pycram.datastructures.enums.Arms, upper_limit: float)

.. py:function:: check_closed(joint_obj: pycram.description.Joint, obj_part: pycram.description.Link, arm: pycram.datastructures.enums.Arms, lower_limit: float)

.. py:class:: GraspingAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Grasps an object described by the given Object Designator description


   .. py:attribute:: object_designator
      :type:  typing_extensions.Union[pycram.world_concepts.world_object.Object, pycram.description.ObjectDescription.Link]

      Object Designator for the object that should be grasped



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      The arm that should be used to grasp



   .. py:attribute:: prepose_distance
      :type:  float

      The distance in meters the gripper should be at before grasping the object



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, prepose_distance: typing_extensions.Union[typing_extensions.Iterable[float], float] = ActionConfig.grasping_prepose_distance) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[GraspingAction]]
      :classmethod:



.. py:class:: FaceAtAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


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


   .. py:attribute:: pose
      :type:  pycram.datastructures.pose.PoseStamped

      The pose to face 



   .. py:attribute:: keep_joint_states
      :type:  bool

      Keep the joint states of the robot the same during the navigation.



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(pose: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], keep_joint_states: typing_extensions.Union[typing_extensions.Iterable[bool], bool] = ActionConfig.face_at_keep_joint_states) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[FaceAtAction]]
      :classmethod:



.. py:class:: MoveAndPickUpAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


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


   .. py:attribute:: standing_position
      :type:  pycram.datastructures.pose.PoseStamped

      The pose to stand before trying to pick up the object



   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      The object to pick up



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      The arm to use



   .. py:attribute:: grasp
      :type:  pycram.datastructures.enums.Grasp

      The grasp to use



   .. py:attribute:: keep_joint_states
      :type:  bool

      Keep the joint states of the robot the same during the navigation.



   .. py:method:: plan()

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(standing_position: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, grasp: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Grasp], pycram.datastructures.enums.Grasp] = None, keep_joint_states: typing_extensions.Union[typing_extensions.Iterable[bool], bool] = ActionConfig.navigate_keep_joint_states) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[MoveAndPickUpAction]]
      :classmethod:



.. py:class:: MoveAndPlaceAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


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


   .. py:attribute:: standing_position
      :type:  pycram.datastructures.pose.PoseStamped

      The pose to stand before trying to pick up the object



   .. py:attribute:: object_designator
      :type:  pycram.world_concepts.world_object.Object

      The object to pick up



   .. py:attribute:: target_location
      :type:  pycram.datastructures.pose.PoseStamped

      The location to place the object.



   .. py:attribute:: arm
      :type:  pycram.datastructures.enums.Arms

      The arm to use



   .. py:attribute:: keep_joint_states
      :type:  bool

      Keep the joint states of the robot the same during the navigation.



   .. py:method:: plan()

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(standing_position: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], object_designator: typing_extensions.Union[typing_extensions.Iterable[pycram.world_concepts.world_object.Object], pycram.world_concepts.world_object.Object], target_location: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], arm: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.enums.Arms], pycram.datastructures.enums.Arms] = None, keep_joint_states: typing_extensions.Union[typing_extensions.Iterable[bool], bool] = ActionConfig.navigate_keep_joint_states) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[MoveAndPlaceAction]]
      :classmethod:



.. py:class:: SearchAction

   Bases: :py:obj:`pycram.designator.ActionDescription`


   Searches for a target object around the given location.


   .. py:attribute:: target_location
      :type:  pycram.datastructures.pose.PoseStamped

      Location around which to look for a target object.



   .. py:attribute:: object_type
      :type:  typing_extensions.Type[pycrap.ontologies.PhysicalObject]

      Type of the object which is searched for.



   .. py:method:: plan() -> None

      Plan of the action. To be overridden by subclasses.

      :return: The result of the action, if there is any



   .. py:method:: validate(result: typing_extensions.Optional[typing_extensions.Any] = None, max_wait_time: typing_extensions.Optional[datetime.timedelta] = None)

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

      :param result: The result of the action if there is any
      :param max_wait_time: The maximum time to wait for the action to be validated, before raising an error.



   .. py:method:: description(target_location: typing_extensions.Union[typing_extensions.Iterable[pycram.datastructures.pose.PoseStamped], pycram.datastructures.pose.PoseStamped], object_type: typing_extensions.Union[typing_extensions.Iterable[pycrap.ontologies.PhysicalObject], pycrap.ontologies.PhysicalObject]) -> pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[SearchAction]]
      :classmethod:



.. py:data:: MoveTorsoActionDescription

.. py:data:: SetGripperActionDescription

.. py:data:: ParkArmsActionDescription

.. py:data:: ReachToPickUpActionDescription

.. py:data:: PickUpActionDescription

.. py:data:: PlaceActionDescription

.. py:data:: NavigateActionDescription

.. py:data:: TransportActionDescription

.. py:data:: LookAtActionDescription

.. py:data:: DetectActionDescription

.. py:data:: OpenActionDescription

.. py:data:: CloseActionDescription

.. py:data:: GraspingActionDescription

.. py:data:: FaceAtActionDescription

.. py:data:: MoveAndPickUpActionDescription

.. py:data:: MoveAndPlaceActionDescription

.. py:data:: ReleaseActionDescription

.. py:data:: GripActionDescription

.. py:data:: SearchActionDescription

