Migration Guide

The following guide describes how to migrate from the legacy variant of this library (0.15.0) to the first major version (1.0.0). Sections are listed in order of expected impact.

Blending Changes

The blending parameter given to all movement commands is not retroactive anymore. Instead the blending parameter is added to the instruction, which shall not be reached exactly.

In order to mirror existing paths, move the given blending parameter one instruction up.

# Before:
robot.move_ptp(A)
robot.move_ptp(B, blending=A_blend)
robot.move_ptp(C, blending=B_blend).result()


# Now:
robot.move_ptp(A, blending=A_blend)
robot.move_ptp(B, blending=B_blend)
robot.move_ptp(C).result()

The robot will wait for the next instruction to be available if blending is enabled. As such, please validate, that your program always ends with a non blended instruction.

If this new approach is not feasible due to timing or control flow issues, it is also possible to use the method amend_blending_parameters() on robots with Victor behavior.

# Before:
robot.move_ptp(A)
robot.move_ptp(B, blending=A_blend)
robot.move_ptp(C, blending=B_blend).result()


# Now:
robot.move_ptp(A)
robot.amend_blending_parameters(A_blend)
robot.move_ptp(B)
robot.amend_blending_parameters(B_blend)
robot.move_ptp(C).result()

Movement Instructions

The methods move_ptp, move_linear and move_circ_border are still available but name and parameters have slightly changed.

# Before:
robot.move_ptp(target_pose=A, relativity = Relativity.ABSOLUTE, velocity_scaling = 1.0, blending = Percent(100))
robot.move_ptp(target_pose=A, relativity = Relativity.RELATIVE, velocity_scaling = 1.0, blending = Percent(100))
# Now:
robot.move_ptp(target=A, speed=Factor(1.0), blending = Percent(100))
robot.move_ptp_relative(target=A, speed=Factor(1.0), blending = Percent(100))

The common move linear method does not support the parameters max_translational_acceleration, max_rotational_velocity, max_rotational_acceleration. In case you need them use the robot specific behavior move_linear_v().

# Before:
my_parameters = PathParameters(
    max_translational_velocity=1,
    max_translational_acceleration=1,
    max_rotational_velocity=1,
    max_rotational_acceleration=1,
)
robot.move_linear(target_pose=A, relativity = Relativity.ABSOLUTE, path_parameters = my_parameters, blending = Percent(100))

# Now:
robot.move_linear(target=A, velocity_mps=1.0, blending = Percent(100))
# or
extra_parameters=MoveCartesianVictorParameters(
            acceleration_mps2=1.0, rotation_velocity_radps=1.0, rotation_acceleration_radps2=1.0
        ),
robot.move_linear_v(target=A, velocity_mps=1.0, blending = Percent(100), )

The same transformation applies for move_circ_border with the addition, that move_circ_border is now only move_circular.

Support for move_circ_center and move_circ_angle is currently not migrated.

Commands

All commands (please see the instruction chapter for a detailed discussion how they differ from instructions) are now synchronous. For example set_time_override will block until the desired time override is actually set.

RobotArm Selection

The generic RobotArm class is no longer available. It is replaced by specific implementations for the underlying robot. Replace the import and class instantiation with one of the following:

  • FanucRobotArm

  • YuRobotArm

  • VorausIndustrialRobotArm

  • K4PRobotArm

Legacy Method Changes

  • connection context manager

    • Renamed to connect, arguments are now host: str, port: int instead of uri: str.

  • move_ptp

    • move_ptp is now generic and has less arguments. In case something you need is missing in the new method, use move_ptp_v instead.

  • move_linear

    • move_linear is now generic and has less arguments. In case something you need is missing in the new method, use move_linear_v instead.

  • move_circ_center

    • Not supported yet. Use move_circular or move_circular_v instead.

  • move_circ_angle

    • Not supported yet. Use move_circular or move_circular_v instead.

  • move_circ_border

    • Renamed to move_circular. Is generic and has less arguments. In case something you need is missing in the new method, use move_circular_v instead.

  • wait_time

    • No change.

  • get_joint_pose

    • No change.

  • get_tcp_pose

    • No change.

  • get_main_state

    • Replaced by get_robot_state_v and get_lifecycle_state.

  • pause_motion and continue_motion

    • No change.

  • stop_motion and unstop_motion

    • No change.

control:

  • set_time_override

    • Now located directly on the robot instance rather than on the control property.

    • Blocks until the desired value is set.

  • get_time_override

    • Now located directly on the robot instance rather than on the control property.

  • activate

    • Renamed to enable

    • Now located directly on the robot instance rather than on the control property.

    • Blocks until the robot is enabled.

  • deactivate

    • Renamed to disable

    • Now located directly on the robot instance rather than on the control property.

    • Blocks until the robot is disabled.

payload:

  • set_mass

    • Renamed to set_payload_v.

    • Blocks until the desired value is set.

  • get_mass

    • Renamed to get_payload_mass_v.

No replacement yet:

  • tool

  • dio