...
Anchor robot_command.rpl.set_units robot_command.rpl.set_units robot_command.rpl.
set_units
(linear: Optional[Union[str , | SharedRegistryObject ]]| None = None, angular: Optional[Union[str , | SharedRegistryObject ]]| None = None, time: Optional[Union[str , | SharedRegistryObject ]]| None = None)Sets the active linear, angular and time units for the program.
Parameters: linear – Linear/length unit type: m, mm, inch
angular – Angular/rotation unit type: deg, rad
time – Time unit type: s, min, h
Examples
Code Block language python linenumbers false set_units("mm", "deg", "s") set_units(linear="in") set_units(angular="rad") set_units(time="s")
Anchor robot_command.rpl.get_units robot_command.rpl.get_units robot_command.rpl.
get_units
(with_time: bool = False) -> Union[ Tuple[str, str] , | Tuple[str, str, str]]Returns the active linear, angular and time units from the program.
Parameters: time – return the time unit type when set to True
Returns: Linear/length unit type, angular/rotation unit type and time unit type
Examples
Code Block language python linenumbers false linear, angular = get_units() linear, angular, time = get_units(with_time=True)
...
classAnchor robot_command.rpl.Joints robot_command.rpl.Joints robot_command.rpl.
Joints
(j1: float = 0.0, j2: float = 0.0, j3: float = 0.0, j4: float = 0.0, j5: float = 0.0, j6: float = 0.0)The Joints object consists of six joint position values to be used as target for move commands or to represent the current robot joint state.
Examples
Code Block language python linenumbers false waypoint_1 = Joint(323.62, 345.37, 477.76, 431.10, 918.62) waypoint_2 = Joint(j3=0.543) # all other joint positions are 0.0 by default
Anchor robot_command.rpl.Joints.copy robot_command.rpl.Joints.copy copy
() -> JointsCreates a copy of the joints object.
Returns: Copy of the joints object.
staticAnchor robot_command.rpl.Joints.from_list robot_command.rpl.Joints.from_list from_list
(joint_list: List[float]) -> JointsCreates a new joint object from a list of joint positions.
Parameters: joint_list – List of the six joint positions.
Returns: New joints object.
Anchor robot_command.rpl.Joints.from_ros_units robot_command.rpl.Joints.from_ros_units from_ros_units
(angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None)Converts the joints object from native ROS units to the target units, removing the unit type if any.
Parameters: angular_unit – Unit type for the angular joint positions.
Returns: The resulting joints object.
Anchor robot_command.rpl.Joints.to_list robot_command.rpl.Joints.to_list to_list
() -> List[float]Convert the joints object to a list of joint positions.
Returns: List of the six joint positions.
Anchor robot_command.rpl.Joints.to_ros_units robot_command.rpl.Joints.to_ros_units to_ros_units
(angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None) -> JointsConverts the joints object to native ROS units, removing the unit type if any. This is useful if you want to send the resulting data to a ROS service.
Parameters: angular_unit – Unit type for the angular joint positions.
Returns: The resulting joints object.
Anchor robot_command.rpl.Joints.with_units robot_command.rpl.Joints.with_units with_units
(angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None) -> JointsAdds a unit type to all positions of the joints object. The defaults are the native ROS units. In case a joint position already has units, the unit type is converted accordingly.
Parameters: angular_unit – Unit type for the angular joint positions.
Returns: The resulting joints object.
Anchor robot_command.rpl.Joints.without_units robot_command.rpl.Joints.without_units without_units
(angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None) -> JointsRemoves units from the joint positions if any. If no unit type is specified ROS units are assumed.
Parameters: angular_unit – Unit type for the angular joint positions.
Returns: The resulting joints object.
classAnchor robot_command.rpl.JointsFactory robot_command.rpl.JointsFactory robot_command.rpl.
JointsFactory
The JointsFactory class helps constructing Joints object using a shorthand notation. In the robot program it can be accessed using the
j[]
shortcut or thej()
shortcut which supports keyword arguments.Examples
Code Block language python linenumbers false waypoint_1 = j[0.764, 1.64, 0.741, 0.433, 0.140, 2.74]
waypoint_2 = j(j3=0.543) # all other joint positions are 0.0 by default
...
Anchor robot_command.rpl.get_joint_values robot_command.rpl.get_joint_values robot_command.rpl.
get_joint_values
() -> JointsReturns the current joint values.
Returns: Current joint values.
Examples
Code Block language python linenumbers false joint_value = get_joint_values()
...
classAnchor robot_command.rpl.Pose robot_command.rpl.Pose robot_command.rpl.
Pose
(x: Union[Number , | Quantity] = 0.0, y: Union[Number , | Quantity] = 0.0, z: Union[Number , | Quantity] = 0.0, a: Union[Number , | Quantity] = 0.0, b: Union[Number , | Quantity] = 0.0, c: Union[Number , | Quantity] = 0.0, frame: str = '', conf: JointConfig | None = None, rev: Number | Quantity | None = None)A robot pose consists of XYZ position ABC orientation parameters.
Optionally, an frame frame can be recorded with a waypoint.
Examples
Code Block language python linenumbers false waypoint_1 = Pose(483.21, 34.21, 21.59, 42.03, 71.14) waypoint_2 = Pose(a=0.543) # all other coordinate values are 0.0 per default.
Anchor robot_command.rpl.Pose.__mul__ robot_command.rpl.Pose.__mul__ __mul__
(other: Pose) -> PoseUse KDL frame multiplication to apply a frame to a pose.
Parameters: other – Other pose.
Returns: New pose object.
Code Block language python linenumbers false new_wp = Pose(x=10) * waypoint_1 # translates waypoint_1 by x=10 old_wp = Pose(x=10).inverse() * new_wp # translates new_wp back
Anchor robot_command.rpl.Pose.copy robot_command.rpl.Pose.copy copy
() -> PoseCreates a copy of the pose object.
Returns: A copy of the pose.
staticAnchor robot_command.rpl.Pose.from_kdl_frame robot_command.rpl.Pose.from_kdl_frame from_kdl_frame
(frame: Frame) -> PoseConverts a KDL frame to a pose object.
Parameters: frame – KDL frame.
Returns: New pose object.
staticAnchor robot_command.rpl.Pose.from_list robot_command.rpl.Pose.from_list from_list
(pose_list: List[float]) -> PoseCreates a new pose object from a list of coordinates.
Parameters: pose_list – List of the six coordinates.
Returns: New pose object.
staticAnchor robot_command.rpl.Pose.from_ros_pose robot_command.rpl.Pose.from_ros_pose from_ros_pose
(pose: Union[Pose , | PoseStamped]) -> PoseConverts a ROS native pose to a pose object.
Parameters: pose – The ROS stamped pose.
Returns: New pose object.
Anchor robot_command.rpl.Pose.from_ros_units robot_command.rpl.Pose.from_ros_units from_ros_units
(linear_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None, angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None)Converts the pose from native ROS units to the target units, removing the unit type.
Parameters: linear_unit – Unit type for linear coordinates.
angular_unit – Unit type for angular coordinates.
Returns: The resulting pose.
Anchor robot_command.rpl.Pose.inverse robot_command.rpl.Pose.inverse inverse
() -> PoseCreates the inverse of the pose. Useful for calculating frames.
Returns: New pose object.
Anchor robot_command.rpl.Pose.to_kdl_frame robot_command.rpl.Pose.to_kdl_frame to_kdl_frame
() -> FrameConverts the pose object to a KDL frame.
Returns: KDL frame.
Anchor robot_command.rpl.Pose.to_list robot_command.rpl.Pose.to_list to_list
() -> List[float]Convert the pose to a list of the coordinates. :return: List of the six coordinates.
Anchor robot_command.rpl.Pose.to_ros_pose robot_command.rpl.Pose.to_ros_pose to_ros_pose
() -> PoseConverts the pose object to a native ROS pose.
Returns: ROS pose.
Anchor robot_command.rpl.Pose.to_ros_units robot_command.rpl.Pose.to_ros_units to_ros_units
(linear_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None, angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None) -> PoseConverts the pose to native ROS units, removing the unit type if any. This is useful if you want to send the resulting data to a ROS service.
Parameters: linear_unit – Unit type for linear coordinates.
angular_unit – Unit type for angular coordinates.
Returns: The resulting pose.
Anchor robot_command.rpl.Pose.with_units robot_command.rpl.Pose.with_units with_units
(linear_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None, angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None) -> PoseAdds a unit type to all coordinates of the pose. The defaults are the native ROS units. In case a coordinate already has units, the unit type is converted accordingly.
Parameters: linear_unit – Unit type for linear coordinates.
angular_unit – Unit type for angular coordinates.
Returns: The resulting pose.
Anchor robot_command.rpl.Pose.without_units robot_command.rpl.Pose.without_units without_units
(linear_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None, angular_unit: Optional[Union[str , | SharedRegistryObject ]]| None = None) -> PoseRemoves units from the coordinates if any. If no unit type is specified ROS units are assumed.
Parameters: linear_unit – Unit type for linear coordinates.
angular_unit – Unit type for angular coordinates.
Returns: The resulting pose.
classAnchor robot_command.rpl.PoseFactory robot_command.rpl.PoseFactory robot_command.rpl.
PoseFactory
The PoseFactory class helps constructing Pose object using a shorthand notation. In the robot program it can be accessed using the
p[]
shortcut or thep()
shortcut which supports keyword arguments.Examples
Code Block language python linenumbers false waypoint_1 = p[202.73, 750.08, 91.75, 6.63, 53.21, "table"] # captured with table user frame waypoint_2 = p(y=10.0, frame="table") # all other coordinate values are 0.0 per default.
Anchor robot_command.rpl.get_pose robot_command.rpl.get_pose robot_command.rpl.
get_pose
(apply_user_frame: bool = True, apply_tool_frame: bool = True) -> PoseReturns the current robot pose.
Parameters: apply_user_frame – Applies the active user frame to the world pose.
apply_tool_frame – Applies the active tool frame to the world pose.
Returns: Current robot pose.
Examples
Code Block language python linenumbers false current_pose = get_pose()
...
Anchor robot_command.rpl.movej robot_command.rpl.movej robot_command.rpl.
movej
(target: Union[Pose, | Joints], v: float = None, probe: int = 0, velocity_scale: float = 1.0) -> Optional[ Tuple[int, Time, Joints, Pose] ]| NoneMoves the robot end effector to the target waypoint with a joints move. Targets can be local waypoints or global waypoints defined as pose or joints.
Parameters: target – target waypoint or joints target
velocity_scale – scale factor for velocity (default is full speed)
probe – specify the probe mode (2-6, or 0 for no probing) Probe mode 2: look for rising edge on probe signal (i.e. contact), raise ProbeFailedError if move completes without seeing a rising edge Probe mode 3: like mode 2 but does not raise error if move completes without rising edge Probe mode 4: like mode 2 but looks for falling edge Probe mode 5: like mode 4 but does not raise an error if move completes without falling edge Probe mode 6: “retract” mode, ignore falling edges and allow motion while probe signal is active, but raise ProbeUnexpectedContactError if a rising edge is seen
v –
scale factor for velocity (default is full speed)
Note Deprecated since version 3.1.1: use velocity_scale instead
Returns: tuple of probe results (for probing mode 2,3,4,5) or None: (probe contact type (0 = no contact, 1 = rising, 2 = falling), time of probe contact, Joint positions at probe contact, End-effector position / orientation pose at probe contact)
Examples
Code Block language python linenumbers false movej(waypoint_1) movej("global_waypoint_1", velocity_scale=0.6) movej(p[0, 100, 0, 90, 20, 0])
...
Anchor robot_command.rpl.movel robot_command.rpl.movel robot_command.rpl.
movel
(target: Union[Pose, | Joints], a: float = None, v: float = None, probe: int = 0, velocity: Optional[Union[float, Quantity]] float | Quantity | None = None, accel: Optional[Union[float , | Quantity ]]| None = None, accel_scale: float = 0.5, duration: Optional[Union[float , | Quantity ]]| None = None, strict_limits: bool = False) -> Optional[ Tuple[int, Time, Joints, Pose] ]| NoneMoves the robot end effector in a straight line from the current position to the target waypoint. Targets can be local waypoints or global waypoints defined as pose or joints.
Parameters: target – target waypoint
probe – specify the probe mode (2-6, or 0 for no probing) Probe mode 2: look for rising edge on probe signal (i.e. contact), raise ProbeFailedError if move completes without seeing a rising edge Probe mode 3: like mode 2 but does not raise error if move completes without rising edge Probe mode 4: like mode 2 but looks for falling edge Probe mode 5: like mode 4 but does not raise an error if move completes without falling edge Probe mode 6: “retract” mode, ignore falling edges and allow motion while probe signal is active, but raise ProbeUnexpectedContactError if a rising edge is seen
velocity – move velocity as absolute value, interpreted in terms of currently set machine units if quantity without units is given.
accel – move acceleration as absolute value, interpreted in terms of currently set machine units if quantity without units is given.
accel_scale – move acceleration scaling factor 0.0 - 1.0
duration – target move duration in seconds. If move duration based on other inputs is longer, the planned duration will be used.
strict_limits – Enforces strict limits. Moves violating the velocity and acceleration limits will error.
v –
move velocity scaling factor 0.0 - 1.0
Note Deprecated since version 3.1.1: use velocity instead
a –
move acceleration scaling factor 0.0 - 1.0
Note Deprecated since version 3.1.1: use accel_scale instead
Returns: tuple of probe results: (probe contact type (0 = no contact, 1 = rising, 2 = falling), time of probe contact, Joint positions at probe contact, End-effector position / orientation pose at probe contact)
Examples
Code Block language python linenumbers false movel(waypoint_1) movel("global_waypoint_1", velocity=100) movel(j[0.764, 1.64, 0.741, 0.433, 0.140, 2.74])
...
Anchor robot_command.rpl.movec robot_command.rpl.movec robot_command.rpl.
movec
(interim: Union[Pose, | Joints], target: Union[Pose, | Joints], a: float = None, v: float = None, probe: int = 0, velocity: Optional[Union[float , | Quantity ]]| None = None, accel: Optional[Union[float , | Quantity ]]| None = None, accel_scale: float = 0.5, duration: Optional[Union[float , | Quantity ]]| None = None, strict_limits: bool = False) -> Optional[ Tuple[int, Time, Joints, Pose] ]| NoneCircular/Arc move command.
Parameters: interim – interim waypoint
target – target waypoint
probe – specify the probe mode (2-6, or 0 for no probing) Probe mode 2: look for rising edge on probe signal (i.e. contact), raise ProbeFailedError if move completes without seeing a rising edge Probe mode 3: like mode 2 but does not raise error if move completes without rising edge Probe mode 4: like mode 2 but looks for falling edge Probe mode 5: like mode 4 but does not raise an error if move completes without falling edge Probe mode 6: “retract” mode, ignore falling edges and allow motion while probe signal is active, but raise ProbeUnexpectedContactError if a rising edge is seen
velocity – move velocity as absolute value, interpreted in terms of currently set machine units if quantity without units is given.
accel – move acceleration as absolute value, interpreted in terms of currently set machine units if quantity without units is given.
accel_scale – move acceleration scaling factor 0.0 - 1.0
duration – target move duration in seconds. If move duration based on other inputs is longer, the planned duration will be used.
strict_limits – Enforces strict limits. Moves violating the velocity and acceleration limits will error.
v –
move velocity scaling factor 0.0 - 1.0
Note Deprecated since version 3.1.1: use velocity instead
a –
move acceleration scaling factor 0.0 - 1.0
Note Deprecated since version 3.1.1: use accel_scale instead
Returns: tuple of probe results (for probing mode 2,3,4,5) or None: (probe contact type (0 = no contact, 1 = rising, 2 = falling), time of probe contact, Joint positions at probe contact, End-effector position / orientation pose at probe contact)
Examples
Code Block language python linenumbers false movec(waypoint_1, waypoint_2)
...
Anchor robot_command.rpl.movef robot_command.rpl.movef robot_command.rpl.
movef
(target: Union[Pose, | Joints]) -> NoneFree move command.
Parameters: target – target target
...
Anchor robot_command.rpl.set_path_blending robot_command.rpl.set_path_blending robot_command.rpl.
set_path_blending
(enable: bool, blend_radius: Optional[float ]| None = None) -> NoneEnables or disables path blending and sets the blend radius.
Parameters: enable – Enable or disable path blending.
blend_radius – The blend radius between moves in meters.
Examples
Code Block language python linenumbers false set_path_blending(True, 0.0) # enable path blending, blend radius 0.0m movej(waypoint1) movej(waypoint2) movej(waypoint3) sync() # moves executed before this command set_path_blending(False) # disable path blending again
...
Anchor robot_command.rpl.change_user_frame robot_command.rpl.change_user_frame robot_command.rpl.
change_user_frame
(name: Optional[str ]| None) -> NoneChange the currently active user frame. If an empty string or
None
is used as the name parameter, the empty user frame world becomes active.Parameters: name – The name of the tool frame to activate or None to disable user frames.
Examples
Code Block language python linenumbers false change_user_frame("table") change_user_frame(None) # disable any active frames
Anchor robot_command.rpl.set_user_frame robot_command.rpl.set_user_frame robot_command.rpl.
set_user_frame
(name: str, pose: Optional[Union[Pose, | str ]]| None = None, position: Optional[Union[Pose, | str ]]| None = None, orientation: Optional[Union[Pose, | str ]]| None = None) -> NoneSets a user frame using a pose, position or orientation or clears an frame.
The position and orientation arguments can be combined to overwrite the pose’s position or orientation.
Parameters: name – Name of the user frame
pose – Pose to use for the user frame
position – Use the position of this pose to override the position of the pose.
orientation – Use the orientation of this pose to override the orientation of the pose.
Examples
Code Block language python linenumbers false set_user_frame("table", p[0, 100, 0, 0, 0, 0]) set_user_frame("frame_1", waypoint_2, orientation=Pose(a=90)) set_user_frame("frame_1") # clears frame_1
Anchor robot_command.rpl.get_user_frame robot_command.rpl.get_user_frame robot_command.rpl.
get_user_frame
(name: str) -> Optional[Pose] | NoneReturns the pose of a user frame.
Parameters: name – Name of the user frame.
Returns: Pose of the user frame.
Raises: TypeError – if no user frame with the name is found
Examples
Code Block language python linenumbers false pose = get_user_frame("table")
Anchor robot_command.rpl.user_frame robot_command.rpl.user_frame robot_command.rpl.
user_frame
(pose=None, position=None, orientation=None, world=False)Scoped frame command. Applies a user frame temporarily on top of the currently active user frame.
The scoped frame command can be used to automatically switch the active frame back to a previous state when the scope is left. Scoped frames can be nested. Scoped frames are temporary and do not have a name.
Parameters: pose – The frame pose.
position – A pose from which the position is used for the frame.
orientation – A pose from which the orientation is used for the frame.
world – If set to True the frame is absolute.
Examples
Code Block language python linenumbers false with user_frame(p[0, 100, 0, 90, 20, 0]): # creates a temporary frame and activates it movel(Pose(x=10)) # move x by 10 starting from the frame # the active frame automatically reset when the scope is left
...
Anchor robot_command.rpl.get_active_user_frame robot_command.rpl.get_active_user_frame robot_command.rpl.
get_active_user_frame
() -> strReturns the name of the active user frame.
Examples
Code Block language python linenumbers false active_user_frame_name = get_active_user_frame()
...
Tool Frames
Anchor robot_command.rpl.change_tool_frame robot_command.rpl.change_tool_frame robot_command.rpl.
change_tool_frame
(name: Optional[str ]| None) -> NoneChange the currently active tool frame. If an empty string or
None
is used as the name parameter, the empty tool frame none becomes active.Parameters: name – The name of the tool frame to activate or None to disable tool frames.
Examples
Code Block language python linenumbers false change_tool_frame("table") change_tool_frame(None) # disable any active frames
Anchor robot_command.rpl.set_tool_frame robot_command.rpl.set_tool_frame robot_command.rpl.
set_tool_frame
(name: str, pose: Union[Pose, | str] = None, position: Union[Pose, | str] = None, orientation: Union[Pose, | str] = None) -> NoneSets a tool frame using a pose, position or orientation or clears an frame.
The position and orientation arguments can be combined to overwrite the pose’s position or orientation.
Parameters: name – Name of the tool frame
pose – Pose to use for the tool frame
position – Use the position of this pose to override the position of the pose.
orientation – Use the orientation of this pose to override the orientation of the pose.
Examples
Code Block language python linenumbers false set_tool_frame("some_tool", p[0, 0, 100, 0, 0, 0]) set_tool_frame("other_tool", waypoint_2, position=Pose(z=0.1)) set_tool_frame("other_tool") # clears frame other_tool frame other_tool
...
Anchor robot_command.rpl.get_tool_frame robot_command.rpl.get_tool_frame robot_command.rpl.
get_tool_frame
(name: str) -> Pose | NoneReturns the pose of a tool frame.
Parameters: name – Name of the tool frame.
Returns: Pose of the user frame or None if it does not exist.
Raises: TypeError – if no tool frame with the name is found
Examples
Code Block language python linenumbers false pose = get_tool_frame("tool1")
Anchor robot_command.rpl.get_active_tool_frame robot_command.rpl.get_active_tool_frame robot_command.rpl.
get_active_tool_frame
(name: str) -> Optional[Pose]strReturns the pose of a tool frame.
Parameters: name
– Nameof the
tool frame.Returns: Pose of the user frame or None if it does not exist.
Raises: TypeError – if no tool frame with the name is found
active tool frame.
Examples
Code Block language python linenumbers false poseactive_tool_frame_name = get_active_tool_frame("tool1")
Digital I/O
Digital input/output pins can be accessed via their name or by their number.
Anchor robot_command.rpl.set_digital_out robot_command.rpl.set_digital_out robot_command.rpl.
set_digital_out
(nr_or_name: Union[int , | str], state: bool) -> NoneSets a digital output pin to high or low state.
Parameters: nr_or_name – The number or name of the digital output pin.
state – Set to True or False for on and off.
Examples
Code Block language python linenumbers false set_digital_out("gripper", True) set_digital_out(2, False)
Anchor robot_command.rpl.get_digital_in robot_command.rpl.get_digital_in robot_command.rpl.
get_digital_in
(nr_or_name: Union[str , | int]) -> boolReturns the current digital input state.
Parameters: nr_or_name – The number or name of the digital output pin.
Returns: True or False for High and Low.
Examples
Code Block language python linenumbers false io_state = get_digital_in("gripper") x = get_digital_in(3)
...
Anchor robot_command.rpl.set_machine_frame robot_command.rpl.set_machine_frame robot_command.rpl.
set_machine_frame
(pose: Union[Pose, | str], instance: str = '') -> NoneSets the origin frame for the 3D visualization of the PathPilot remote machine model.
Parameters: pose – Pose to use for the machine frame.
instance – Optional machine instance name. If not given, default instance is used.
Examples
Code Block language python linenumbers false set_machine_frame(p[0,0,0,90,0,0], "instance") set_machine_frame(Pose(x=100)) # sets frame for default instance
...
Anchor robot_command.rpl.notify robot_command.rpl.notify robot_command.rpl.
notify
(message: str, warning: bool = False, error: bool = False, image_path: str = '', timeout: Optional[float ]| None = None) -> NoneCreates a popup notification message on the robot UI.
The
message
argument text is shown to the user.By default, the message is displayed as informational and thus will not block the program flow. The
warning
argument shows a warning message, which breaks program flow and can be declined by the operator. Theerror
argument shows a blocking error message, which aborts the program.The optional
image_path
argument can be used to display an informational image along with the messageParameters: message – Message text to display in the popup.
warning – Set to true if this message is a warning.
error – Set to true if this message is an error message.
image_path – Optional path to an image file to displayed in the popup.
timeout – Optional timeout in seconds.
Examples
Code Block language python linenumbers false notify("Hello World!") notify("No part found, check the palette.", warning=True) notify("This should not happen.", error=True, image_path="./fatal_error.png")
...
Anchor robot_command.rpl.probel robot_command.rpl.probel robot_command.rpl.
probel
(target: Union[Pose, | Joints, | str], a: float = 0.5, v: float = 0.1, v_retract: float = 0.1, away: bool = False, check_retract_contact: bool = False) -> PoseSimple probing cycle that returns to the initial pose (regardless of the probe result). The sequence is:
Linear move at specified vel / accel scale towards the target position
Stop at probe contact, error condition, or motion end
Retract to original position
Raise any errors from the cycle, or return the probe result
Parameters: target – end point of probing motion (probe cycle uses movel internally)
v – move velocity scaling factor 0.0 - 1.0
a – move acceleration scaling factor 0.0 - 1.0
v_retract – velocity scaling factor to use during retract phase
away – Probe towards work (default) if False, otherwise probe away from work
check_retract_contact – Optionally check for contacts during retract move (to avoid retracting into an obstacle and breaking a probe tip)
Info assumes mode 2/4 for probing, meaning an error will be thrown if it reaches the end without contact. Caller can catch this exception if they want mode 3/5 functionality
Examples
Code Block language python linenumbers false contact_pose = probel(probe_goal_pose, a=0.5, v=0.01, v_retract=0.1, away=False, check_retract_contact=False)
...
Anchor robot_command.rpl.register_interrupt robot_command.rpl.register_interrupt robot_command.rpl.
register_interrupt
(source: InterruptSource, nr_or_name: Union[int , | str], fct: Callable) -> NoneRegisters a interrupt function to an interrupt source.
Parameters: source – The interrupt source type.
nr_or_name – Number or name of the interrupt source, e.g. 1 for Digital Input 1.
fct – The function which should be called when the interrupt is triggered, if None is passed, this unregisters and disables the interrupt.
Examples
Code Block language python linenumbers false def interrupt_handler(value): if value: exit() # exit program when digital input 1 is high register_interrupt(InterruptSource.DigitalInput, 1, interrupt_handler)
...