Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Unexpected result with MoveL_Test

#1
Hi,

I am posting this on behalf of a student of mine, given that he has not received the activation e-mail (the same thing that happened to me a few week ago).

We have been using "MoveL_Test" to evaluate if a a linear motion is possible between to two poses. We have found some situations where the "MoveL_Test" returns "-2" but, in those exact situations, if we run MoveL, it works! According to the docs, when MoveL_Test returns "-2", it means that the target is no reachable at all, which is not the case, given that "MoveL" worked. Actually the poses (joint values) used here were a result of SolveIK_All, where at least one solution was obtained for each, so it should be reachable.

Summarizing, it seems that MoveL_Test gives "-2" in situations where both "MoveL" and "MoveJ" are possible.

I am attaching a project and a python file demonstrating this. We are using RoboDK 5.5.2 and Python 3.9 on a Windows 11 64-bit with Visual Studio Code.

Thanks and best regards,
Hugo Costelha


Attached Files
.rdk bugExample_MoveL_Test.rdk(Size: 2.83 MB / Downloads: 76)
.py bugExample_MoveL_Test_code.py(Size: 1.66 KB / Downloads: 82)
#2
SolveFK and SolveIK functions require using poses of the robot flange with respect to the robot base. This means that they don't depend on the active tool and active reference frames (contrary to most other functions such as Pose, setPose, MoveJ, MoveL, MoveJ_Test, MoveL_Test, etc, which account for the active tool and reference frames).

Therefore, you should calculate the target pose based on your active tool and coordinate system as follows:
Code:
jointVector0 = [-2.673, 11.398, 0.966, -276.009, -88.591, -167.432]
jointVector1 = [-1.381, 10.534, -14.661, -277.682, -86.983, 176.095]

target_pose = robot.PoseFrame().inv() * robot.SolveFK(jointVector1) * robot.PoseTool()
测试=机器人。MoveL_Test (j - 1 = jointVector0, pose=target_pose)
print(test)
#3
Hi Albert,

Thanks for your reply. The example we sent was a shorter example to demonstrate what we were referring to. In practice, we are using the "SolveIK_All(pose, tool=None, reference=None)", and we are passing the "tool=robo.PoseTool()" and "reference=robot.poseFrame()" arguments in our original code (but we were not passing those arguments in the SolveFK part). Using these arguments, it takes into account the tool and reference frame, right? The same for the SolveFK, we can pass the arguments "tool" and "reference", and it should take them into account, right?

We just tried using the SolveFK with those arguments, and it seems to be working as expected now.

Thanks and regards.
#4
Yes, you can pass the tool and reference poses to SolveIK and SolveFK and the pose should be properly calculated as well.




Users browsing this thread:
1 Guest(s)