05-10-2023, 04:15 PM
Is there any additional documentation available for how the `robomath.fitPlane()` method works?
Specifically:
1. What inputs does fitPlane expect? From the source code, it looks like it accepts anything array-like. However, it is not clear what dimensions it is looking for. (I expect one of the dimensions will need to be 3 but I am not sure which.)
2. What do the outputs mean? The source code shows `pplane` and `vplane` as outputs, but it is not clear what those are. The source code seems to indicate that the latter is a plane equation such that `b(1)*X + b(2)*Y +b(3)*Z + b(4) = 0`, but the meaning of the other output is not clear.
3. To test what this method returns, I attempted to call it with the 3x3 identity list of lists: `fitPlane([[1,0,0], [0,1,0], [0,0,1]])`.
However, I get an exception: `IndexError: index 3 is out of bounds for axis 0 with size 3`.
The exception occurs on line 1057: `B = v[3, :] # Solution is last column of v`.
What is the issue with that call?
https://robodk.com/doc/en/PythonAPI/robo...h.fitPlane
Specifically:
1. What inputs does fitPlane expect? From the source code, it looks like it accepts anything array-like. However, it is not clear what dimensions it is looking for. (I expect one of the dimensions will need to be 3 but I am not sure which.)
2. What do the outputs mean? The source code shows `pplane` and `vplane` as outputs, but it is not clear what those are. The source code seems to indicate that the latter is a plane equation such that `b(1)*X + b(2)*Y +b(3)*Z + b(4) = 0`, but the meaning of the other output is not clear.
3. To test what this method returns, I attempted to call it with the 3x3 identity list of lists: `fitPlane([[1,0,0], [0,1,0], [0,0,1]])`.
However, I get an exception: `IndexError: index 3 is out of bounds for axis 0 with size 3`.
The exception occurs on line 1057: `B = v[3, :] # Solution is last column of v`.
What is the issue with that call?
https://robodk.com/doc/en/PythonAPI/robo...h.fitPlane