#emc-devel | Logs for 2010-11-18

[00:17:32] <andypugh> Will rtapi_print print a float?
[00:18:15] <SWPadnos> I believe it will now
[00:18:20] <andypugh> %e and %g give me f= F[00000000:bff40000] for 1.25
[00:18:30] <SWPadnos> %f maybe
[00:18:34] <andypugh> Same
[00:18:37] <SWPadnos> oh
[00:19:12] <andypugh> They come out right in Axis messages, but like that in dmesg
[00:21:13] <andypugh> I am only trying to find out what (int)-1.25 is
[00:21:28] <SWPadnos> yeah. I know it wasn't possible, but I thought jepler had added it some time in the recent past
[00:21:35] <skunkworks> you need to use fabs
[00:21:47] <andypugh> I want to keep only the fractional part of a float, but f - (int)f doesn't seem to quite work
[00:21:53] <skunkworks> heh
[00:21:54] <skunkworks> never mind
[00:22:04] <skunkworks> is there a fint?
[00:22:17] <SWPadnos> no, just a=b, where a is an int variable
[00:22:22] <SWPadnos> and b is a float
[00:23:06] <SWPadnos> there may be an fmod
[00:23:18] <SWPadnos> x mod 1 = the fractional part of x
[00:23:32] <SWPadnos> (if there's an fmod. if not you get 0 all the time :) )
[00:24:21] <andypugh> % doesn't work, I know that much
[00:24:34] <SWPadnos> no, that's definitely for ints
[00:25:45] <andypugh> Actually, I am getting what I asked for, but not what I want.
[00:26:01] <jepler> fmod() is for modulo of floating-point numbers, but I'd have to check whether it's in rtapi_math.h..
[00:26:37] <andypugh> I actually want -0.25 to be 0.75. The actual code is working fine for keeping just the fraction.
[00:27:40] <andypugh> I want f - floor(f) I think
[00:28:19] <jepler> from what little bit you described, I think so too
[00:28:42] <jepler> .. and floor() is in rtapi_math.h
[00:28:48] <jepler> fmod isn't
[00:29:38] <SWPadnos> andypugh, are these sines/cosines, where you know the number is in (-1 .. 1) ?
[00:29:52] <andypugh> Given an angle between 0 and 1 full rotation, I want to add or subtract an angle and still be between 0 and 1 rotations.
[00:30:13] <SWPadnos> ok. so add 1 and then f-floor(f)
[00:30:35] <jepler> add 1?
[00:30:42] <SWPadnos> yes
[00:30:51] <andypugh> floor -1.5 is -2
[00:31:10] <andypugh> Floor -0.1 is -1 (as I understand it)
[00:31:13] <SWPadnos> you can never get -1.5 if you start with a and b in the range of 0 to 1
[00:31:30] <SWPadnos> a-b will range from -1 to 1
[00:32:02] <SWPadnos> so (f+1) - floor(f+1) should be the answer you need
[00:32:13] <andypugh> -0.1 - (floor(-0.1)) = -0.1 - (-1) = 0.9 (I hope)
[00:32:53] <SWPadnos> yes, that should be true. floor should round toward -inf
[00:37:01] <andypugh> And that does seem to work
[00:37:11] <andypugh> Time to be away to the land of nod
[00:37:18] <SWPadnos> night night
[04:35:32] <KimK> When compiling EMC2, at the end of the configure script it prints something similar to "next run make" and "then run sudo make setuid". In the wiki page Installing_EMC2 (Sections 2.4 & 2.5) there is the same, but also in-between them there is "make install-menus". I have been doing the "make install-menus" in-between (as per the wiki) and I was wondering if the configure script should have the "make install-menus" echo line added?
[04:36:02] <KimK> It's a simple enough change, but I thought there should be a little public discussion first, so here you go.
[04:40:43] <SWPadnos> I think that only needs to be done once - after that you will have the items in the meny
[04:40:44] <SWPadnos> u
[04:50:52] <KimK> OK. Would it need to be done again if some item was added to the menu? Would it hurt anything if it was done each time? My menu still seems to point to the "release" manuals (earlier date), which is what I would want. (Maybe I *should* add separate menu items for the 2.4_branch manuals, though ("today's" date). So maybe add a note to the wiki about not needing make install-menus on a re-compile?
[04:52:24] <SWPadnos> I don't know if there are any issues with doing it every time
[04:52:54] <KimK> Ha, there are none *that I know of*, lol
[04:53:00] <SWPadnos> if you don't configure --enable-build-documentation, then you don't get new docs, so that may explain why those menu items don't get changed (maybe)
[04:55:44] <KimK> Ah, I always --enable-build-documentation. I believe always, anyway, unless on one occasion I forgot to for some reason.
[04:56:00] <SWPadnos> oh
[04:56:11] <KimK> So there's the "I'm not sure" part.
[04:56:13] <SWPadnos> in that case someone else should answer, because I'm only guessing :)
[04:57:25] <KimK> No problem, I appreciate your advice as always. That's why I thought I'd better ask about this, I'm not real sure what's going on there either.
[04:58:48] <KimK> With winter coming on, did you ever get your Hardinge working?
[04:59:59] <KimK> It's in an outside (unheated?) shed/garage, as I recall.
[05:00:27] <SWPadnos> nope, I haven't moved it an inch since I (finally) got it off th etrailer
[05:00:37] <SWPadnos> haven't had much time in the last 18 months or so (which is good and bad)
[05:51:57] <KimK> I also have a bug on master to report (2.4.5 seems to be fine). Master of a couple days-weeks ago (not sure) when printing from classicladder (using print button in ladder viewer) to "create a PDF document" (on the Desktop) would immediately crash classicladder. (Axis remained running.)
[05:52:00] <KimK> So I updated master to the current level. Now, on the first printing attempt, nothing happens (and no document appears). On the second printing attempt, classicladder crashes (disappears) as before. Axis remains running.
[05:56:50] <KimK> I hope this is easily repeatable for others with standard config files, I didn't test that way, but I could if it would help. Let me know if it seems to be dependent on the stuff I'm setting up here specifically.
[05:57:15] <SWPadnos> printing was a problem before, which I thought had been fixed
[05:57:20] <SWPadnos> oh well
[05:58:03] <SWPadnos> (you could try loading a standard config and printing ...)
[05:58:26] <SWPadnos> I don't know if there are any extra packages necessary to print from CL
[06:00:44] <KimK> OK, I'll try it, which config is the most popular or generic that you think I should use? Oh, there's a thought, maybe it's just me? I loaded all that document stuff, LyX, a whole bunch of stuff. Others need to test printing from master too, I think.
[06:01:00] <SWPadnos> probably
[06:01:14] <SWPadnos> isn't there a sim-<something>-cl config?
[06:02:13] <KimK> Yeah, lots of sims. How about the 3-axis sim?
[06:02:50] <KimK> Oh, yeah, that's a good idea, not much of a ladder there.
[06:03:13] <KimK> Maybe you have something better than the 3-axis-sim?
[07:07:55] <KimK> You were right, there is a demo_sim_cl so I tried that. I made a couple of attempts on both 2.4.5 and master, and now I'm more confused than before, but I think it's broken on both. I've had it crash immediately upon printing, and I've had two attempts at printing with nothing printed, but nothing crashed. But it's getting late and my reports are getting unreliable, so I'm giving up for now.
[07:08:35] <KimK> Also I forgot to mention that in every case I changed the PDF printer from A4 to US letter, if that makes a difference.
[07:08:47] <KimK> Goodnight
[13:21:21] <jepler> hm, printing multiple times worked for me, but my system is not like most of our users' systems: debian squeeze, amd64. emc v2.4_branch, demo_sim_cl, letter or A4 paper sizes.
[13:22:18] <jepler> the pdf-related stuff for package building shouldn't be relevant
[13:23:39] <jepler> valgrind does indicate one potential problem, which seems to be deep inside the printing APIs .. http://pastebin.ca/raw/1995433
[13:26:05] <jepler> ah, it's a zlib buglet fixed in a newer version of zlib ( than debian squeeze has ( - Avoid access of uninitialized data for first inflateReset2 call [Gomes] http://www.zlib.net/ChangeLog.txt
[13:29:07] <jepler> I also didn't get a crash on emc2 master on ubuntu lucid running in qemu and displaying using X-over-ssh
[13:29:17] <jepler> each time I've printed, I've gotten output.pdf in the config directory
[13:31:47] <jepler> (that was 32-bit ubuntu lucid, so about like user systems)
[15:57:17] <micges> hi seb
[15:57:38] <seb_kuzminsky> good morning (or whatever diurnal greeting is currently appropriate for your timezone)
[15:57:51] <micges> did you find last bugs with new version of coverity?
[16:00:51] <SWPadnos> hahahaha
[16:03:18] <seb_kuzminsky> micges: the last few commits i made were fixing bugs found by coverity, yes
[16:03:30] <seb_kuzminsky> there are still over 1000 "defects"
[16:03:49] <micges> can you pastebin them?
[16:04:16] <seb_kuzminsky> coverity recently upgraded the version of the "prevent" static analyzer that they use on their free-for-open-source "scan" service
[16:04:43] <seb_kuzminsky> the old version found something like 25 bugs, and the new one found... 1130
[16:05:11] <seb_kuzminsky> if you mail me (seb at highlab dot com) i can get you an account so you can access our bug report
[16:05:30] <seb_kuzminsky> bbias
[16:05:32] <SWPadnos> the one I happened to look at was a (potential) real problem
[16:06:43] <qq-> whats that 'coverity' ? a debugger ?
[16:07:04] <SWPadnos> it's a code analysis program
[16:07:22] <qq-> thanks , its free ?
[16:07:28] <SWPadnos> it looks through the code and finds potential bugs, so you (the programmer) can fix them
[16:07:42] <SWPadnos> yes and no. they have a free service for open source projects
[16:07:47] <SWPadnos> otherwise you get to pay for it
[16:07:59] <qq-> SWPadnos, cool, thanks
[16:08:00] <micges> many $
[16:08:16] <qq-> many $ x1000 ?
[16:08:17] <SWPadnos> there's no guarantee that they will accept an open source project for the free service though, they have a choice
[16:08:21] <SWPadnos> probably
[16:10:09] <qq-> so not-for-us ...
[16:12:59] <qq-> give them a chance to survive by asking them for a gpl license
[16:19:12] <SWPadnos> their software actually grew out of a program that I believe was open source for a little while
[16:19:38] <SWPadnos> it was the "Stanford checker", they analyzed the linux kernel for a few years while they were developing it
[16:20:23] <SWPadnos> then I guess some of the students graduated or something, and brought the code with them (some technology transfer deal most likely)
[16:22:50] <seb_kuzminsky> coverity is a company, which makes a product called prevent
[16:22:59] <seb_kuzminsky> prevent evolved from the stanford checker
[16:22:59] <SWPadnos> they are now :)
[16:23:19] <seb_kuzminsky> prevent is a static source code analysis system - it reads the source code and finds problems with it
[16:30:27] <alSMT> alSMT is now known as Al_Smt
[16:38:21] <KimK> jepler: Thanks for looking into the printing problems, I'll try print bug hunting again after a while. I took a bunch of ladder screenshots for now and I've got to get back to my original problem. Alligators, swamp, etc. Thanks again, more bug reports on printing later.
[19:13:37] <ries_> ries_ is now known as ries
[19:25:21] <psha> qq-: i've found nasty bug with libv4l2 plugin for camunits so hope it'll be here today :)
[19:43:09] <qq-> psha, cool
[19:46:53] <psha> i'm building package now
[19:48:31] <qq-> it works with mplayer : http://paste.debian.net/100156/
[19:50:45] <psha> i hope it'll work with camunits too :)
[19:51:08] <psha> i'm cleaning patch now
[19:54:10] <qq-> bad things with debian is that all programs for cams try only /dev/video0 , and as udev change that for vary reason ... they fail ...
[19:54:24] <psha> camview tries first 10:)
[19:54:44] <qq-> camview is a good exception
[20:07:09] <psha> qq-: building
[20:07:56] <qq-> yeah ..
[20:27:19] <psha> qq-: done
[20:27:31] <qq-> upgrade
[20:27:34] <psha> qq-: please upgrade libcamunits6 package
[20:28:00] <qq-> Setting up libcamunits6-dev (0.2.0-3) ...
[20:29:19] <psha> qq-: broken :(
[20:30:10] <qq-> ?
[20:30:36] <psha> i've forgot to link it against libv4l
[20:30:59] <psha> to load it you need to set LD_PRELOAD=/usr/lib/libv4l2.so environment
[20:31:15] <qq-> ah, forget , how to have in "input " Device , ah ..
[20:31:46] <psha> try LD_PRELOAD=/usr/lib/libv4l2.so.0 camview
[20:32:29] <qq-> psha, now it WORKS, thanks a bunch
[20:32:52] <psha> image ok?
[20:33:13] <qq-> yes, but .... no stream , only ONE image
[20:33:32] <psha> what's selected format?
[20:33:46] <psha> fps = 0?
[20:34:38] <qq-> 640x480 RGB24 , and yes fps go to 0 , bc off OpenGL
[20:35:24] <qq-> that was reported already
[20:35:40] <psha> run it with full debug
[20:35:53] <psha> CAM_DBG=all and LIBV4L2_...
[20:37:56] <qq-> http://paste.debian.net/100158/
[20:39:09] <psha> btw what's your libv4l-0 version?
[20:39:14] <psha> from my repo or stock?
[20:40:34] <qq-> rw-r--r-- 1 root root 36796 Nov 8 08:38 /usr/lib/libv4l2.so.0
[20:40:44] <qq-> seems stock
[20:41:31] <psha> nonono
[20:41:33] <psha> dpkg -l
[20:43:15] <psha> 0.8.0-1
[20:43:15] <psha> ?
[20:44:24] <qq-> not there ..
[20:45:17] <psha> dpkg -l libv4l-0
[20:45:24] <psha> it will print version
[20:45:25] <qq-> nothing
[20:46:08] <qq-> uh , 0.8.1-2
[20:46:12] <psha> kill it
[20:46:20] <psha> apt-get install libv4l-0=0.8.0-1
[20:46:31] <psha> i've already removed it from repo
[20:47:32] <qq-> it will remove 26 packages ..
[20:48:00] <qq-> anyway will do
[20:48:26] <psha> you need to downgrade it to stock version
[20:48:29] <psha> from my buggy one :)
[20:48:44] <qq-> sure no pbm
[20:50:01] <qq-> Setting up libv4l-0 (0.8.0-1) ...
[20:50:51] <psha> new version of libcamunits6 is landing in a minute
[20:52:04] <psha> landed
[20:52:53] <psha> strange...
[20:53:02] <psha> still no deps
[20:53:20] <psha> wait another 10 minutes for another build :))
[20:53:37] <qq-> sure
[20:53:54] <psha> autoconf need to regenerate files before build
[20:55:58] <psha> hope this time it'll build:)
[20:59:40] <qq-> hm, dependencies hell The following packages have unmet dependencies: v4l-utils: Depends: libv4l-0 (= 0.8.1-2) but 0.8.0-1 is installed.
[21:00:05] <psha> downgrade it too
[21:00:34] <psha> there is flag to apt-get to allow downgrades
[21:04:17] <qq-> ok. will may do that tomorrow ?
[21:04:41] <psha> last try please :)
[21:04:45] <psha> it finally built ok )
[21:05:07] <psha> 0.2.0-5
[21:05:13] <qq-> i can't reinstall ..
[21:05:22] <psha> ?
[21:05:30] <psha> complaining about 0.8.1-2?
[21:05:43] <qq-> yes
[21:06:31] <psha> apt-get install v4l-utils=0.8.0-1 libv4l-0=0.8.0-1 qv4l2=0.8.0-1
[21:07:08] <psha> and libv4l-dev if it's installed
[21:07:10] <qq-> done
[21:07:23] <psha> so install libcamunits6 and try it
[21:07:28] <psha> and that's all for today :)
[21:07:42] <qq-> and camview ?
[21:08:36] <psha> not important
[21:08:40] <psha> plugins are in libcamunits6
[21:08:52] <qq-> ok
[21:09:54] <psha> wokring?
[21:12:00] <qq-> same , i get image and oipengl kill the stream
[21:12:13] <psha> thanks
[21:12:27] <qq-> s/ oipengl/ opengl , thanks to you
[21:12:29] <psha> so let's continue tomorrow :)
[21:12:34] <qq-> sure
[21:25:19] <qq-> psha, it works , but @ 320x240 RGB24
[21:27:25] <qq-> hm , but not for long times ~ 2-3 min
[21:28:52] <psha> bad :)
[21:32:41] <qq-> ok @ 320x240 RGB24 , adding crosshair fps go zerro, remove crosshair fps uo to normal , and all works
[21:32:55] <qq-> fps up*
[21:33:18] <psha> RGB?
[21:33:33] <qq-> BGR, sry
[21:33:51] <psha> will be fixed in next build
[21:34:06] <qq-> cool , tks
[21:34:24] <psha> is it working only for short time?
[21:34:40] <psha> maybe i need to restore open/close workaround in input_v4l2.so
[21:34:44] <qq-> no , still working > 50 min
[21:34:50] <qq-> 5* min
[21:34:53] <psha> nice
[21:38:15] <qq-> other thing that kill fps is if i increase the Display window
[21:39:08] <qq-> have to reload the digital cam
[21:39:17] <qq-> + opengl
[21:39:32] <psha> that's pretty strange...
[21:39:57] <psha> maybe open/close are crucial for your cam
[21:40:20] <qq-> maybe
[21:41:32] <qq-> it like @ 320x240 but not higher
[21:41:51] <psha> maybe it's cam limit?
[21:42:33] <qq-> in camview only , in qv4l2 it works 640x480 w/o issues
[21:45:59] <qq-> other thing , using a little Display (same in which worked previews @ 320x240) now it stream @ 640x480 ...
[21:48:02] <qq-> and stops ~2 min later ...
[21:54:40] <psha> mine is still working in BGR mode
[22:00:21] <qq-> here too BGR is working but seems to be a correlation between the Display size and fps , in the way if Display size increase , fps descrease under "supported" valor , and it is killed gentle (descrease >descrease , too zerro )
[22:00:45] <psha> that's extremly strange :)
[22:02:36] <psha> qq-: what's your video card? and what's size of display?
[22:02:48] <psha> camunits use opengl texture uploads
[22:03:41] <qq-> nvidia
[22:03:50] <psha> with blob driver?
[22:03:52] <qq-> but use vesa driver
[22:04:14] <psha> select example driver in camview and set high framerate in it
[22:05:25] <psha> so you'll see if it's video problem or not
[22:05:40] <qq-> i'm 640x480 @1 fps
[22:05:51] <qq-> RGB
[22:06:28] <psha> there are controls in that unit
[22:06:46] <psha> it's called 'menu' :)
[22:06:58] <qq-> example driver get my only RGB 640x480
[22:07:06] <psha> checkbox, select 30 there
[22:07:26] <psha> it only knows how to generate 640x480 rgb
[22:08:01] <qq-> no " select 30" there
[22:08:18] <psha> in example input?
[22:08:29] <psha> expand example unit controls
[22:08:36] <psha> and select 30 in first checkbox
[22:09:07] <qq-> no 'expand example unit controls'
[22:09:15] <psha> hm
[22:09:18] <psha> run camview
[22:09:29] <psha> create chain from example input and opengl
[22:09:29] <qq-> oh, ok
[22:10:40] <qq-> now fps > 12 , but image freezed
[22:11:41] <psha> that's bad :) but at least we know that it's somehow related to vesa driver...
[22:12:23] <psha> do you have libgl1-mesa-swx11 installed?
[22:12:45] <qq-> no
[22:13:11] <qq-> again a dependencies issue
[22:13:45] <psha> it will kill libglut
[22:13:52] <psha> anything else?
[22:14:23] <qq-> ?
[22:14:47] <psha> i mean what dep problems?
[22:15:21] <psha> btw nv driver is working bad for you?
[22:15:30] <qq-> i would remove libgl1-mesa-swx11 to install opengl
[22:15:47] <psha> libgl1-mesa-swx11 is opengl
[22:15:50] <psha> but in sofware
[22:16:00] <psha> it's replacement for libgl1-mesa-glx
[22:16:15] <qq-> psha, no tested (nv) squeeze come with nouveau
[22:16:26] <psha> already!?
[22:16:28] <psha> great :)
[22:16:32] <psha> and it's not working? )
[22:16:57] <qq-> not for emc2 ..
[22:19:00] <qq-> nouveau get strange issue w/ emc2 , as change behavior of same taste combinations
[22:20:40] <psha> that's bad
[22:20:47] <psha> and have you tried nv driver?
[22:20:51] <qq-> no
[22:20:59] <psha> not binary nvidia one but old nv one
[22:21:03] <qq-> only vesa
[22:21:25] <psha> it seem that vesa with glx is not right choice :)
[22:21:30] <psha> even vesa + swx11 is better
[22:21:31] <qq-> will try later
[22:21:49] <psha> what packages are removed if you try to install swx11?
[22:22:08] <qq-> if a recall opengl
[22:22:18] <qq-> if i*
[22:23:08] <psha> there is no package 'opengl'...
[22:23:30] <qq-> ii libqt4-opengl
[22:23:40] <qq-> ii python-opengl
[22:23:43] <qq-> hehe
[22:24:14] <psha> python-opengl depends on libgl1-mesa-glx | libgl1
[22:24:19] <psha> swx11 provides libgl1
[22:25:19] <qq-> rc libgl1-mesa-swx11 , was installed but .. gone in deps hell
[22:25:42] <psha> libqt4-opengl too
[22:25:46] <psha> dependson | libgl1
[22:26:07] <psha> i have libclutter installed and depending on libgl1-mesa-glx
[22:26:12] <psha> and haskell opengl
[22:26:21] <psha> everything else is retained untouched
[22:26:23] <qq-> psha, i'll try to have vesa + swx11 for tomorrow
[22:26:54] <psha> thanks
[22:27:05] <psha> now it's time for a sleep :)
[22:27:06] <qq-> thanks to you
[22:27:11] <psha> 01:30 here
[22:27:21] <qq-> +2 from here
[22:35:27] <qq-> psha, deps hell > http://paste.debian.net/100167/
[22:36:13] <psha> nothing bad
[22:36:25] <psha> aptitude is too smart and tries to do everything in one pass
[22:37:15] <psha> libcamunits*-dev packages are optional
[22:37:28] <qq-> ok
[22:37:41] <psha> camunits is metapackage
[22:37:43] <qq-> Setting up libgl1-mesa-swx11 (7.7.1-4) .
[22:37:49] <qq-> Current status: 0 broken [-1].
[22:40:33] <qq-> so on vesa + swx11 same behaviors
[22:40:50] <psha> bad
[22:40:57] <psha> last resort is nv + swx11
[22:41:01] <qq-> hehe
[22:42:04] <qq-> have an explanation of that: changed display size > change fps > kill fps ?
[22:42:20] <psha> yes
[22:42:28] <psha> vesa's opengl is buggy :)
[22:42:31] <qq-> it's normal ?
[22:42:39] <qq-> oh ..
[22:43:06] <psha> it's not normal
[22:43:31] <psha> but if it's failing with example input driver that's defenitely connected to rednering
[22:44:00] <qq-> rendering *
[22:44:10] <psha> rendering :)
[22:45:19] <qq-> psha, why not skip using mesa for cam ? cam can't do 2D (3D)
[22:46:01] <psha> it's possible
[22:46:13] <psha> but another display plugin is needed
[22:46:32] <psha> it's not hard to write it but netherless - it needs time
[22:46:44] <qq-> i have time ..
[22:46:49] <qq-> ;)
[22:47:03] <psha> so there are two possibilities
[22:47:49] <psha> first is to link camview with libosmesa
[22:48:05] <psha> this will do completely software rendering
[22:48:11] <psha> this is less intrusive method
[22:53:22] <qq-> that > don't need any mesa , isn't it ? >> LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv://
[22:54:25] <psha> unfortunately not that yease
[22:54:34] <psha> libv4l corrupts format enumerated
[22:55:06] <qq-> hm , here works
[22:55:23] <qq-> well (even here works)
[22:55:54] <psha> they don't set bytesperline line
[22:56:02] <psha> and camunits is heavily using it
[22:57:36] <qq-> in which file ?
[22:57:53] <psha> in many places, for example for allocating opengl buffer
[22:58:00] <psha> libv4l sets it to 0
[22:58:05] <psha> and everything gets corrupted
[22:58:30] <psha> mplayer uses xv video output
[22:58:44] <psha> it's pretty difficult to add it to camunits
[22:58:49] <psha> bot nothing impossible :)
[23:01:46] <psha> bb
[23:01:52] <psha> it's 02:00 already