Moving a Robot in Joint Space

A point-to-point (PTP) motion is a movement where the robot travels to a target configuration by following the shortest path in joint space. The motion is therefore the quickest possible, but the resulting end effector path in Cartesian space can be unpredictable.

This chapter specifically explains PTP movements. For detailed information on how to use these methods synchronously or asynchronously, see the asynchronous instructions chapter.

Performing a PTP Movement

Performing a PTP movement can be done using the method move_ptp(), which requires a target pose of either type JointPose or CartesianPose.

Note

The CartesianPose is interpreted in the world coordinate system. No specific tool is assumed. The behavior depends on the specific robot in use.

A CartesianPose itself can be ambiguous in regards to the exact joint configuration of the robot. It is at the discretion of the underlying robot control to choose a convenient joint configuration to reach the given pose. This means, that the robot configuration reached depends on the starting position.

The speed argument defines the general speed for the motion in regard to the possible maximum joint speed. Its input parameter has to be of either the custom data type Factor, which ranges between 0.0 and 1.0, or of type Percent, which ranges between 0.0% and 100.0%. Giving no argument results in a Factor of 1, which reflects the maximum speed.

Perform a PTP Movement using a JointPose

To perform a PTP movement to a target defined in joint space, use a JointPose as an input target argument:

robot.move_ptp(HOME, speed=Factor(0.25)).result()
robot.move_ptp(VERTICAL, speed=Percent(100)).result()

Perform a PTP Movement using a CartesianPose

To perform a PTP movement to a target defined in Cartesian space, use a CartesianPose as an input target argument:

vertical_c = CartesianPose().from_list(
    [0.1382, 0.550, 0.296, 3.14159, 0.0, 0.0]
)
robot.move_ptp(vertical_c, speed=Percent(100)).result()

Since a Cartesian pose is ambiguous for a six axis robot, the resulting joint configuration at the target can differ depending on the starting pose of the robot.

Perform a PTP Movement with Blending

PTP movements can use blending by supplying a Factor or Percent input to the blending argument. The higher the blending factor, the more and earlier the blended path will deviate from the original path that would reach the target pose. In most cases this allows the robot to maintain a higher path velocity and complete the overall path faster.

The exact behavior and interpretation of the blending parameter as well as implicit limitations are highly dependent on the specific robot used.

To use blending, add a blending input argument to the method. Blending only works, if the instructions used for blending are known to robot control in advance. As such, it is not possible to blend two instructions, which are synced to the Python interpreter. For more details on how to use and how not to use the blending functionality, please refer to the asynchronous instructions chapter. Here is a simple example of how to use blending:

# Pose BLENDING_1 and BLENDING_2 will be blended
robot.move_ptp(BLENDING_1, blending=Percent(50))
robot.move_ptp(BLENDING_2, blending=Factor(0.5))
# Pose BLENDING_3 will be reached
robot.move_ptp(BLENDING_3).result()

Note how the .result(), which syncs the instruction to the Python interpreter, is only used for the last movement instruction which itself does not contain a blending argument.

Amending blending parameters

If your robot supports sending delayed blending parameters, it is possible to amend a blending parameter after sending the motion instruction using the amend_blending_parameters() method.

robot.move_ptp(BLENDING_1)
robot.amend_blending_parameter(blending=Percent(50))
robot.move_ptp(BLENDING_2)
robot.amend_blending_parameter(blending=Factor(0.5))
robot.move_ptp(BLENDING_3).result()

In this example the robot will blend the poses BLENDING_1 and BLENDING_2 just like in the previous example, but the blending parameters are supplied after sending the motion instruction.

Note that amending the parameter too late - i.e. such that the robot already reached the previous target pose - may result in a drop of the blend request by the robot control.

Perform a Relative PTP Movement

For moving the robot relatively to its current pose, use the move_ptp_relative() method. Other than that, the method accepts the same arguments as move_ptp().

In the example below, the robot moves relatively in the positive z-direction from its current pose. The z input argument is a CartesianPose, where every argument is zero except the value of z:

robot.move_ptp_relative(z(0.1), speed=Percent(100)).result()

Full Example of Performing PTP Movements

The following example shows a simple application in which the move_ptp() method is being used:

Definition of the Move PTP Method

The move PTP method is defined in the MovePTPTrait:

The methods to amend blending parameters are defined in the AmendBlendingParametersTrait: