pycram.process_modules.default_process_modules#

Classes#

DefaultNavigation

The process module to move the robot from one position to another.

DefaultMoveHead

Moves the robot's head to look at a specified target point in the world coordinate frame.

DefaultMoveGripper

This process module controls the gripper of the robot. They can either be opened or closed.

DefaultDetecting

This process module tries to detect an object with the given type. To be detected the object has to be in

DefaultMoveTCP

This process moves the tool center point of either the right or the left arm.

DefaultMoveArmJoints

This process modules moves the joints of either the right or the left arm. The joint states can be given as

DefaultMoveJoints

Implementation of process modules. Process modules are the part that communicate with the outer world to execute

DefaultWorldStateDetecting

This process moduledetectes an object even if it is not in the field of view of the robot.

DefaultOpen

Low-level implementation of opening a container in the simulation. Assumes the handle is already grasped.

DefaultClose

Low-level implementation that lets the robot close a grasped container, in simulation

DefaultMoveTCPWaypoints

This process moves the tool center point of either the right or the left arm along a list of waypoints.

DefaultDetectingReal

Implementation of process modules. Process modules are the part that communicate with the outer world to execute

DefaultNavigationReal

Process module for the real robot that sends a cartesian goal to giskard to move the robot base

DefaultMoveHeadReal

Process module for controlling the real robot's head to look at a specified position.

DefaultMoveTCPReal

Moves the tool center point of the real robot while avoiding all collisions

DefaultMoveArmJointsReal

Moves the arm joints of the real robot to the given configuration while avoiding all collisions

DefaultMoveJointsReal

Moves any joint using giskard, avoids all collisions while doint this.

DefaultMoveGripperReal

Opens or closes the gripper of the real robot, gripper uses an action server for this instead of giskard

DefaultOpenReal

Tries to open an already grasped container

DefaultCloseReal

Tries to close an already grasped container

DefaultMoveTCPWaypointsReal

Moves the tool center point of the real robot along a list of waypoints while avoiding all collisions

DefaultManager

Base class for managing process modules, any new process modules have to implement this class to register the

Functions#

_move_arm_tcp(→ None)

Calls the ik solver to calculate the inverse kinematics of the arm and then sets the joint states accordingly.

Module Contents#

class pycram.process_modules.default_process_modules.DefaultNavigation(lock)#

Bases: pycram.process_module.ProcessModule

The process module to move the robot from one position to another.

