- Posts: 196
- Thank you received: 11
Kinematics... again:/
- thang
- Offline
- Elite Member
-
With this robot, there is at least 2 configs: elbow up and elbow down. Your robot changed config during move
Looking at pumakins.c as an example, how to keep config :
github.com/LinuxCNC/linuxcnc/blob/master...tics/pumakins.c#L140
I saw in kinematic, there is a flag "ifflag" the way you set this flag for elbow is not true.
Please Log in or Create an account to join the conversation.
- chimeno
- Offline
- Elite Member
-
- Posts: 295
- Thank you received: 125
thang wrote: Your kinematic is lacking somethings.
With this robot, there is at least 2 configs: elbow up and elbow down. Your robot changed config during move
Looking at pumakins.c as an example, how to keep config :
github.com/LinuxCNC/linuxcnc/blob/master...tics/pumakins.c#L140
I saw in kinematic, there is a flag "ifflag" the way you set this flag for elbow is not true.
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
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
It is as if the A axis is at 180 degrees, but it isn't.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4793
- Thank you received: 1481
Please Log in or Create an account to join the conversation.
- thang
- Offline
- Elite Member
-
- Posts: 196
- Thank you received: 11
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 :blink: , This might happen because how we put coordinate on robot, that will make Axis A diverse default ( like follow clockwise is increase A)
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
Also: I think that "elbow up" will always be the required solution for this robot.
Please Log in or Create an account to join the conversation.