hey jmk_away, are you around?
no, he's not here
ok - let me know when he returns :)
hey - a question on the time delay component
this is a simple one - I assume that a single update function is preferable to a zillion separate ones?
you mean one that updates all delays, vs one per delay?
that is a dilemma
heh - flexibility vs simplicity
I can do the group thing like you did with the debounces
(which is what I'm basing the code on)
nah, that smacks of cluge
do all in one
too much grasshopper pie ;)
if I ever get that "automatic dependency checker and addf generator" working, then I'd want one per component
but that is in the future
not that far, I was thinking emc2.4 maybe
that would be cool
however... (there's always a however)
I really want to do the hal refactor, just need to make the time
yep - time is always a problem
whats the "however"
well - I suppose it doesn't really matter at this point, since you can't change functions while threads are running
actually you can
you can do addf while its running
does it actually add the function?
I thought it wouldn't do that
maybe I'm misremembering
but I guess it must - you can add scope_rt to a running emc
I want to double check that I did it in a thread safe way
hal threads are started during the initialization of emc, right?
yeah, its thread safe, the next and previous links in the new funct struct are set before any of the links in the original list point to the new entry
the RT code follows the list in one direction only, so it either arrives before the new entry is linked (and doesn't run that funct) or after (and does run it, and then safely moves on to the next one)
is the struct protected by a semaphore or the like?
by a mutex, but that is to prevent simultaneous access for things like "show", "addf", etc
the RT code can run even tho halcmd holds the mutex
ok - so multiple halcmds simultaneously doing addf will fail or block?
but the insert operation itself is atomic
block, until the first one finishes
true - it should be one next pointer modification
see hal_lib.c line 1669
though you'd have unpredictable function ordering ;)
if you had two addfs at the same time, yes
anyway - that was the "however" - if threads are running, you may need to swap the execution order due to any pin connection
that could be a real PITA
yes, it could
actually, it doesn't matter if threads are running, you still need to reorder (or run the ordering algorithm) for every pin connection made
unless you delay all that until "start"
if you have a signal chain like A->B->C->D->E, and B and D were both delay blocks, that adds a delay of one period
yes, if there is an auto-sequencer, it would have to re-evaluate after any signal-pin connection
that would depend on whether B and D are in ascending order or descending order in the delay list
in that case, to avoid messiness with relinking on the fly, I'd probably have two lists of functions, one active, one scratch
ok - in the scenario where they have independent update functions
with C inbetween, it doesn't matter what order they are within the one big function, there is no way for C to run after B and before D
ah - right
anyway, for now we probably want to do "all in one", or do the group kluge, to keep the user from going batty with addfs
in the future when addfs are automagic, then one function per block
I'll do them all at once - this is a ladder like thing
so they'd expect everything to be read, then operated on, then written
* jmk_away hides
always joining after bedtime in the east ;)
yeah, I was busy this weekend
do you guys beleive it's possible to express a kinematics transform with a matrix?
certainly in some cases, but not all
yeah, that's what I thought
as long as the matrix is of arbitrary size, probably
some kins transforms don't have any closed form solution, and need iterative approaches
along with initial guesses to tell it which side of a discontinuity it is on
fenn is trying to do some generic kinematics stuff, but I think he is going to spend a lot of time for not much results
hmm, I wonder if the line between close form and open form kins is serial vs. parallel
do you have any recommended reading on this stuff?
now that I think about it, I suspect that any series structure can use a transformation matrix (closed form)
as long as you do a separate transform for each joint, you can probably get a closed form solution for any physically realizable machine
what about the hexapod case?
ok - maybe not ;)
here you have several joints that limit each other
that may be the serial vs parallel think jmk is talking about
seems like multiple equations
there are even series configs that have discontinuities
like the scara robot
yeah, maybe elbow up/down type stuff
is there a photo of the scara somewhere?
yeah, I think fenn is barking up the wrong tree, but I don't want to discourage him
did you see the cybaman thing soemone (tomp?) posted earlier?
[03:10:47] <SWPadnos> http://www.cybamantech.co.uk/cyba/?page=cybaman
[03:11:02] <jmk_away> http://www.20sim.com/webhelp4/gettingstarted/Scara2.gif
that thing is cool (the tomp one)
yeah, pretty crazy
scara has two rotary and one linear joint
ok - the discontinuity is due to a physical limitation (no slipring), right?
look at the pic
and the tool will bind if you try to spin the second rotary joint too far
suppose you want the tool to centerpost distance to be less than the maximum
or the minimum ;)
that means the middle joint needs to be bent (elbow, sort of, but at 90 deg to a normal elbow)
so which way do you bend it?
answer (probably) the same way it was bent 1mS ago
it's not that there's a discontinuity, you calculate the middle joint angle to make the hypoteneuse the desired length
but the middle joint could be bent into or out of the paper
you run into a problem if the base rotation joint reaches a limit
do you guys see much value in generalized arbitray kinematics (if it can even be done)??
hey, we're not discouraging what you are doing (too much), so let Fenn have his fun
I suspect that the mathematics knowledge needed to get a generalized matrix (if it's even possible) is way greater than the fairly simple polar / cartesian math needed now
yeah, I'm going to let him try, but I don't think he's going anywhere
I could write a kins module for the SCARA, but damned if I could figure out some closed form matrix transform for it
fenn wants to build data structures that represent the joints and links between them
I could probably do a matrix that given joint angles would give you end effector position and orientation, but not the other way around
then he wants to traverse it and build the matrix
right - and not all matrices are invertible
(if that would even give you the reverse transform)
yeah, this isn't easy
the matrices I was thinking of transform from end effector coords to world coords, and are invertable (world to end effector)
I helped him with data structs, but I don't know the math well enough, my gut says it's going to be very difficult if not impossible
but the joint angles are used to generate the matrix
so the matrix changes with every pose - ick
sound ick to me
sines and cosines - the video game and 3D graphics boys do that in their sleep
I could hand off the problem to my mother, but I'm not sure we'd get an "engineering" answer ;)
what good is the matrix if you need a new one for each pose?
I've got a library of 3D transform math tucked away somewhere
and posemath has some of that already
petev: the matrix isn't very attractive for this
tell fenn that
in 3D graphics, you generate one matrix for an object, then convert many points from object space to world space to render the object
then you move the object (modify the matrix) and repeat for the next frame
maybe we should be using Cg or the like ;)
here we only care about 1 point really, the end of the tool
(maybe 3 points, if you wnat to capture tool orientation as well as position)
right - so making a matrix (which basically means calculating the end point), so you can run it through matrix math to get the real answer, seems a bit wasteful
though with tool shape and obstacle avoidance, it may prove useful
what do you guys think of the joint accel/velocity limits for rotary robots?
there are advantages
you can generate a matrix for each joint, then contcatenate them
seems like they vary a lot in world space depending on joint position
jmk: that's what fenn wants to do
sorry pete, was responding to SWP
no - the limits are the same (at the moment), but the end effector speed varies
depending on position
swp: seems like on a rotary, the limits in world space would be sin/cos related
to do the limits, you need to be able to compute derivatives of the kins transforms
hmm, for TP seems like you need small cubes of limits in cartesian world space, no?
well - the ini file isn't really clear on joint vs. world corrdinates
heh - +_EMC_+ isn't really clear on joint vs. world coords
you put an axis_0 accel or vel limit there, does it apply to the axis or the joint?
swp: the TP seems to use them as world
so do we want EMC to handle non-trivkins correctly?
sure, but we need to prioritize that with all the other things we want it to do
I would say yes ;)
(one of which is not confuse the living hell out of the 95% of users who have trivkins)
then we really need to think about the whole TP and kins stuff
how else can you make the TP generic, other than to give it a cartesian map of joint limits?
are you talking about position, velocity, or accel limits?
yeah, cutting cartesian space into cubes and assigning them
no matter what size cube you choose, it will be too small, and too big (at the same time)
figuring out world-based limits is harder for non-trivkins machines, I'm not sure there's any way around that
why do you say that? it may not be optimal, but it seems like it would work
the cubes would depend on the kins
consider a rotary table
for trivkins, one big cube
motorized, of course
too small as in you've got 20 bajillion of them and have RAM/speed issues, too big as in your work envelope is a jagged approximation of the real thing
the effective cutting load varies depending on the radius
radius from center of table to tool
jmk: a semi jagged approx may not be bad with conservative limits
also, it severely depends on the mass of the object, and its shape
there are more than just position limits
swp: mass is out, we're talking kins, not dynamics
assume the rotary table with a radial linear axis above it, and another linear for Z
so kin limits need to be conservative to account for mass changes
to cut a straight line thru the center of the table, the rotary needs to go to infinite speed as you pass thru center
lines near the center need high but not infinite speeds
net result, the velocity limit in world coords varies based on where you are
right, that's why cubes with limits
and you have to check the limits in every cube your path passes thru
yes, but that's not hard
you can use the graphics clipping algos
even better - you may not know what cube you're in until you've done the inverse kins
we are assuming we start in world space
and the cubes are in world space
I think the problem will just be size of the cube data - this isn't a n^2 problem (which is bad enough) it is n^3
and 99% of the cubes will have uninteresting data in them
jmk: agreed, but given how loose kins are compared to dynamics, do you really think we would need that many?
there are algos (again from graphics) for subdividing, so you use big cubes where things change slowly, and little ones where they change quiclky
what other approaches are there that could work with arbitrary kins?
if the kins can be put in the form of polynomials, then they have closed form derivatives
so you can evaluate joint position, velocity, and accell over the entire path
isn't that going to be really slow and repetitive solution?
(solve for min and max values of the derivatives)]
if you step along the path, yes
but if you solve for the zeros of the accel equation, that gives you the points with the max and min velocity
solve for the zeros of velocity, gives you max and min positio
solve for the zeros of jerk, and get min and max accel
all closed form
ok, so you know where the min/max are, but how does that help with the rest of the path?
you can calc the min and max, if acceptable, go, if not, either scale down the overall velocity, or subdivide the path and repeat, scaling down the sections that exceed limits
I think I'm missing something
I thought u were solving hte kins for min/max
sounds like you're solving somethig path related
of course all of this assumes that you can represent the path in joint space as polynomials in t
assume a path in world space is a straight line
ahh, that's what I was missing
I wasn't assuming path representation in joint space
with non-triv kins, the path in joint space probably isn't
dammit pete, you've done it again... quarter to 11 on a work night, and I'm talking about future TP issues instead of coding something that is needed for the release we want to do in the next couple weeks. ;-)
ok, I gotta go pick my sister up anyhow
at least u got somthing to think about now ;-)
"with visions of matrices dancing thru their heads"
(that was death by matrix)
how about quaterions?
"the castle Aaaahhhhhh - perhaps he was dictating"
What's a quaternion?
a way to represent rotations
in some ways nicer than matrices
rotations in a plane?
(fewer nasty things like "gimbal lock")
or in 3-space?
rotations in 3-space (or higher, if your brain can handle that without exploding)
I have a klein bottle, and my brain hasn't exploded yet ;)
I used a mix of matrices and quaternions back in the day when I was playing with 3d graphics
I could read my "Computer Graphics" book (from way back when I took the class), but I often get bogged down in the math
there's a lot of it, and though I like math, I don't always like slogging through it
it is definitely boggy
(I took the Putnam exam in college, and I don't think I even knew what the questions were, let alone how to get the answers)
I worked out the various transformations (quat to mat, mat to quat, etc) and built a library way back in the mid 90's
I don't feel too bad about it - of the 4 students and two professors who took it at my university, I don't think there was a single correct answer
then I promptly forgot all the math and just used the lib
the engineer's way
at one time I was working on a modeling tool, that could model for instance a human body - you tell it all about the joints, and give it mesh points attached to the various bones
then it would render the mesh (skin), and you could move the joints
the last time I did any 3D programming was using GL on the SGI Personal IRIS (for the graphics class)
it was a speedy 25MHz (or if you were lucky, you cuold use on eof the 33MHz ones) R3000
I did this stuff on the PC, using a Matrox graphics card with hardware z-buffering and such
it was totally non-portable
heh - from back when they actually released chip programming specs?
(the rendering that is - the math should be pretty portable)
I got a couple hundred pages from Matrox somehow, ftp site or something
yep - they used to be pretty ood that way
but I was doing this kind of stuff in DOS, just as windows was taking over
so it got pointless after a whil
once Microshaft decided to stomp all ovber OpenGL
I remember the days when you had to instal Windows, then the DirectX package, just to get certain video and sound updates
I was aware of things like direct-draw and direct-3d, but couldn't get excited about them
some cards just didn't work right unless you used the DriectX driver
they were total crap, until the 8th or 9th revision
hey - I think this is the test I took:
[04:00:01] <SWPadnos> http://www.unl.edu/amc/a-activities/a7-problems/putnam/-pdf/2001.pdf
ahhhh, my eyes
yeah - you should have smelled the smoke
sorry, that's tcl..
well - tcl gets the brain a bit smoky as well ;)
heh, you can tell that it isn't used for math much
what - 1+2 = "12" ;)
"c = a + b" is written as "set c [expr$a + $b ]
"c = a + b" is written as "set c [expr $a + $b ]
that's because ... they're strings
right, else it would be expr[whatever a is] + $b
jmk: what were the 4x4 matrices (the ones that let you do translation) in graphics called?
there wasn't another name for the 4x4 vs 3x3?
I think 4x4 gives you perspective
the math types use 4x4, I used 3x4 when I was doing it, because all non-wierd transforms leave the last row all zeros
"weird" = perspective
non-weird = translation and rotation - I was doing 3d graphics, flight simulator stuff and/or solid object modeling
I used differnent math for the actual projection from 3D space to flat screen
cradek: I was test running some stuff with axis today and noticed a couple of things
the g-code display was 2 lines behind emc
and I couldn't find any control for the optional stop (M1)
can you reproduce that 2-lines-off thing?
it did the same thing everytime with the file I was running
it was really noticable when an M1 was hit
EMC would stop and the display would be 2 lines before the M1
I'm just trying it here and it seems to display the right line...
so it highlight the M1 when yours stops?
maybe something is odd baout M1
no, I didn't try an M1
I just ran a program and watched the cone
well it shows the line before the M1
hmm, mine was 2 before every time
and then I can unpause
I wonder what's going on
yeah, S worked to continue
what did you mean you couldn't find the control?
there was nothing to control whether optional stop stopped or not
it's usually a switch on a real control
oh is that in the other guis?
I though there would be a radio button or something on the GUI
just noticed it cause I ran a prog with M1s
there would have to be an nml message to go with it
don't think I've seen that
it might be in the ini?
hmm, the interp handles it, I'll look at the details of what happens and send you an email
I suspect your program had a very quickly-executed line before the M1
let me check
since the gui polls for position and line, it probably just missed.
there was some coord setting, coolant, a Z move, then an X Y move before the M1
I'll email you the file
dcc it if you can
I'm on a doze boz
how about zip?
I mean transfer it with dcc
forget it, whatever is fine
I don't see anything about optional stop in tkemc
may not be there, but it should be
I'll dig a bit and see what I can find
gotta go pick up my sister now
emc does not currently do optional stop - it always stops
but it's marked as FIXME
at least it's marked ;)
I wonder if that's a bug report or feature request...
feature request - it's not a misbehaving function, but something new (sort of, at least)
well, it's in the interp and canon API, but it doesn't "work"
i.e. it's not optional
though it's an optional stop - the user can decide, or the machine can decide
in this case, emc always decides to stop
(it's not incorrect, just not user-controllable)
you'd make a good politician
same to you
I swear too much to be a politician (plus I'm honest and stuff)
being honest gets in the way of a lot of jobs and money-making opportunities
then I'll be poor
it's working well so far
actually I'm not poor, but neither am I rich
not totally poor either, but still have to think about purchases
and I think that's just fine
the richest people have to think about purchases - just bigger ones
that probably never goes away
yeah - more than $100 for me, more than $100,000,000 for BillGatus
look on the bright side - we don't have to think about $100,000,000 purchases
but I *want* a 727-stretch
M1 is supposed to be optional stop, but currently EMC always stops. The interpreter and canon API have support for this, but the current emccanon always stops.
There should be a checkbutton in the GUIs that controls this, so option stop has to be added to the stat buffer, and there should be an NML message to set it.
before I submit it, does this look right?
there also need to be TP / motion changes to make it stop (or not stop)
and they need to handle having the option change during the last move before the optional stop
no, at that level it'll do the same thing as regular PAUSE
as it's called in canon
that's between interp and TP?
interp -> canon -> [realtime boundary] -> tp
so canon would look at the status, and pause if option is set or not bother if not set?
ie, the actual command stack would differ
one problem is the interp reads ahead
you would pretty much have to set this before you start the program
right - that's the issue I'm seeing
I'd want to be able to change it during a run
for example, so I could change a tool or something if I see that it's getting hot, or to refill coolant or the like
you're talking about a major change then
the only other control software I've used (maxnc) you could set this in the gui's setup screen, not during a program run.
I'm not sure what the option is "meant" for though, so I could just be overcomp]licating things
well I never used it
and their software sucked in other ways, so don't trust that
I'll submit this as-is, and you can certainly add a comment if you like
I'd imagine using this in various places where an operator would want to choose to do some maintenance task or not
yes I can sure see that desire
"here is a good stopping point" (like after a jog at safety hight)
sure - or "this part's done, change tools now if you think it's needed
but I guess in that case, an extra pause/resume is the simple solution
I'm not really sure when you would use M1 as I described (configured at the beginning of the program)
yeah - maybe during a test run, to measure tool wear or finish, then turn it off once you decide your machine can handle it
To stop a running program temporarily (but only if the optional stop switch is on), program M1.
by "switch" I wonder what is meant
this could be a hardware switch too
a physical switch on a panel, according to pete
though with emc, you should be able to make that a software switch (or multiple switches in different locations)
I took out the part about the gui
I agree it should be there, but if I want to call it a bug, I better not want more than the rs274 documentation says...
well - I ought to run. it's bedtime and I still need to do some chores :)
see you guys later
cradek, u still there?
sounds like you got a handle on the optional stop
while you're looking at it
take a look at the optional block delete
I don't see anything in the GUIs for that either
is that in the rs274 spec?
it deletes lines that start with /
it's common feature on real controls too
yeah, my BP control has toggle switches for both
would you submit a tracker for this please
should I put it in for all GUIs?
no, it's not a gui issue
I think it's an interp issue
I don't see anything in the GUIs
maybe the interp is broken too
but it is in kramers doc
many levels have to be touched to implement it
so there is no NML now?
but I think at its root, it's interp
no, I don't think there's any support anywhere
ok, I'll make it pretty general then
I guess / lines are deleted
I don't get an error loading them
should I put it under bugs or feature reqs?
I don't know...
it's an optional delete
ie, only delete if switch is on
I bet the interp runs them now
no, it skips them
I just tried
hmm, that seems like a bug then for sure
I think I agree it's a bug
if it's contrary to the spec, it's a bug
looks like u already entered one for optional stop
yes I did
btw, you mean checkbutton
radio buttons are the things like on a car radio (in the old days!) where you push one and the rest pop out
yeah, I guess since it's not interlocked with anything else
doesn't matter, the bug reader will know what you meant
we still call it dialing the phone too...
arg, I never tested the file you sent
too late now, maybe tomorrow
Would if be prudent to post a note to both devel and user lists regarding those who use the bridgeportio or tkio stuff and whether they have edited the default config in their ini files.
probably a good plan
We could easily set up a default bpt hal file that a user can add to their config.
so - there's the time delay tou wanted ;)
I see you've got the timer checked in
should be easier than CL to set up a spindle delay ;)
be sure to run ./configure after you checkout - I had to change Makefile.inc.in
okay. will do.
I suppose I should have put that in the commit message
IMO most folk will see the changes and know what to do.
But thanks for telling me.
I was just going to say - if they don't, they shouldn't be using CVS ;)
Does timedelay become a block that is loaded like other blocks.
then addf process_delays servo-thread
I guess I was thinking of the "blocks" thing with all it's sub parts.
ah - sorry
I made a separate component
the blocks comp is pretty big - I wanted a little thing
k no problem.
should I just go through all the inis and set BASE_PERIOD to SERVO_PERIOD / 2 (for servo card absed ones, that is)?
Is that what we decided needed to be done?
I see something in the TODO about choosing a larger BASE_PERIOD for non-stepper configs
There isn't a need for real high base period except in the mazak where it's used to read the handwheel.
I'm not sure if there was a decision on exactly what that period would be
that's a 100 PPR encoder, right?
or 100 CPR
are there components to accept a handwheel?
You're asking an alzheimers candidate?
who asked what?
I asked it before..
my memory is so bad
can't be as bad as mine.
who said that?
"well doctor, at least I don't have cancer" ;)
anyway - the BASE_PERIOD - even at 500 us per cycle, a 400 PPR (100 CPR in quadrature) handwheel would have to be going at 2.5 RPS, or 150 RPM, before it became a problem
(maybe half that, if Myquist comes into play)
I think that jmk was spinning it pretty fast with his hand.
ok - I can leave that one alone
He did some testing of the module with that setup.
univstep, univpwm, stg, and motenc can probably all use a slower BASE_PERIOD - even SERVO_PERIOD/4 would be fine
I suppose I could too - I have a nice handwheel he gave me (and I'm a gamer - have I mentioned that recently? ;) )
That will reduce the load.
ok - I'll make all those 250 microseconds
handwheels rather than joysticks or xxx pads.
I used to use paddles
Tempest was a great game
and Pong - don't forget Pong
I could state my age "packman"
PacMan was waaaaaay after Pong
Pong was the original game that Nolan Bushnell (later the founder of Atari) made - around 1968 or 1969
PacMan was late '70s
before it came Asteroids (I think), Tank II, and Space Invaders
the original Space Invaders - with a B/W screen, and colored cellophane over parts of it for "color"
and also BattleZone
that was a cool one
there's a console arcade game at Costco - it has like 80 of the old games (not all that old)
it's unfortunately $1600 or $2000
You'd have to compare notes with my kids on those.
but it's a full stand-up game cabinet, complete with (disabled) coin acceptor
anyway - I'll take a handwheel for a "spin" soemtime - just for the heck of it
but until then, I'll only change those other configs ;)
Thanks for that.
so loadrt gets me 8 delays
only one, unless you specify num_delays=(something else)
I see that these files have various numbers for max_feed_override - any one that's particularly good (I see 1.2 and 1.5)
1.2 was default in the original emc stuff.
but over the years it got pushed all around.
I thinkonly the univstep config I have is different - the motenc and m5i20 are both 1.5
we should check the min and max limits as well.
incidentally - the univstep / univpwm aren't in CVS yet
ok - what would you like?
I'd assume Bridgeport size, at least
original was -10 and +10
across all axes.
so they were bigger than many machines.
ok - +- 10 is a bit small for X
emc2's emc.ini used a very small z
maybe I'll take out the stupid ini var save first ;)
and it would not run either cds or the penguin
right - like 3 inches, I think
would it be a bad thing for me to remove the axis var dump?