_execute(desig: pycram.designators.motion_designator.MoveMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveHead(lock)#

Bases: pycram.process_module.ProcessModule

Moves the robot’s head to look at a specified target point in the world coordinate frame. The target can be either a position or an object.

_execute(desig: pycram.designators.motion_designator.LookingMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveGripper(lock)#

Bases: pycram.process_module.ProcessModule

This process module controls the gripper of the robot. They can either be opened or closed. Furthermore, it can only move one gripper at a time.

_execute(desig: pycram.designators.motion_designator.MoveGripperMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultDetecting(lock)#

Bases: pycram.process_module.ProcessModule

This process module tries to detect an object with the given type. To be detected the object has to be in the field of view of the robot. :return: A list of perceived objects.

_execute(designator: pycram.designators.motion_designator.DetectingMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveTCP(lock)#

Bases: pycram.process_module.ProcessModule

This process moves the tool center point of either the right or the left arm.

_execute(desig: pycram.designators.motion_designator.MoveTCPMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveArmJoints(lock)#

Bases: pycram.process_module.ProcessModule

This process modules moves the joints of either the right or the left arm. The joint states can be given as list that should be applied or a pre-defined position can be used, such as “parking”

_execute(desig: pycram.designators.motion_designator.MoveArmJointsMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveJoints(lock)#

Bases: pycram.process_module.ProcessModule

Implementation of process modules. Process modules are the part that communicate with the outer world to execute

designators.

_execute(desig: pycram.designators.motion_designator.MoveJointsMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultWorldStateDetecting(lock)#

Bases: pycram.process_module.ProcessModule

This process moduledetectes an object even if it is not in the field of view of the robot.

_execute(desig: pycram.designators.motion_designator.WorldStateDetectingMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultOpen(lock)#

Bases: pycram.process_module.ProcessModule

Low-level implementation of opening a container in the simulation. Assumes the handle is already grasped.

_execute(desig: pycram.designators.motion_designator.OpeningMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultClose(lock)#

Bases: pycram.process_module.ProcessModule

Low-level implementation that lets the robot close a grasped container, in simulation

_execute(desig: pycram.designators.motion_designator.ClosingMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveTCPWaypoints(lock)#

Bases: pycram.process_module.ProcessModule

This process moves the tool center point of either the right or the left arm along a list of waypoints.

_execute(desig: pycram.designators.motion_designator.MoveTCPWaypointsMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

pycram.process_modules.default_process_modules._move_arm_tcp(target: pycram.designators.motion_designator.PoseStamped, robot: pycram.world_concepts.world_object.Object, arm: pycram.designators.motion_designator.Arms, tip_link: str = None) None#

Calls the ik solver to calculate the inverse kinematics of the arm and then sets the joint states accordingly.

Parameters:
  • target – Target pose to which the end-effector should move.

  • robot – Robot object representing the robot.

  • arm – Which arm to move

class pycram.process_modules.default_process_modules.DefaultDetectingReal(lock)#

Bases: pycram.process_module.ProcessModule

Implementation of process modules. Process modules are the part that communicate with the outer world to execute

designators.

_execute(designator: pycram.designators.motion_designator.DetectingMotion) pycram.designators.motion_designator.List[pycram.world_concepts.world_object.Object]#

Perform a query based on the detection technique and state defined in the designator.

Returns:

A list of perceived objects.

class pycram.process_modules.default_process_modules.DefaultNavigationReal(lock)#

Bases: pycram.process_module.ProcessModule

Process module for the real robot that sends a cartesian goal to giskard to move the robot base

_execute(designator: pycram.designators.motion_designator.MoveMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveHeadReal(lock)#

Bases: pycram.process_module.ProcessModule

Process module for controlling the real robot’s head to look at a specified position. Uses the same calculations as the simulated version to orient the head.

_execute(desig: pycram.designators.motion_designator.LookingMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveTCPReal(lock)#

Bases: pycram.process_module.ProcessModule

Moves the tool center point of the real robot while avoiding all collisions

_execute(designator: pycram.designators.motion_designator.MoveTCPMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveArmJointsReal(lock)#

Bases: pycram.process_module.ProcessModule

Moves the arm joints of the real robot to the given configuration while avoiding all collisions

_execute(designator: pycram.designators.motion_designator.MoveArmJointsMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveJointsReal(lock)#

Bases: pycram.process_module.ProcessModule

Moves any joint using giskard, avoids all collisions while doint this.

_execute(designator: pycram.designators.motion_designator.MoveJointsMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveGripperReal(lock)#

Bases: pycram.process_module.ProcessModule

Opens or closes the gripper of the real robot, gripper uses an action server for this instead of giskard

abstract _execute(designator: pycram.designators.motion_designator.MoveGripperMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultOpenReal(lock)#

Bases: pycram.process_module.ProcessModule

Tries to open an already grasped container

_execute(designator: pycram.designators.motion_designator.OpeningMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultCloseReal(lock)#

Bases: pycram.process_module.ProcessModule

Tries to close an already grasped container

_execute(designator: pycram.designators.motion_designator.ClosingMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultMoveTCPWaypointsReal(lock)#

Bases: pycram.process_module.ProcessModule

Moves the tool center point of the real robot along a list of waypoints while avoiding all collisions

_execute(designator: pycram.designators.motion_designator.MoveTCPWaypointsMotion)#

Helper method for internal usage only. This method is to be overwritten instead of the execute method.

class pycram.process_modules.default_process_modules.DefaultManager#

Bases: pycram.designators.motion_designator.ProcessModuleManager

Base class for managing process modules, any new process modules have to implement this class to register the Process Modules

navigate()#
Get the Process Module for navigating the robot with respect to

the execution_type

Returns:

The Process Module for navigating

looking()#
Get the Process Module for looking at a point with respect to

the execution_type

Returns:

The Process Module for looking at a specific point

detecting()#
Get the Process Module for detecting an object with respect to

the execution_type

Returns:

The Process Module for detecting an object

move_tcp()#
Get the Process Module for moving the Tool Center Point with respect to

the execution_type

Returns:

The Process Module for moving the TCP

move_arm_joints()#

Get the Process Module for moving the joints of the robot arm with respect to the execution_type

Returns:

The Process Module for moving the arm joints

world_state_detecting()#

Get the Process Module for detecting an object using the world state with respect to the execution_type

Returns:

The Process Module for world state detecting

move_joints()#

Get the Process Module for moving any joint of the robot with respect to the execution_type

Returns:

The Process Module for moving joints

move_gripper()#
Get the Process Module for moving the gripper with respect to

the execution_type

Returns:

The Process Module for moving the gripper

open()#
Get the Process Module for opening drawers with respect to

the execution_type

Returns:

The Process Module for opening drawers

close()#
Get the Process Module for closing drawers with respect to

the execution_type

Returns:

The Process Module for closing drawers

move_tcp_waypoints()#
Get the Process Module for moving the Tool Center Point along a list of waypoints with respect to

the execution_type

Returns:

The Process Module for moving the TCP along a list of waypoints