04-03-2024, 09:14 PM
Hello,
There seems to be a problem with an example in the documentation.
The example is under here:
https://robodk.com/doc/en/PythonAPI/robo...em.SolveFK
(1) it needs to import robomath
(2) the variables need some values... like x_move=300 y_move=0 z_move=0
(3) you can't use continue outside of a loop
So there is no hope of this example actually working. But if you fix those problems there appears to be a larger issue with the choice of comparing configurations. The scripts are in the attached file for your enjoyment.
The error looks like this:
There seems to be a problem with an example in the documentation.
The example is under here:
https://robodk.com/doc/en/PythonAPI/robo...em.SolveFK
(1) it needs to import robomath
(2) the variables need some values... like x_move=300 y_move=0 z_move=0
(3) you can't use continue outside of a loop
So there is no hope of this example actually working. But if you fix those problems there appears to be a larger issue with the choice of comparing configurations. The scripts are in the attached file for your enjoyment.
The error looks like this:
Code:
Traceback (most recent call last):
File "C:\Users\henry\AppData\Local\Temp\Example_from_documentation.py", line 30, in <module>
if robot_config[0] != new_robot_config[0] or robot_config[1] != new_robot_config[1] or robot_config[2] != new_robot_config[2]:
File "C:\RoboDK\Python\robodk\robomath.py", line 1684, in __ne__
return not (self == other)
File "C:\RoboDK\Python\robodk\robomath.py", line 1681, in __eq__
return pose_is_similar(other, self)
File "C:\RoboDK\Python\robodk\robomath.py", line 1277, in pose_is_similar
if distance(a.Pos(), b.Pos()) + pose_angle_between(a, b) * 180 / pi < tolerance:
File "C:\RoboDK\Python\robodk\robomath.py", line 1886, in Pos
return [self.rows[0][3], self.rows[1][3], self.rows[2][3]]
IndexError: list index out of range