- Posts: 5
- Thank you received: 1
TCP 5-axis kinematics
- r.lol
- Offline
- New Member
-
Any mathematical function can be written in either cases.
Further I also have planned to have variables passing along with G12.1 Pxx Qx.xx which can be transported to Kinematics switch method.
One can call G12.1 in order to switch between 2 modes.
Please Log in or Create an account to join the conversation.
- r.lol
- Offline
- New Member
-
- Posts: 5
- Thank you received: 1
automata wrote: Hi,
We have developed a patch for linuxcnc 2.8pre with joints/axes separation which allows you to switch between 2 different kinematics which will allow the axes positions to be updated from the new kinematics during the switch.
The new axes positions are calculated from the current joint positions. You donot need B,C axes to be at 0 position during the switch.
I will upload this patch to github in the near future.
We have been using this patch for a non-standard machine developed for which we needed G2,G3 arc commands to be used in X,Y axes in one configuration and in X,B axes in another configuration from the same Gcode file.
We have selected to do it via G12.1 P,Q (new gcode added to the gcode interpreter). So the patch is a little long and touches multiple files.
Good work on the 5 axis kinematics and implementation. Impressive...
-automata
Here's the branch .
Please Log in or Create an account to join the conversation.
- 3D-Master
- Offline
- Elite Member
-
- Posts: 238
- Thank you received: 5
Kindly checkout Switch Kins Branch I've added a new gCode G12.1, which invokes a switch in kinematics.
Any mathematical function can be written in either cases.
Further I also have planned to have variables passing along with G12.1 Pxx Qx.xx which can be transported to Kinematics switch method.
One can call G12.1 in order to switch between 2 modes.
so basically if i position a tool relative to the center of rotation (z/c axis) for example it shows x50y0 then i enable TCP, rotate 90 degrees, disable TCP and the readout shows X0Y50? this is what i was hoping forever Linuxcnc should be able to do.
how would that work? specify two kinematic files in the hal/ini? or call the kinematics like this G12.1 <5axis>?
but most importantly, how do i update to 2.8 and would my machine config work with 2.8?
i need a video demonstration asap, if anyone could share i would be very happy!
thanks
Please Log in or Create an account to join the conversation.
- automata
- Offline
- Premium Member
-
- Posts: 105
- Thank you received: 93
Your expectation is on the correct lines but slightly off.
Please bear my pedagogy for a bit, but I believe a few lines of explaination will bring the problem into a good perspective for the casual reader too.
We can liken the machine operation to that of a Robot. There are 2 reference cartesian coordinate frames (with rotation matrix), one attached to the base (World coordinates) and one attached to the Tool tip (tool frame).
The essential objective of kinematics (both forward and inverse) is to transform the tool frame coordinates (expressed in the world frame coordinates) into the joint frame (actual positions of each joint) and vice-versa).
In the case of using RTCP, the position to achieve is specified in cartesian/task coordinates attached to the workpiece (similar to the tool position of the robot). This position needs to be transformed to the joint coordinates for the machine to move. Further for comparison, the joint coordinates of the machine need to be transformed into the cartesian frame attached to the workpiece (tool tip in the robot analogy).
So, we have Joints and axes which are related via kinematics. At startup J0 <-> X, J1<->Y, J2<->Z, J3<->A, J4<->B, J5<->C.
So your expectation for transforming between the two frames is:
1. Start machine in joint coordinate space. Move tool to J0 to 50.
2. Switch kinematics to task space, and observe that X=50, Y=0.
3. Switch kinematics back to Joint space. Move J5 by 90 degrees.
4. Switch to task space and observe that X=0,Y=50.
This is possible with current implementation of kinematics in linuxcnc without any patches applied.
Can you clarify if you want something different?
The patch we have made allows switching between two different kinematics applied to the same machine. Of course you can consider the joints positions as trivial kinematics and the machine kinematics as something else. But point remains that linuxcnc has had the capability of switching between joints(trivial) and task kinematics atleast since the merge of joints axes branch.
Regards,
-automata
Please Log in or Create an account to join the conversation.
- 3D-Master
- Offline
- Elite Member
-
- Posts: 238
- Thank you received: 5
the problem is not switching kinematics at all, the problem is that the axis have to be at zero (at least form my knowledge, might have to loook into J0-J5) to not trigger a following error. I was able to switch trivial and 5 axis kinematics with my beaglebone but the axis needed to be at zero and this is (at least for me) very disadvantageous because the Cam software might not always go back to ABC=0 before disabling TCP and also i want to write a subprogram to use a touch probe to calibrate the exact center of rotation. So if i use the normal coordinates (XYZABCUVW) i want to stay with them the whole program if you understand right.
thanks
Please Log in or Create an account to join the conversation.
- r.lol
- Offline
- New Member
-
- Posts: 5
- Thank you received: 1
Take a glance at switchKins branch also uploaded here is a video demonstrating switch between kinematics right within a NGC program irrespective of where currently machine is positioned.
Branch is also having required files:
ini
Please Log in or Create an account to join the conversation.