Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi community
I don't know how to use prime to find solutions to a robotic problem this problem is based on matrix calculus for a serial type robot it is easy to determine the direct geometry, i.e. to express the generalized coordinates according to the joint coordinates The difficulty is to solve the inverse geometry, that is to say determine the coordinates of the joints according to the generalized coordinates usually this uses Paul's iterative method I don't know how to solve these equations with Mathcad see the attached sheet
Solved! Go to Solution.
to test the “NaN” answer:
q1=45deg
q2=0deg
if I ask the program to reach this singular point, the last iteration must return "NaN"
this is not the case, does this come from the approximate numerical calculation ?
then we must reconsider the discretization Xd-X ; to force the exact passage on a defined point
the best would be to make a trajectory with a parameterized curve rather than a straight line.
for example with a circular trajectory
x=Rcos(alpha)
y=Rsin(alpha)
if I walk the circle 0 to 90°, and that I descretize in step of one degree.
I find 3 singularity point (multiples of pi)
this singularity problem is not easy 😅🙄
Yes, its because of numerical approximations
You can tell if you let Prime show more decimals
The critical position is not exactly met.
You may decrease "prec" or even use "again<--|dX|=0" but I guess that you will still run into numerical round offs or end up in an endless loop. Usually its not a good idea to ask if a variable is exactly zero when dealing with floats.
Plying with the "prec" argument I got the impression that its the algorithm itself which only approaches but never exactly meets the wished for end position.
According the unit mismatch when you call the function MGI2:
Exchange the second and third arguments q and X.d and it will work OK 😉
About singularity
By using your algorithm, is it possible to replace if |J|=0 by if 0.02>|J| >0.01 (to adjust)
In this way we create an interval of uncertainty but which from a mechanical point of view can be acceptable.
If the singularity is in this interval, we repeat the algorithm which stops the calculation in order to see it.
What do you think ?
Sure you can use whatever condition you think is appropriate.
So far there was no example to test with where we actually would arrive at the position of a singularity.
The one where you had chosen he desired and position to be a singularity did not fail because that end position was not arrived at exactly and so all matrices used were not singular.