Hi Jeff,
Sorry, I probably didn't phrase it right. I understand that deceleration
on soft limits for joints on a non cartesian machine is a computational
nightmare. What I am after is to specify soft limits in world space,
just like a cartesian machine. I am interested in it for my lathe but it
has applications for many machine types. For example take a hexapod.
Depending on the Z position the head can try to move way outside the
available machining envelope without hitting soft or hard limits on the
joints. You could quite easily end up over stressing the pivot points or
hitting the structure of the machine. If you can specify soft limits in
world space (i.e stay in this XYZ box) this is less likely to happen.
This code is already in place for use on cartesian machines but it is
disabled for non-cartesian machines.
IMO soft limits on joints aren't nearly as useful. All they do is
replace hard switches. Again IMO you should have hard limit switches for
anything other than a very small machine so no matter what happens you
won't run into the end stops.
Les
On 03/07/2017 14:52, Jeff Epler wrote:
No, it's not currently possible. It would be a welcome topic for
improvement.
Right now, kinematics is confined to the realtime trajectory planner,
so nothing is known about it at the time soft limits are being
enforced in task.
A naive approach would be to put a copy of kinematics into task; for
each motion that task considers for soft limits, divide it up "finely"
and make sure each of the points along the motion, it has a kinematics
solution. However, this is probably going to be computationally
intensive, since you're doing the work of kinematics twice.
I think a plausible way to do this is to allow definition of arbitrary
working volumes using a standard format like .stl. Then, task would
have to answer a much simpler problem: whether any part of the motion
is outside this defined volume. However, it might be wise to use an
existing library to perform this test, rather than writing an
original implementation in LinuxCNC. For example, CGAL's
Side_of_triangle_mesh can tell you whether a particular point is on
the interior or exterior of the volume.
Of course, while thinking about this it will also be a good time to do
something about the related issue which can be seen on trivkins
machines: some arcs that go outside of soft limits aren't detected by
task. I think this is because only the two endpoints are tested
(which works fine with lines and convex working volumes, but doesn't
work with circular motion or non-convex working volumes):
https://github.com/LinuxCNC/linuxcnc/issues/80
For arcs which come near the edge (where the AABB of the arc is not
entirely inside the working volume), I suspect a strategy of dividing
up the arc will be neessary to fix this for the complex working volume
case. And remember, "arcs" now includes multi-turn helices which can
additionally be rotated. Oh yeah, and there are NURBs too, even if
nobody uses them.
Jeff
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users