#linuxcnc-devel Logs
Feb 03 2022
#linuxcnc-devel Calendar
02:48 AM andypugh: cradek: The “whiles” just seem to exist to sort things out when the result of the atam2 crosses +- 180 degrees. It is based only on the result of the atan2 and the atan2 is based only on the arc start and end (X) (Y) coordinates.
02:55 AM andypugh: (full circle)
02:57 AM andypugh: Note that the _important_ change is in _posemath, that is where actual circle _moves_ are worked out. The stuff in gcodemodule is purely the preview. But it is obvoiulsy better if the two generally match. (it might be impossibel to ensure that theu always _exactly) match)
04:44 AM alex_joni: Tom_L: sorry, was already gone.. had a request for it from a commercial company
04:44 AM alex_joni: was wondering myself why
05:02 AM Tom_L: heh
05:02 AM Tom_L: it would be kinda interesting to see all the changes thru the years
09:54 AM smoe: Hi!
09:58 AM Lcvette[m]: o/
10:09 AM cradek: andypugh: I should try to get a backtrace from that posemath error about sqrt
11:36 AM -!- #linuxcnc-devel mode set to +v by ChanServ
01:17 PM andypugh: cradek: https://github.com/LinuxCNC/linuxcnc/blob/master/src/libnml/posemath/_posemath.c#L108
01:17 PM andypugh: I accidentally left debug on.
01:26 PM andypugh: cradek: But: It seems to have been caused by me calling pmCartDisp, which really shouldn’t cause a problem.
01:26 PM andypugh: Because that squares the numbers..
01:34 PM andypugh: OK, the “large negative number” is in fact NaN. X > SQRT_FUZZ will fail if x is NaN.
05:20 PM andypugh: cradek: OK, the issue is when the dot-product of the centre-start and centre-end vectors / radius == 1 then the acos gives a circle angle of exactly zero. But in your example the actual distance travelled is more than the CART_FUZZ so my new test fails. Then, in blendmath, there is an unguarded divide-by-angle giving us a NaN.
05:21 PM andypugh: https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/tp/blendmath.c#L1767
05:22 PM andypugh: Actually, with debug turned off, this is probably harmless, a result of zero is returned, and that’f fine.
05:27 PM andypugh: But your example code does show a case where the preview and tp differ, if you take a couple of zeros out.
05:54 PM Lcvette[m]: what are you guys working on, looks interesting
05:56 PM Lcvette[m]: is this for the arc blending functionality?
06:00 PM Lcvette[m]: https://youtu.be/LDMKMx2aO5E?t=192
06:03 PM Lcvette[m]: i had some issues trying to resolve some arc blending wierdness that I ultimately gave up on and rewrote the program to just raise and make straight line repositioning moves. you could literally see the machine shake from the pauses on the g0 linear segment moves that i thought would be turned into blended arcs. you can hear it right around video marker : 3:20 marker in the linked video.
06:03 PM Lcvette[m]: can see the dorrs shake it was so violent
06:03 PM Lcvette[m]: 😲
11:05 PM -!- #linuxcnc-devel mode set to +v by ChanServ