Global Variables
This section outlines the global variables generated by the URCap program nodes. These variables can assist users when programming their applications.
PP_flag¶
- Description: Indicates whether a candidate has been selected for picking.
- Type: Boolean
PP_pickpoint¶
- Description: Stores the pick pose estimated by Pick[+], defined relative to the robot base.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ]
PP_pickpoint = p[0.2, 0.2, 0.05, 2.15, 2.15, 0]
PP_home¶
- Description: Stores the home pose, which is the robot arm's safe starting position. This pose serves as an approach point for picking and is a translation of the pick pose in the negative direction of the pick pose's Z-axis, moving away from the object.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ]
PP_home = p[0.2, 0.2, 0.3, 2.15, 2.15, 0]
PP_prepick¶
- Description: Stores the pre-pick pose.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ] - Example
PP_prepick = p[0.2, 0.2, 0.1, 2.15, 2.15, 0]
PP_pickDeeper¶
- Description: Stores the pick deeper pose.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ]
PP_pickDeeper = p[0.2, 0.2, 0.02, 2.15, 2.15, 0]
PP_postpick¶
- Description: Stores the post-pick pose.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ]
PP_postpick = p[0.2, 0.2, 0.1, 2.15, 2.15, 0]
PP_category¶
- Description: Stores the category name of the object to be picked. If no suitable candidate is detected, the value is
"-1 (None)". - Type: String variable
PP_category = "object"
PP_pickID¶
- Description: Stores the pick point ID for the selected pick. If alignment (based on texture or geometry) was applied to the detected category, this variable identifies the picking point in the active picking point set. If a suitable candidate is detected, the value is
"0","1", etc. If no candidate is found, the value is"-1 (None)". - Type: String variable
PP_pickID = "0"
PP_error¶
- Description: Stores an error code for monitoring and debugging the program.
- Type: Integer list variable
[C1, C2, C3]
The values of the elements on the list represent the error type (C1), error code (C2) and error sub-code (C3). The possible values of this variable are explained in the following table.
| C1 | C2 | C3 | Description |
|---|---|---|---|
| 0 | 0 | 0 | No error or warning to report. |
| 0 | 2 | x |
⚠️ Warning: Current pick pose is not reachable. Based on x value: - 1: Pick pose not reachable - 2: Pre-pick pose not reachable - 3: Home pose not reachable - 4: Pick pose angle too high |
| 1 | 0 | 0 | ⚠️ Warning: Cycle time is greater than the specified threshold. |
| 2 | 0 | 0 | ⚠️ Disconnection error: Could not communicate with Pick[+]. |
| 3 | x | x | ⚠️ Communication error: Could communicate with Pick[+] but there was a problem sending/receiving data. |
PP_angle¶
-
Description: Stores the angle of the current pick candidate in degrees.
- The first element represents the pick candidate's angle.
- A value of
-1indicates that no candidate is currently being analyzed. - The second element is for internal use only.
-
Type: Float array
[angle, internal_use]
PP_angle = [15, 1]
PP_boxOrigin¶
- Description: Stores the origin point of the selected environment box.
- If a box or working surface is selected in the Pick[+] trigger node, this variable contains the coordinate system origin of that selection.
- This pose helps the system filter objects by angle for better picking.
- If no box is selected ("no_box"), the angle is still calculated, but the method depends on the camera setup (eye-in-hand or hand-eye).
- For the safest and most reliable results, always define a box or working surface.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ]
PP_boxOrigin = p[0.2, 0.2, 0.2, 0, 0, 0]
PP_camSetting¶
- Description: Indicates the current camera setting. Possible values:
"hand-eye""eye-in-hand"
- Type: String variable
PP_camSetting = "eye-in-hand"
PP_pickOffset¶
- Description: Stores the offset from the pick point in meters.
- Type: Float
PP_pickOffset = 0.05
PP_homeOffset¶
- Description: Stores the offset relative to the user-selected home pose.
- Type: Float
PP_calibration¶
- Description: Stores the camera calibration data.
- Eye-in-hand setup: Represents the camera's pose relative to the tool flange.
- Hand-eye setup: Represents the camera's pose relative to the robot base.
- Type: Pose variable
[X, Y, Z, RX, RY, RZ]
PP_connectivity¶
- Description: Monitors the connection status with the Pick[+] server.
- Type: Boolean
PP_triggers¶
- Description: Counts consecutive triggers without a successful pick (maximum: 3). This can be used to adjust the photo pose when no candidates are detected.
- If no candidate is detected, this count increases.
- If a candidate is found, the value resets to 0.
If no pick candidates are found in an iteration, PP_triggers increases by 1. Upon reaching 3, a pop-up stops execution and notifies the user. This variable can be used to adjust the photo pose, enabling up to three different angles, which is useful for bin-picking, as changing the camera angle could detect objects that were previously unidentifiable from the previous pose.
- Type: Integer
PP_unreachable¶
- Description: Tracks the number of unreachable pick points among all detected candidates.
- Type: Integer
PP_force¶
- Description: Stores the force threshold set by the user in Newtons.
- Type: Float
PP_contact¶
- Description: Indicates whether the tool center point (TCP) has made contact with an object.
- Type: Boolean