#emc-devel | Logs for 2007-02-23

[03:10:33] <a-l-p-h-a> Wow.
[03:10:34] <a-l-p-h-a> client was nice.
[03:10:42] <a-l-p-h-a> gave me like a $50 box of chocolates from her store.
[06:23:10] <jmkasunich> wtf? history and tab completion in halcmd don't work
[06:23:20] <jmkasunich> did a cvs up, reconfigured
[06:23:28] <jmkasunich> configure says readline is ok
[06:23:34] <jmkasunich> did a make clean and make
[06:23:36] <jmkasunich> still busted
[06:23:52] <jmkasunich> they were working a couple days ago
[08:08:31] <jmkasunich> fixed now
[08:19:50] <alex_joni> hi jmk
[08:19:57] <alex_joni> way too late up again I see
[08:20:02] <jmkasunich> yes
[08:20:09] <alex_joni> :-)
[08:20:17] <alex_joni> I'm at work for 1.5h already
[09:31:20] <jmkasunich_> jmkasunich_ is now known as jmkasunich
[14:36:47] <skunkworks> I knew there was a reason I liked xemet ;)
[15:41:39] <skunkworks> Hi ray
[15:42:45] <rayh> Hi skunkworks How you doing with the retrofit of that k&t
[15:43:39] <skunkworks> slow- have not had much time to work on it.
[15:44:06] <skunkworks> in a month or 2 - We are in the proccess of buying/selling our house
[15:47:05] <rayh> Moving far?
[16:15:11] <skunkworks> moving to trempealeau
[16:44:16] <skunkwork1> I am following the directions on the wiki for a fresh install run in place. I am down to the ./configure --enable-run-in-place
[16:44:33] <skunkwork1> and get this configure: error: Required header Python.h missing. Install it, or specify --di sable-python to skip the parts of emc2 that depend on Python
[16:44:56] <skunkwork1> this is a fresh install of ubuntu
[16:46:04] <jepler> skunkwork1: did you follow the instruction that says to "apt-get build-dep emc2"?
[16:46:12] <skunkworks> yes
[16:46:20] <jepler> skunkwork1: did it complete without error?
[16:46:46] <skunkworks> I think so - could I re-run it and see?
[16:47:06] <jepler> yes
[16:47:08] <skunkworks> ok
[16:47:40] <jepler> how did you install? official ubuntu cd? emc 2.0 live cd? emc 2.1 live cd?
[16:47:56] <skunkwork1> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[16:48:01] <skunkwork1> 2.0 live
[16:48:26] <jepler> ok -- in that case, "apt-get build-dep emc2" installs the packages to rebuild emc 2.0 which did not include axis
[16:49:05] <jepler> change your repositories to the emc2.1 ones, then "apt-get update", then "apt-get build-dep emc2" again. it should install additional packages, including the one the error is about
[16:49:06] <skunkwork1> ok -- I thought there used to be 2 apt-get commands to do that before.
[16:49:40] <skunkwork1> is there still an apt-get axis.... command?
[16:49:49] <jepler> no, not anymore
[16:50:04] <skunkworks> work around?
[16:50:25] <skunkworks> oops hold on
[16:50:58] <skunkworks> missed your last previouse post
[16:51:26] <jepler> that's OK
[17:34:52] <jepler> alethe linux kernel driver has some autodetection smarts which we don't have in emc
[17:35:26] <alex_joni> I see
[17:35:48] <alex_joni> maybe we can use (not include) those in some testing/probing
[17:36:10] <jepler> that is suggested somewhere in the documentation, in fact
[17:36:21] <jepler> but why bother, his laptop will be unusable anyway
[17:36:22] <alex_joni> unloadrt hal_parport, loadrt pc_parport, grep /proc/ioports
[17:36:28] <alex_joni> yeah, probably
[17:36:46] <jepler> loadrt pc_parport won't work
[17:36:52] <jepler> it's parport_pc anyway
[17:37:15] <alex_joni> nitpicking P
[17:37:17] <alex_joni> :P
[17:37:54] <jepler> http://linuxcnc.org/docs/2.1/html/hal/drivers/index.html (sudo modprobe -a parport_pc)
[17:38:11] <skunkworks> jepler: I increased my period to 10ms just to see if that was it - same deal.
[17:38:52] <jepler> skunkworks: OK that's not very surprising
[17:39:36] <skunkworks> I should have this computer up pretty quick here - your help did the trick
[17:49:35] <skunkwork1> jepler: seems to work just fine on this 450mhz computer.
[17:50:39] <jepler> skunkwork1: reading the encoders works, you mean?
[17:50:45] <skunkwork1> yes
[17:50:51] <jepler> well that's interesting
[17:51:09] <skunkwork1> gives me one number counts as expected
[17:51:28] <skunkwork1> velocity did the same on the portable aso
[17:51:30] <skunkwork1> also
[17:51:46] <jepler> velocity is just calculated by (counts - old_counts) / time
[17:51:56] <jepler> if counts is bogus, velocity will be bogus
[17:52:03] <skunkwork1> duh
[17:52:41] <jepler> not entirely "duh" -- there are smarter ways which give better velocity estimates
[17:53:11] <skunkwork1> I ment duh as I should have thought of that
[17:53:39] <skunkwork1> This is cool. - what would velosity be with no scaling?
[17:53:54] <skunkwork1> counts per second?
[17:54:04] <jepler> yes, I think that's right
[17:56:15] <skunkwork1> I should go get a drill and see how fast I can spin it ;)
[17:57:00] <skunkwork1> So I wonder what is wrong with my portable.
[17:58:09] <jepler> hard to say
[17:58:18] <jepler> could be a bug in pluto that most machines don't trigger
[18:00:37] <skunkwork1> or it could be my portable ;)
[18:01:00] <skunkwork1> I will update to the latest emc2 and try for shits and giggle
[18:01:02] <skunkwork1> s
[18:01:46] <skunkwork1> this is cool - I can flick it with my finger as fast as I can and it seems to go right back to 0 at the correct spot
[18:01:59] <skunkwork1> its like it works or something ;)
[18:06:49] <skunkwork1> jepler: seems to be rotation per second about?
[18:07:18] <skunkwork1> btw - did you know you can have more than 1 halmeters running ;)
[18:08:14] <skunkwork1> again - cool
[18:12:10] <alex_joni> skunkwork1: I usually run 4-5 of them
[18:12:15] <alex_joni> if I'm too lazy to start halscope
[18:12:57] <skunkworks> I thouhgt - boy it would be nice to have encoder velocity and posision at the same time ;)
[18:46:24] <skunkworks> scaling works - I can make it so 1 rotaion is a unit. (inch) but I am not understanding velocity now it reads .000something when I am turning it.
[19:13:25] <jepler> skunkworks: if you make 1 rotation be a unit, the velocity should be in rotations per second. .000something seems too low
[19:14:26] <skunkworks> that is what I thought - if I set the encoder scale to 4096 - position is 1 for one rotation but then velocity is .000something spinning it by hand.
[19:14:52] <skunkworks> with no scale it runs in the 1-10 or so
[19:15:03] <skunkworks> (spinning it by hand)
[19:17:09] <jepler> maybe I forgot to include the period in the velocity calculation
[19:17:13] <jepler> encoder_0_velocity = (count - data.last_count[0]) / encoder_0_scale;
[19:17:42] <jepler> skunkworks: you could load a 'ddt' and calculate the velocity yourself by linking position to ddt.0.in
[19:20:02] <skunkworks> not an issue right now - just playing.
[19:20:21] <skunkworks> no period? (looking at your code)
[19:20:23] <jepler> do you want to try a patch?
[19:20:29] <skunkworks> sure
[19:21:05] <skunkworks> * skunkworks like being a guinie pig
[19:21:36] <jepler> http://emergent.unpy.net/-files/sandbox/pluto-velocity.patch
[19:21:56] <jepler> er
[19:21:57] <jepler> http://emergent.unpy.net/files/sandbox/pluto-velocity.patch
[19:22:20] <skunkworks> cool - it will be a bit.
[19:23:13] <jepler> oops
[19:23:20] <jepler> looks like the patch is wrong anyway
[19:23:34] <jepler> should be "fperiod" instead of "period_ns" whereever it appears
[19:24:20] <jepler> file updated
[19:30:31] <skunkworks> jepler: http://www.electronicsam.com/images/KandT/servostart/pluto1.jpg
[19:33:10] <jepler> skunkworks: aww gee the motor's not very big is it
[19:33:42] <skunkworks> that is just the encoder...
[19:34:00] <skunkworks> it is not mounted to anything yet :)
[19:35:08] <jepler> skunkworks: oh -- in that case, I take it all back
[19:36:38] <alex_joni> good night all
[19:37:09] <skunkworks> night alesx
[19:37:10] <skunkworks> alex
[20:49:34] <skunkworks> I had updated to 2.1 on my portable and got a fresh checkout for rip.. Same thing. (just trying things)
[20:52:48] <alex_joni> skunkworks: it's not the best idea to say "same thing" when debugging something
[20:53:54] <jepler> skunkworks: did you try the velocity patch on the machine that was working OK for position?
[20:58:13] <skunkworks> not yet.
[21:01:14] <skunkworks> How do you apply the patch automatically?
[21:02:10] <alex_joni> patch -p1 < file.patch
[21:02:13] <alex_joni> or -p0
[21:02:37] <jepler> the number in '-p1' says how many levels of directory to strip off the patch
[21:02:48] <jepler> in this case, you want to be in src/hal/drivers and use -p0, I think
[21:03:05] <skunkworks> I will give it a try
[21:03:10] <alex_joni> I usually try with p0, and if that doesn't work p1 does the trick usually
[21:03:31] <skunkworks> alex_joni: wern't you going to bed a while ago?
[21:03:36] <alex_joni> I am in bed
[21:03:38] <alex_joni> :-P
[21:03:43] <alex_joni> probably TMI
[21:03:50] <skunkworks> :) I do the same thing - also in the bathroom ;)
[21:08:05] <skunkwork1> jepler: what was that link?
[21:09:40] <skunkworks> duh http://emergent.unpy.net/files/sandbox/pluto-velocity.patch
[21:09:42] <alex_joni> http://emergent.unpy.net/files/sandbox/pluto-velocity.patch
[21:10:21] <skunkworks> patch -p1 < file.patch
[21:10:36] <alex_joni> patch -p0 < pluto-velocity.patch
[21:16:32] <skunkwork1> jepler: now when I run it - the led doesn't flash anymore. just goes out.
[21:16:49] <skunkwork1> (was sending a sin wave to pwm0
[21:17:42] <skunkwork1> when I quit halcmp - the led is dim again
[21:18:46] <skunkworks> and I get nothing from the encoder.
[21:19:10] <jepler> skunkworks: well that means the patch was probably wrong
[21:19:24] <jepler> 'patch' again and when it asks you if you want to reverse the patch say yes
[21:19:32] <jepler> I'll look at velocity when I hook up my pluto this weekend
[21:22:17] <skunkworks> ok
[21:22:23] <skunkworks> no problem
[21:23:07] <alex_joni> off to sleep now, night all (again)
[21:23:10] <jepler> see you alex
[21:29:48] <skunkworks> jepler: reboot fixed it - the velocity seems right now - if I rotate it about 1 rps it reads about 1 - cool
[21:31:31] <jepler> hm
[21:31:38] <jepler> if that happens again, check in dmesg for a message
[21:31:45] <skunkworks> ok
[21:34:26] <skunkworks> if you want to know - I undid the patch and forgot to 'make' it. so when it did it didn't work again - I rebooted. then it worked. I then remembered I never compiled the undoing of the patch.
[21:34:47] <skunkworks> if that made sense
[21:35:12] <jepler> yes, it does