5 axis kinematics implementation
25 Oct 2024 13:37 #313212
by rajsekhar
5 axis kinematics implementation was created by rajsekhar
I am configuring a spindle tilt (AB tilt) type 5axis (XYYZABC) machine, where C axis is optional rotary head.
Joint0->X, Joint1->Y, Joint2->Y1, Joint3->Z, Joint4->A, Joint5->B, Joint6->C
HAL, INI file attached.
Now I want to add TCP mode. I modified a kinematics component file (atiltbtiltkins.c; attached). I am not sue whether that is correct or not, need testing.
But how to implement/ activate this kinematics file?
Joint0->X, Joint1->Y, Joint2->Y1, Joint3->Z, Joint4->A, Joint5->B, Joint6->C
HAL, INI file attached.
Now I want to add TCP mode. I modified a kinematics component file (atiltbtiltkins.c; attached). I am not sue whether that is correct or not, need testing.
But how to implement/ activate this kinematics file?
Please Log in or Create an account to join the conversation.
25 Oct 2024 20:17 #313231
by bkt
Replied by bkt on topic 5 axis kinematics implementation
keep a look into customkins component by dgarret .... you found it onto rtlibrary folder ...
Please Log in or Create an account to join the conversation.
28 Oct 2024 13:12 - 28 Oct 2024 13:15 #313366
by rajsekhar
Replied by rajsekhar on topic 5 axis kinematics implementation
Well, I implemented HeadHeadTCP mode.
I modified xyzbc-trt kinematics .c file and made my kins.c file(attached)
Used sudo halcompile --install command.
However, more importantly, I played with this file for some time and understood the concept how kinematics actually works. I am describing my realisation below. In case I made some thing wrong, corrections are welcome.
The kinematics works as follows:
Actually there are two components, Forward kinematics and Inverse kinematics.
Without going in deep into theory of the above, what I understood during implementation, is that in Inverse kinematics, we give command to the joints to follow a particular geometry by, of course, mathematical (in most cases trigonometric) formula in addition to the G-code command.
For example, in my Head-Head tilting type machine i.e my cutting nozzle/spindle is on A and B rotating axes. So taking Lt as the pivot length, if A axis rotate by ’thA’ radian (or degree for simple understanding), the Z axis must compensate and more specifically shall move to Z- to maintain the tip point height by Lt*cos(thA). Similarly X axis shall move by Lt*sin(thA).
Note that, cos(thA) is positive within 0~90 degree irrespective of thA positive or negative. Hence, if A axis rotates in either direction, Z moves down. And similarly for X axis, if A is positive, X moves positive and vice versa and tool tip is at fix point. This is simple trigonometry.
Same for B axis rotation. In that case, Z and Y axis moves.
Now, in the DRO reading on gmoccapy/axis gui, X, Y and Z movement is not shown if we rotate A and/or B, although the motor rotates physically and machine moves. This is done by the Forward kinematics. That is why the equation is forward kinematics is exactly opposite to inverse kinematics.
If you remove the forward kinematics corrections, for testing purpose only, you find the DRO in GUI show the X, Y and Z movements. But in TCP mode that is not our intention, hence we forcefully neglect such movement in DRO by forward kinematics.
Hope this will help in understanding of ‘how the kinematics work’ and ‘what kinematics do’ sort of question that myself had in my mind for a long time.
I modified xyzbc-trt kinematics .c file and made my kins.c file(attached)
Used sudo halcompile --install command.
However, more importantly, I played with this file for some time and understood the concept how kinematics actually works. I am describing my realisation below. In case I made some thing wrong, corrections are welcome.
The kinematics works as follows:
Actually there are two components, Forward kinematics and Inverse kinematics.
Without going in deep into theory of the above, what I understood during implementation, is that in Inverse kinematics, we give command to the joints to follow a particular geometry by, of course, mathematical (in most cases trigonometric) formula in addition to the G-code command.
For example, in my Head-Head tilting type machine i.e my cutting nozzle/spindle is on A and B rotating axes. So taking Lt as the pivot length, if A axis rotate by ’thA’ radian (or degree for simple understanding), the Z axis must compensate and more specifically shall move to Z- to maintain the tip point height by Lt*cos(thA). Similarly X axis shall move by Lt*sin(thA).
Note that, cos(thA) is positive within 0~90 degree irrespective of thA positive or negative. Hence, if A axis rotates in either direction, Z moves down. And similarly for X axis, if A is positive, X moves positive and vice versa and tool tip is at fix point. This is simple trigonometry.
Same for B axis rotation. In that case, Z and Y axis moves.
Now, in the DRO reading on gmoccapy/axis gui, X, Y and Z movement is not shown if we rotate A and/or B, although the motor rotates physically and machine moves. This is done by the Forward kinematics. That is why the equation is forward kinematics is exactly opposite to inverse kinematics.
If you remove the forward kinematics corrections, for testing purpose only, you find the DRO in GUI show the X, Y and Z movements. But in TCP mode that is not our intention, hence we forcefully neglect such movement in DRO by forward kinematics.
Hope this will help in understanding of ‘how the kinematics work’ and ‘what kinematics do’ sort of question that myself had in my mind for a long time.
Last edit: 28 Oct 2024 13:15 by rajsekhar.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 2
05 Nov 2024 18:50 #313840
by papagno-source
Replied by papagno-source on topic 5 axis kinematics implementation
Hi please can send pics for understand geometry de machine ?
Please Log in or Create an account to join the conversation.
17 Nov 2024 16:47 #314675
by rajsekhar
Replied by rajsekhar on topic 5 axis kinematics implementation
Well, machine is not complete yet..I will share may be within a month
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds