Tool offsets and kinematics
13 Dec 2019 10:47 - 13 Dec 2019 14:13 #152597
by ross_dev
Tool offsets and kinematics was created by ross_dev
Hi
As our application is not strictly machining, we have some end effectors we would like to use which are not nice simple cylinders like milling cutters or drill bits etc, and which do not rotate in a spindle. One of them features a rigid offset in the x and y axes. If the final joint were facing down, picture an additional right angle sticking out of the final joint, with the horizontal part at the top and the upright part pointing at the floor.
I had hoped that the tool offsets for y and z in the tool table would handle this, and be passed to the kinematics as well, however I am now not certain if this is built in behaviour or not.
By way of example, I want to say, change from a 'normal' straight tool with only a z offset, then pick up this other tool with the x and y offset, and have linuxcnc modify the position and orientation of the other joints accordingly to take account of it.
Is this achievable at present? If not, what would be likely targets for modification?
Lastly is there a way to have vismach modify the drawn tool position on the fly? Or would it require modification of vismach.py somehow? Just looking into my options, obviously if its built in that would be nice!
Cheers
NB This is running in vismach at present, in case I futzed around that a little ....
Also I am in 2.8 pre
As our application is not strictly machining, we have some end effectors we would like to use which are not nice simple cylinders like milling cutters or drill bits etc, and which do not rotate in a spindle. One of them features a rigid offset in the x and y axes. If the final joint were facing down, picture an additional right angle sticking out of the final joint, with the horizontal part at the top and the upright part pointing at the floor.
I had hoped that the tool offsets for y and z in the tool table would handle this, and be passed to the kinematics as well, however I am now not certain if this is built in behaviour or not.
By way of example, I want to say, change from a 'normal' straight tool with only a z offset, then pick up this other tool with the x and y offset, and have linuxcnc modify the position and orientation of the other joints accordingly to take account of it.
Is this achievable at present? If not, what would be likely targets for modification?
Lastly is there a way to have vismach modify the drawn tool position on the fly? Or would it require modification of vismach.py somehow? Just looking into my options, obviously if its built in that would be nice!
Cheers
NB This is running in vismach at present, in case I futzed around that a little ....
Also I am in 2.8 pre
Last edit: 13 Dec 2019 14:13 by ross_dev.
Please Log in or Create an account to join the conversation.
13 Dec 2019 13:37 - 13 Dec 2019 14:22 #152601
by ross_dev
Replied by ross_dev on topic Tool offsets and kinematics
Here's an example of what I am trying to do. This right angled shape would be just one tool I want to change to, with the two pieces being
1) automatic cascading of tool offsets to kinematics
2) Getting the trace in vismach to match (tool model not so important)
The tooltip describes an arc, rather than pivoting about it. My tool is 200 units in the z and y, so I changed this section in the 5axisgui to:
Its entirely likely I have 100% misunderstood the purpose of this part however. Out of curiosity, where is self.comp.tool_length defined? I noticed that the pin :tool-len reflects the value in the tool table (7.84) rather than the 200 input here.
I use T4 M6 G43 when loading the tool.
Here's the tooltable. I tried putting inches and mm (200mm, ~7.87 inches). I am using tool 4
1) automatic cascading of tool offsets to kinematics
2) Getting the trace in vismach to match (tool model not so important)
The tooltip describes an arc, rather than pivoting about it. My tool is 200 units in the z and y, so I changed this section in the 5axisgui to:
from vismach import *
import hal
import math
import sys
# give endpoint Z values and radii
# resulting cylinder is on the Z axis
class HalToolCylinder(CylinderZ):
def __init__(self, comp, *args):
CylinderZ.__init__(self, *args)
self.comp = comp
def coords(self):
return -self.comp.tool_length, 0, 200, 200
Its entirely likely I have 100% misunderstood the purpose of this part however. Out of curiosity, where is self.comp.tool_length defined? I noticed that the pin :tool-len reflects the value in the tool table (7.84) rather than the 200 input here.
I use T4 M6 G43 when loading the tool.
Here's the tooltable. I tried putting inches and mm (200mm, ~7.87 inches). I am using tool 4
Last edit: 13 Dec 2019 14:22 by ross_dev.
Please Log in or Create an account to join the conversation.
18 Dec 2019 16:23 #152852
by ross_dev
Replied by ross_dev on topic Tool offsets and kinematics
Hi
Looks like I have made a bit of progress, I can now get the tool offset to show up by piping the HAL pin to the vismach script, updating the tool size in vismach and the tool point.
I assume now something clever needs to happen with passing that new length to a kinematics script, I note that xyzac-trt has some of this built in so will raid that for guidance!
Cheers
Looks like I have made a bit of progress, I can now get the tool offset to show up by piping the HAL pin to the vismach script, updating the tool size in vismach and the tool point.
I assume now something clever needs to happen with passing that new length to a kinematics script, I note that xyzac-trt has some of this built in so will raid that for guidance!
Cheers
Please Log in or Create an account to join the conversation.
07 Jan 2020 20:38 #154252
by andypugh
Replied by andypugh on topic Tool offsets and kinematics
Did you get anywhere with this? I am curious whether the tool offsets (XYZ) are in world coordinates or if they rotate with the tool Z.
I rather suspect the former, but have never had a machine where it mattered.
I rather suspect the former, but have never had a machine where it mattered.
Please Log in or Create an account to join the conversation.
10 Jan 2020 11:02 - 10 Jan 2020 11:34 #154534
by ross_dev
Replied by ross_dev on topic Tool offsets and kinematics
Hi Andy
I'm not too sure. I noticed with the vismach xyzac machine that the offset is sent to the kinematics module via the haldata struct and a relevant pin, and then just uses it in the forward and inverse kinematics calculations. That was the way I intended to handle it.
As LCNC appears to continually call the entire kinematics script, I am also looking at an alternative of creating three sets of kinematics via IKFast for each of our tool types, each with unique offsets, and having LCNC switch between them as the tool number changes.
I'm not too sure. I noticed with the vismach xyzac machine that the offset is sent to the kinematics module via the haldata struct and a relevant pin, and then just uses it in the forward and inverse kinematics calculations. That was the way I intended to handle it.
As LCNC appears to continually call the entire kinematics script, I am also looking at an alternative of creating three sets of kinematics via IKFast for each of our tool types, each with unique offsets, and having LCNC switch between them as the tool number changes.
Last edit: 10 Jan 2020 11:34 by ross_dev.
Please Log in or Create an account to join the conversation.
Time to create page: 0.087 seconds