Calculate Distance Between Two Points
Description
This operator is used to calculate the Euclidean distance between two points. It can calculate the straight-line distance in three-dimensional space (XYZ), or only consider the projected distance on a specific axis or axis plane (such as X-axis only, Y-axis only, Z-axis only, XY plane, XZ plane, YZ plane).
Overview
Suitable for scenarios such as distance measurement, conditional judgment, and relative positioning. Supports multiple input modes: calculating distances between corresponding points in two point lists, calculating distances from one point to all points in a point list, or calculating distances from all points in a point list to a fixed point.
Scenarios
-
Distance Measurement : Calculate the spatial distance between two positioning points, feature points, or object centers.
-
Condition Judgment : Make decisions based on whether the distance between two objects or feature points meets specific conditions (e.g., less than safety distance, greater than grasping distance).
-
Relative Positioning : Analyze the distance of a point relative to another point (or fixed reference point) in a specific axial direction.
Inputs and Outputs
Inputs |
Position 1: A list containing one or more 3D point coordinates [X, Y, Z], which can be obtained from split Pick points or Target Object Pose nodes. Position 2: A list containing one or more 3D point coordinates [X, Y, Z]. This input port is invalid when the parameter "Calculate distance to fixed point" switch is set to On. |
Outputs |
Distance between two points: A list containing the calculated distance values. The list length depends on the input mode: |
Parameters
Specify distance method for axis or axis combination
Description |
Select which coordinate axes to consider when calculating distance. |
Tuning Instructions |
|
Parameter Range |
Values/Range:
Default: XYZ (3D Space) |
Calculate distance to fixed point
Description |
Control whether to calculate the distance between two input lists or the distance between input list position one and a fixed point. |
Tuning Instructions |
|
Parameter Range |
Default: False |
Fixed point position
Description |
Effective when the "fix_point_flag" switch is enabled. Defines the three-dimensional coordinates [X, Y, Z] of the fixed reference point used to calculate distance. |
Tuning Instructions |
Input a fixed three-dimensional coordinate value here, for example [100, 200, 300]. Each point in position one will calculate the distance to this point. |
Parameter Range |
Default: [0, 0, 0] |