# Singularity ... again

07 May 2023 18:10 #270878 by bkt
Singularity ... again was created by bkt
In my new scara project return the old problem ... using switchkins with Mxx code and auto-learning point system with joistyk manual moove, i have some problem when eblow reach singularity or out of range point oa a nearest too .... become extremely nervous and sometime stop because reach velocity limit ... you probabily know .... if you nto implement a system for smoot velocity and acceleration when reach point near external area of eblow ... robot can have some problem.

These problem was for long time uninvestigate from me .... and non find my old link for start to study new kinematics for solve these problem.
Could some good soul show me the way to understand what to introduce in the kinematics to solve the problem? I remember Andy had suggested to introduce limit3 but I don't remember if it was the best solution and if there were others.

regards

17 May 2023 12:11 #271536 by andypugh
Replied by andypugh on topic Singularity ... again
Would it be acceptable to always remain at one side of the "elbow" or does the kins need to handle "elbow both ways" ?

You can't get through the singularity without going to max radius, which rather precludes following the programmed path.
The following user(s) said Thank You: bkt

19 May 2023 21:23 #271694 by bkt
Replied by bkt on topic Singularity ... again
thnks Andy ... two directions is needed .... think is not a problem if we reach max radius .... but with limit in acceleration ....

20 May 2023 09:46 #271720 by andypugh
Replied by andypugh on topic Singularity ... again
The thing is, you need to go to max radius to flip the elbow, even if that isn't the programmed point.
So I think you might need special handling, and even a "flip elbow" HAL pin to make this work. (Including "lying" to the rest of the system about the current controlled point position during the flip.
Maybe a custom M-code that drives to max radius, flips the "flip" pin and then drives back to the current programmed point?

20 May 2023 09:47 #271721 by andypugh
Replied by andypugh on topic Singularity ... again
... or maybe the M code could switch to joint mode and invert the elbow value then switch back?
The following user(s) said Thank You: bkt

20 May 2023 13:02 #271740 by bkt
Replied by bkt on topic Singularity ... again
Normally I use switchkins of dgarret .... sometime my modify ... but after switching to joint never try to change singularity on fly .... switchkins too need a no moove to perform the switch, and need to return to same pos for switch again to world mode .... I can switch to joint mode, go to position on joint mode than switch singularity?? at that point I'm in joint mode .... if change singularity and switch to world again can I have some problem in your consideration? I think not but maybe I'm in wrong.

20 May 2023 13:09 #271741 by bkt
Replied by bkt on topic Singularity ... again
other little things .... some year ago on youtube and in the forum too I see some guys that active freedrive mode on a robot arm ... but not find any in the forum now .... and in youtube not know how i search for find somethings (i'm italian and not know all american world for make an intelligent search) ...and i'm not sure but i seem to remember you had chimed in on the matter for some reason....but i didn't care about those things at the time so i didn't save anything and i remember very badly.

20 May 2023 23:08 #271781 by andypugh
Replied by andypugh on topic Singularity ... again
I have never used non-trivial kins, so bear that in mind when considering my ideas.

I think that your scarakins could have a HAL pin telling it which side of the "elbow" you want to work.

Then an M-code could:
1) Switch to joint mode
2) Switch inver the elbow
3) Set the HAL on so that the kins module now calculates the opposite way.

This does _not_ solve the issue of jogging to the singularity.
It does need you to actively choose the elbow orientation in the `g-code.

I rather suspect that this is close to what the commercial systems do, though they might have clever logic to detect when the flip is needed.
The following user(s) said Thank You: bkt

21 May 2023 10:09 #271809 by bkt
Replied by bkt on topic Singularity ... again
in fact all this could be done automatically ... I don't remember if swtch case statement can be used in the kinematics file successfully .... if else for sure .... in any case thanks I will follow this logic.

having said that you really don't remember anything about the balancing of the joints .... for sure you have to do a pair driving and then use a physical switch to subtract the additional force .... having said that there is a way to make a change of type of piloting? switch for example from position mode to torque mode?

regards