Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-05 Thread theman whosoldtheworld
Personally, i insert more limitation in my kinematics for generate
somethings similar to "soft limit" ... but the only way is possible to do
thes is with a if statement ... at every cicle of kinematic save world->z
to your var than control if yourvar is equal or not to your limit  at
these point you can emit a asignal or use last value or yourvar to "stop"
the joint[2] at yourvar position. No other possibilities ... I think is not
a good work for developper make a func for addictional soft limit working
only for cartesian makines  and make a funk working with all kinematics
is very difficult (or to speack better, a very long job) ...

I think we should already be very happy with everything that the developers
we already do to improve and make lcnc available as it is now.

bkt

2017-07-03 21:22 GMT+02:00 Les Newell :

> 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
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 

Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-04 Thread Mark

On 07/03/2017 09:55 PM, Jon Elson wrote:
Go easy on yourself!  EMC was a fairly complicated piece of software 
when we took it over from NIST.  It has grown quite a bit in 
complexity since then.  Many deficiencies or limitations have been 
corrected by very sharp programming since then (HAL, Joints-axis and 
the new trajectory planner, for instance) but these have increased 
complexity.  I was only competent in a small area of the code back 
then (mostly servo region) and work hard to just keep aware of what is 
new.


As for looking dumb, I have totally given up!  I KNOW that what I 
don't know is out there for everybody to see, but I still get great 
use out of LinuxCNC, and HATS OFF to the guys who really know it so well!


Jon


I know how you feel.  I feel pretty clueless compared to guys like Andy, 
John, Seb, Sam and a whole bunch of others.  I try to absorb the 
knowledge here like a sponge, but my mind is more like a sieve. ;-)


Mark

--
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Jon Elson

On 07/03/2017 03:02 PM, Les Newell wrote:
Aw hell, I've done it again. My fault. I didn't realize 
there were two sets of limits. My config was automatically 
converted to the new format and I didn't notice limits 
appear in two places now. When I changed my limits I ended 
up only changing the joint limits, not the axis limits.


I've been doing a good job of making myself look dumb 
these last few days.


Go easy on yourself!  EMC was a fairly complicated piece of 
software when we took it over from NIST.  It has grown quite 
a bit in complexity since then.  Many deficiencies or 
limitations have been corrected by very sharp programming 
since then (HAL, Joints-axis and the new trajectory planner, 
for instance) but these have increased complexity.  I was 
only competent in a small area of the code back then (mostly 
servo region) and work hard to just keep aware of what is new.


As for looking dumb, I have totally given up!  I KNOW that 
what I don't know is out there for everybody to see, but I 
still get great use out of LinuxCNC, and HATS OFF to the 
guys who really know it so well!


Jon

--
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Les Newell
Aw hell, I've done it again. My fault. I didn't realize there were two 
sets of limits. My config was automatically converted to the new format 
and I didn't notice limits appear in two places now. When I changed my 
limits I ended up only changing the joint limits, not the axis limits.


I've been doing a good job of making myself look dumb these last few days.

Les

On 03/07/2017 20:32, Andrew wrote:

I definitely remember soft world limits on my hexapod in master branch.
So I'm surprised why you don't observe that.
It should obey the world limits defined in AXIS_ sections.

WBR,
Andrew



--
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Andrew
2017-07-03 22:22 GMT+03:00 Les Newell:

> 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


I definitely remember soft world limits on my hexapod in master branch.
So I'm surprised why you don't observe that.
It should obey the world limits defined in AXIS_ sections.

WBR,
Andrew
--
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Les Newell

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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Gene Heskett
On Monday 03 July 2017 09:52:30 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.
>
I am going to try Jeff, if I can figure out how to actually use them. The 
manpage is sorely lacking in an explanation of how it keeps track 
of "points" when you feed it a more than 2 sets of points. I have an SS 
rifle barrel that needs to lose some weight, but I don't envision doing 
those long sweeping curves using just arcs with 20 yard radii. NURBS 
looks like it would blend them if I understand it correctly, but I 
probably don't. :( If, after the next master update, the docs for G5 and 
G5.x were more explanatory than they are now, I'd be very pleased. Like 
what does xy, ij and pq actually control when the 2nd, 3rd, 4th etc sets 
of data are fed to G5 and family. What are the interactions?  And how 
can I make that work on a lathe, where G18 is probably in effect.

If I could understand that, the special config using y connected to the z 
motor could be hacked up. That way it could run in G17 mode maybe?
Confusing, but sortable I believe.

> 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


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Jeff Epler
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Les Newell

I'm running Git master at the moment.

les

On 03/07/2017 12:45, Andrew wrote:

What is your LinuxCNC version?

2017-07-03 13:34 GMT+03:00 Les Newell:


Is there an option to make soft limits to work in world space on a
non-cartesian machine? I notice now I am using my kinematics module soft
limits apply to joints rather than axes. In cartesian mode the machine
comes to a graceful halt if you try jogging into a limit. In non-cartesian
mode the machine comes to an instant halt which can be problematic.


--
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


Re: [Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Andrew
What is your LinuxCNC version?

2017-07-03 13:34 GMT+03:00 Les Newell:

> Is there an option to make soft limits to work in world space on a
> non-cartesian machine? I notice now I am using my kinematics module soft
> limits apply to joints rather than axes. In cartesian mode the machine
> comes to a graceful halt if you try jogging into a limit. In non-cartesian
> mode the machine comes to an instant halt which can be problematic.
>
--
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


[Emc-users] Soft limits with non-cartesian kinematics

2017-07-03 Thread Les Newell
Is there an option to make soft limits to work in world space on a 
non-cartesian machine? I notice now I am using my kinematics module soft 
limits apply to joints rather than axes. In cartesian mode the machine 
comes to a graceful halt if you try jogging into a limit. In 
non-cartesian mode the machine comes to an instant halt which can be 
problematic.


Les

--
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