# Kinematics... again:/

20 Dec 2018 20:31 #122652 by andypugh
Replied by andypugh on topic Kinematics... again:/
I don't think the Y axis is wrong, as such. If you look at the Axis preview it is showing the tool cone _under_ the engraving.
It is as if the A axis is at 180 degrees, but it isn't.
The following user(s) said Thank You: chimeno

20 Dec 2018 20:51 #122655
Replied by Todd Zuercher on topic Kinematics... again:/
Are you sure it isn't your X axis that is backwards?
The following user(s) said Thank You: chimeno

21 Dec 2018 10:51 #122683 by thang
Replied by thang on topic Kinematics... again:/

chimeno wrote:
Hi Thang,
thank you very much for the help, modified the flag "if (* iflags)
q1 = q1; // q1 = -q1 "I'm learning little by little .. I attach the modified file and the screenshot to see the result, now I have to invert the Y axis, where would it be better to do this? in the cinematic model?, thanks Chimeno

If you set this, your robot can only use 1 config.

In your inverse kinematic, you used q1 = acos(cc), exactly there is one more solution that q1 = - acos(cc) ( most of time i use atan2 to caculate inverse kinematic). So we need to know which solution we should use, there is a method that is detect current config ( pumakins is using this).

So in your forward kinematic, we can find current robot config by something like:
cc = (rsq - D1*D1 - D2*D2) / (2*D1*D2);
p1 = acos(cc);
if ( abs(p1 - joint[1]) < 0.0000001)
*ifflag = 1;
In inverse kinematic :
if (!*iflags)
q1 = - q1;

When kinematic is already ok,we better leave it. I think you can invert Y axis in 3D file.

andypugh wrote: I don't think the Y axis is wrong, as such. If you look at the Axis preview it is showing the tool cone _under_ the engraving.
It is as if the A axis is at 180 degrees, but it isn't.

It happened to me too but i dont know how to change offset of it , This might happen because how we put coordinate on robot, that will make Axis A diverse default ( like follow clockwise is increase A)
The following user(s) said Thank You: chimeno

21 Dec 2018 10:56 #122684 by andypugh
Replied by andypugh on topic Kinematics... again:/
I suspect it comes down to a joint axis being reversed. You need to keep your right-hand rule for axis vectors in mind.

Also: I think that "elbow up" will always be the required solution for this robot.
The following user(s) said Thank You: chimeno

21 Dec 2018 19:54 #122719 by chimeno
Replied by chimeno on topic Kinematics... again:/
Hello Andy,
If I think I have an inverted joint as you say, I will try to reassemble everything again following the rule of the right hand.

hi Todd Zuercher,
If possible, I will look at it with more details if I have not followed the rule of the right hand well.

Hello Thang,
Well that was an easy solution to see how he behaved, I will look at what you have explained to me and I can apply it, I am not an expert on this topic but I am going to try it !.

thanks for everything guys, great guys!
Chimeno

03 Jan 2019 20:39 - 03 Jan 2019 20:41 #123426 by chimeno
Replied by chimeno on topic Kinematics... again:/
Hi guys,
I attach a new model according to the rule of the right hand, there are still some problems that comes from the cinematic model, I will try if I can make some changes,
thanks Chimeno

##### Attachments:
Last edit: 03 Jan 2019 20:41 by chimeno.

04 Jan 2019 20:25 #123502 by chimeno
Replied by chimeno on topic Kinematics... again:/
If you set this, your robot can only use 1 config.

In your inverse kinematic, you used q1 = acos(cc), exactly there is one more solution that q1 = - acos(cc) ( most of time i use atan2 to caculate inverse kinematic). So we need to know which solution we should use, there is a method that is detect current config ( pumakins is using this).

So in your forward kinematic, we can find current robot config by something like:
cc = (rsq - D1*D1 - D2*D2) / (2*D1*D2);
p1 = acos(cc);
if ( abs(p1 - joint[1]) < 0.0000001)
*ifflag = 1;
In inverse kinematic :
if (!*iflags)
q1 = - q1;

Hi Thang,
I attach the modified file with your instructions, at the end it has the same elbow effect above, thanks
Chimeno
##### Attachments:

04 Jan 2019 20:30 #123503 by chimeno
Replied by chimeno on topic Kinematics... again:/

andypugh wrote: Here is a discussion about the kinematics of the actual machine in your first post:
sourceforge.net/p/emc/mailman/emc-users/...ail.com/#msg26845536

Missing from that conversation are several off-list messages that Viesturs and I exchanged. He did get quite a long way down the line of making a version of genserkins that handles sliding joints, I have attached the modified genserkins.c and gensekins.h files that we came up with, but be aware that they don't necessarily work

In the end Viesturs used a modified version of scarakins, called robotkins.c for that welding robot, I have also attached that.

Hello Andy,
the modified genserkins file that you posted here that contains linial boards, works, or is it simulated? Do you need important modifications to make it work?
Thank you
Chimeno

04 Jan 2019 20:49 #123504 by andypugh
Replied by andypugh on topic Kinematics... again:/

chimeno wrote: the modified genserkins file that you posted here that contains linial boards, works, or is it simulated?

The kinematics file would be identical between a real and a simulated config, so I don't understand the question.

04 Jan 2019 21:57 - 04 Jan 2019 21:59 #123511 by chimeno
Replied by chimeno on topic Kinematics... again:/

andypugh wrote:

chimeno wrote: the modified genserkins file that you posted here that contains linial boards, works, or is it simulated?

The kinematics file would be identical between a real and a simulated config, so I don't understand the question.

Hello Andy, I'm sorry if I did not explain myself well, I say if modified genserkin is tested and it works?
regards
Chimeno
##### Attachments:
Last edit: 04 Jan 2019 21:59 by chimeno.