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:
FanucRobotArmYuRobotArmVorausIndustrialRobotArmK4PRobotArm
Legacy Method Changes
connectioncontext managerRenamed to
connect, arguments are nowhost: str, port: intinstead ofuri: str.
move_ptpmove_ptpis now generic and has less arguments. In case something you need is missing in the new method, usemove_ptp_vinstead.
move_linearmove_linearis now generic and has less arguments. In case something you need is missing in the new method, usemove_linear_vinstead.
move_circ_centerNot supported yet. Use
move_circularormove_circular_vinstead.
move_circ_angleNot supported yet. Use
move_circularormove_circular_vinstead.
move_circ_borderRenamed to
move_circular. Is generic and has less arguments. In case something you need is missing in the new method, usemove_circular_vinstead.
wait_timeNo change.
get_joint_poseNo change.
get_tcp_poseNo change.
get_main_stateReplaced by
get_robot_state_vandget_lifecycle_state.
pause_motionandcontinue_motionNo change.
stop_motionandunstop_motionNo change.
control:
set_time_overrideNow located directly on the robot instance rather than on the
controlproperty.Blocks until the desired value is set.
get_time_overrideNow located directly on the robot instance rather than on the
controlproperty.
activateRenamed to
enableNow located directly on the robot instance rather than on the
controlproperty.Blocks until the robot is enabled.
deactivateRenamed to
disableNow located directly on the robot instance rather than on the
controlproperty.Blocks until the robot is disabled.
payload:
set_massRenamed to
set_payload_v.Blocks until the desired value is set.
get_massRenamed to
get_payload_mass_v.
No replacement yet:
tooldio