pycram.robot_plans.actions.core.robot_body#

Attributes#

Classes#

MoveTorsoAction

Move the torso of the robot up and down.

SetGripperAction

Set the gripper state of the robot.

ParkArmsAction

Park the arms of the robot.

CarryAction

Parks the robot's arms. And align the arm with the given Axis of a frame.

Module Contents#

class pycram.robot_plans.actions.core.robot_body.MoveTorsoAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Move the torso of the robot up and down.

torso_state: pycram.robot_descriptions.pr2_states.TorsoState#

The state of the torso that should be set

plan() None#

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

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.

classmethod description(torso_state: typing_extensions.Union[typing_extensions.Iterable[pycram.robot_descriptions.pr2_states.TorsoState], pycram.robot_descriptions.pr2_states.TorsoState]) pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[MoveTorsoAction]]#
class pycram.robot_plans.actions.core.robot_body.SetGripperAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Set the gripper state of the robot.

gripper: pycram.robot_descriptions.pr2_states.Arms#

The gripper that should be set

motion: pycram.robot_descriptions.pr2_states.GripperStateEnum#

The motion that should be set on the gripper

plan() None#

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

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.

classmethod description(gripper: typing_extensions.Union[typing_extensions.Iterable[pycram.robot_descriptions.pr2_states.Arms], pycram.robot_descriptions.pr2_states.Arms], motion: typing_extensions.Union[typing_extensions.Iterable[pycram.robot_descriptions.pr2_states.GripperState], pycram.robot_descriptions.pr2_states.GripperState] = None) pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[SetGripperAction]]#
class pycram.robot_plans.actions.core.robot_body.ParkArmsAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Park the arms of the robot.

arm: pycram.robot_descriptions.pr2_states.Arms#

Entry from the enum for which arm should be parked.

plan() None#

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

get_joint_poses() Tuple[List[str], List[float]]#
Returns:

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

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.

classmethod description(arm: typing_extensions.Union[typing_extensions.Iterable[pycram.robot_descriptions.pr2_states.Arms], pycram.robot_descriptions.pr2_states.Arms]) pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[ParkArmsAction]]#
class pycram.robot_plans.actions.core.robot_body.CarryAction#

Bases: pycram.robot_plans.actions.base.ActionDescription

Parks the robot’s arms. And align the arm with the given Axis of a frame.

arm: pycram.robot_descriptions.pr2_states.Arms#

Entry from the enum for which arm should be parked.

align: typing_extensions.Optional[bool] = False#

If True, aligns the end-effector with a specified axis.

Name of the tip link to align with, e.g the object.

tip_axis: typing_extensions.Optional[pycram.datastructures.enums.AxisIdentifier] = None#

Tip axis of the tip link, that should be aligned.

Base link of the robot; typically set to the torso.

root_axis: typing_extensions.Optional[pycram.datastructures.enums.AxisIdentifier] = None#

Goal axis of the root link, that should be used to align with.

plan() None#

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

get_joint_poses() typing_extensions.Dict[str, float]#
Returns:

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

axis_to_vector3_stamped(axis: pycram.datastructures.enums.AxisIdentifier, link: str = 'base_link') pycram.datastructures.pose.Vector3Stamped#
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.

classmethod description(arm: typing_extensions.Union[typing_extensions.Iterable[pycram.robot_descriptions.pr2_states.Arms], pycram.robot_descriptions.pr2_states.Arms], align: typing_extensions.Optional[bool] = False, tip_link: typing_extensions.Optional[str] = None, tip_axis: typing_extensions.Optional[pycram.datastructures.enums.AxisIdentifier] = None, root_link: typing_extensions.Optional[str] = None, root_axis: typing_extensions.Optional[pycram.datastructures.enums.AxisIdentifier] = None) pycram.datastructures.partial_designator.PartialDesignator[typing_extensions.Type[CarryAction]]#
pycram.robot_plans.actions.core.robot_body.MoveTorsoActionDescription#
pycram.robot_plans.actions.core.robot_body.SetGripperActionDescription#
pycram.robot_plans.actions.core.robot_body.ParkArmsActionDescription#
pycram.robot_plans.actions.core.robot_body.CarryActionDescription#