In a measurement project, how to calculate the distance between two planes

In a measurement project, how to calculate the distance between two planes.

Step 1: Input the point clouds of the two planes to be measured.
1.1 If the two planes are within the same field of view, use the “Point Cloud Clustering” step to segment the point clouds of the two planes.
1.2 If the two planes are not within the same field of view, use the “Transform Point Cloud” step to transform both point clouds into the robot’s coordinate system.

Step 2: Calculate the distance between the two point clouds of the planes.
Method 1: Take the X, Y, Z axes of the pose of Plane 2 as a custom coordinate system. Transform the pose of Plane 1 into this coordinate system. Then, calculate the distance along the Z-axis between the transformed pose of Plane 1 and the pose of Plane 2. The corresponding Mech-Vision project is shown in the figure below.

Method 2: Assign the quaternions of Plane 2’s pose to the pose of Plane 1. Then, calculate the distance along the Z-axis between the updated pose of Plane 1 and the pose of Plane 2. The corresponding Vision project is shown in the figure below.

Method 3: Use the “Project Points onto Plane” step to project the center point of Plane 1 onto Plane 2. Then, calculate the distance between the center point of the plane and the projected point. The corresponding Mech-Vision project is shown in the figure below