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

Reply via email to