Merge pull request #61 from jtanx/master
[matches/MCTX3420.git] / irc / log
diff --git a/irc/log b/irc/log
index 96e918e..6f60854 100644 (file)
--- a/irc/log
+++ b/irc/log
 21:56 -!- jtanx [[email protected]] has quit [Ping timeout]
 23:28 -!- jtanx_ [[email protected]] has quit ["ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]"]
 23:28 -!- MctxBot [[email protected]] has joined #mctxuwa_softdev
+--- Day changed Thu Oct 17 2013
+09:16 -!- jtanx [[email protected]] has joined #mctxuwa_softdev
+09:17 < jtanx> ....
+09:17 < jtanx> I just ran the bBB with ubuntu and used the usb microscope
+09:17 < jtanx> and it worked
+09:18 < jtanx> and so too does it work on the original os
+09:18 < jtanx> wtf
+09:33 < jtanx> hahahaa 
+09:33 < jtanx> it crashed because it ran out of memory 
+09:33 < jtanx> I tried having both cameras at once
+09:33 < jtanx> and switching between them 
+09:34 < jtanx> but other than that it works
+09:34 < jtanx> this is weird
+09:44 < jtanx> about 1/5 tries fails at 1600x1200 with 'select timeout'
+09:44 < jtanx> probably because it can't buffer that fast or something
+09:45 < jtanx> but definitely to run both cameras at once (or at least have them connected), you require an external power source, either for the beaglebone or for the usb hub
+09:47 < jtanx> yep
+09:47 < jtanx> if you do
+09:47 < jtanx> modprobe uvcvideo nodrop=1
+09:47 < jtanx> It will only display part of the image
+09:47 < jtanx> probably because it hasn't filled the buffer yet
+09:48 < jtanx> but if you load uvcvideo with normal settings
+09:48 < jtanx> it either displays the full image, or no image at all
+09:48 < jtanx> the problem is, I don't know how you detect this in opencv
+10:10 -!- jtanx [[email protected]] has quit ["ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]"]
+13:47 -!- jtanx [[email protected]] has joined #mctxuwa_softdev
+14:55 -!- MctxBot [[email protected]] has quit [Ping timeout]
+17:14 -!- MctxBot [[email protected]] has joined #mctxuwa_softdev
+17:20 -!- MctxBot [[email protected]] has quit ["leaving"]
+17:22 -!- MctxBot [[email protected]] has joined #mctxuwa_softdev
+22:38 -!- jtanx [[email protected]] has quit ["ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]"]
+--- Log closed Fri Oct 18 11:45:55 2013
+--- Log opened Fri Oct 18 11:46:19 2013
+11:46 -!- sam_moor1 [[email protected]] has joined #mctxuwa_softdev
+11:46 -!- Irssi: #mctxuwa_softdev: Total of 3 nicks [0 ops, 0 halfops, 0 voices, 3 normal]
+11:46 -!- Irssi: Join to #mctxuwa_softdev was synced in 8 secs
+11:56 -!- sam_moore [[email protected]] has quit [Ping timeout]
+16:03 -!- You're now known as sam_moore
+16:03 -!- Irssi: #mctxuwa_softdev: Total of 2 nicks [0 ops, 0 halfops, 0 voices, 2 normal]
+16:03 < sam_moore> MctxBot: Tell your master that snoopy is broken
+17:41 -!- jtanx [[email protected]] has joined #mctxuwa_softdev
+17:42 < jtanx> woops
+17:42 < jtanx> I probably screwed up fstab on the sd card when trying to enable swap space
+17:42 < jtanx> sorry about not replying earlier
+19:42 < sam_moore> Haha
+19:42 < jtanx> ~.~
+19:42 < sam_moore> We used ubuntu to test the pressure sensor and microphone
+19:42 < jtanx> what were you doing with the BBB?
+19:42 < jtanx> oh 
+19:42 < jtanx> how did that go?
+19:43 < sam_moore> Alright, flot and/or JavaScript suck at large numbers of points though
+19:43 < jtanx> yeah
+19:43 < jtanx> did you finally get your hands on a voltage divider or something
+19:44 < jtanx> or hsa the electronics team finished their stuff
+19:44 < sam_moore> We just made one, but electronics does have one
+19:45 < sam_moore> "We have 2 boards and 2 of them don't work"
+19:45 < sam_moore> GPIO can't trigger the relays it would seem
+19:45 < jtanx> well
+19:46 < jtanx> what are they going to do about that
+19:46 < sam_moore> Although we only tested 2 outputs, apparently some are 4mA some are 6mA and the thing needs 5mA
+19:47 < sam_moore> I don't know? Try every single pin, actually measure the current drawn by the relay switch
+19:47 < sam_moore> Replace the transistors on the relay
+19:47 < jtanx> haha
+19:47 < jtanx> that sounds so dodge
+19:47 < sam_moore> We tried 2 GPIO pins at once :S
+19:47 < jtanx> in parallel?
+19:47 < sam_moore> Didn't work
+19:48 < sam_moore> Yeah
+19:48 < jtanx> hahaha
+19:48 < sam_moore> But I think that might cause one to draw current from the other
+19:48 < jtanx> hmm
+19:49 < sam_moore> Need to actually look at the GPIO circuit diagram to work out what that would do
+19:49 < sam_moore> Our software can sample more than fast enough for the microphone
+19:50 < jtanx> that's cool
+19:50 < jtanx> could you see it on the graph
+19:50 < sam_moore> But plotting it in flot crashes the browser
+19:50 < sam_moore> Sort of
+19:50 < sam_moore> Had to change start_time to get all the points
+19:51 < jtanx> Flot doesn't sound too reliable
+19:51 < sam_moore> It crashes after ~1s
+19:51 < sam_moore> min
+19:51 < sam_moore> not second
+19:51 < jtanx> But can we just cut down on the number of data points
+19:51 < jtanx> how many datapoints is that after 1 min
+19:51 < sam_moore> It's obviously incredibly inefficient
+19:52 < sam_moore> I will see if averaging points helps flot
+19:52 < sam_moore> Or if it's actually JavaScript not liking really big arrays
+19:52 < jtanx> yeah
+19:52 < jtanx> I think having large arrays consumes an enormous amount of memory in js, for some reason
+19:53 < sam_moore> Dammit
+19:54 < sam_moore> We could make a python GUI using requests and pyplot :P
+19:54 < jtanx> -.-
+19:54 < jtanx> wouldn't it be worse, trying to plot it on the beaglebone
+19:55 < jtanx> given that you're using a full blown computer to plot it
+19:55 < sam_moore> No, you still plot it on the client
+19:55 < jtanx> How does that work
+19:56 < jtanx> You'd have to render it on the BBB, no?
+19:56 < sam_moore> Nope; get data the same way through HTTP and plot on the client
+19:56 < jtanx> what's the difference?
+19:57 < sam_moore> The BBB doesn't gave a problem transferring data points
+19:58 < sam_moore> The browser ie JavaScript sucks at coping with them
+19:58 < jtanx> Yeah, but if you say plot on the client, how do you plot on the client?
+19:58 < jtanx> ohhhhhhh
+19:58 < jtanx> Right I understand now
+19:59 < sam_moore> Python has modules for plotting
+19:59 < sam_moore> And modules for HTTP requests
+19:59 < jtanx> You're saying instead of a web interface a python gui instead
+19:59 < sam_moore> Maybe
+19:59 < jtanx> ??
+19:59 < sam_moore> I can at least do a proof of concept
+19:59 < jtanx> I'm lost 
+20:00 < sam_moore> But we probably shouldn't redesign the entire GUI...
+20:00 < jtanx> Hey, I'm all for it if it can be done
+20:20 < jtanx> Now, to do this control page
+20:20 < jtanx> A username can only contain alphanumeric characters
+20:21 < jtanx> right?
+20:21 < sam_moore> Yep
+20:21 < jtanx> okay
+20:21 < jtanx> was just thinking if someone had say .. in their username...
+20:25 < sam_moore> You can allow other characters
+20:25 < jtanx> well as in
+20:25 < sam_moore> Not '=' though
+20:25 < jtanx> having .. in their username would move you up a directory
+20:26 < sam_moore> Ah, cunning
+20:26 < sam_moore> Thwarted by general paranoia though
+20:26 < jtanx> :P
+20:26 < sam_moore> No stupid characters in usernames
+20:27 < sam_moore> Definitely no '/' allowed
+20:27 < jtanx> hahaha
+20:27 < jtanx> I think an alphanumeric limitation is good
+20:27 < jtanx> until the university stipulates having random characters in usernames
+20:28 < sam_moore> You forget that if the university does that they will have to cope with the same kind of bullshit
+20:29 < jtanx> Yeah, true that
+21:42 < sam_moore> I pushed a python plotting thing, but I don't really think we should be switching to it at this stage.
+21:42 < jtanx> Okay
+21:42 < sam_moore> I'll try tweak the flot GUI tomorrow to make it less shit
+21:43 < jtanx> hahaha
+21:58 < jtanx> urgh
+21:58 < jtanx> barely started on the control page
+21:59 < jtanx> I guess I'll have to complete it tomorrow
+21:59 < jtanx> even though we're probably (maybe) going with james gui
+22:00 < jtanx> I've removed the width restriction 
+22:00 < jtanx> and you can hide the navigation bar
+22:00 < jtanx> for more space
+22:11 -!- jtanx [[email protected]] has quit ["ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]"]
+--- Day changed Sat Oct 19 2013
+07:59 -!- jtanx [[email protected]] has joined #mctxuwa_softdev
+10:39 < jtanx> blegh, now to start on the js for the control page
+11:10 < jtanx> what would you say if instead of all this chdir business
+11:10 < jtanx> one of the initial options to start the software is to specify where you want experiments to be held
+11:11 < jtanx> e.g /usr/share/experiments or whatever
+11:11 < jtanx> then you build the path based on the username
+11:25 < sam_moore> That sounds good
+11:26 < jtanx> Okay, I'll try to do that then
+14:37 < sam_moore> There's some kind of error in mctx.gui.js now
+14:37 < jtanx> what's happening?
+14:37 < sam_moore> A syntax error
+14:37 < jtanx> let me check
+14:38 < jtanx> what page is this on?
+14:38 < sam_moore> Line 272 (mctx.gui.js): outdiv[0].scrollHeight - outdiv.height()
+14:38 < sam_moore> Caused by loading graph.html
+14:38 < jtanx> ahhhh
+14:38 < jtanx> I know why
+14:38 < jtanx> maybe
+14:39 < jtanx> I decided to just to $("#errorlog").seterrorlog in mctx.gui.js
+14:39 < jtanx> so I don't have to repeat that on every page
+14:39 < sam_moore> The debug function also causes some error in chromium
+14:39 < jtanx> but if the page deosn't have an error log
+14:39 < jtanx> hahaha
+14:39 < jtanx> chromium
+14:39 < jtanx> what does it say
+14:39 < sam_moore> Didn't I tell you that something was causing iceweasel to segfault? I have no choice! :(
+14:40 < jtanx> :P
+14:40 < sam_moore> console.log.apply(this, arguments); causes an uncaught type error: illegal invocation
+14:40 < sam_moore> I shall replace it with "alert"
+14:40 < jtanx> hmm
+14:41 < jtanx> it's because chrome has a different implementation of console.log
+14:41 < jtanx> http://stackoverflow.com/questions/9521921/why-does-console-log-apply-throw-an-illegal-invocation-error
+14:41 < jtanx> for that bug
+14:41 < sam_moore> Right
+14:42 < sam_moore> Why is the call to outdiv.scrollTop on line 272 spread over 3 lines?
+14:42 < sam_moore> ... That's probably why it syntax errors
+14:42 < jtanx> nah
+14:42 < jtanx> it's legit
+14:43 < jtanx> the problem is there's no div there if you don't define #errorlog somewhere in your html
+14:43 < sam_moore> I thought the html was supposed to load any elements specific to that page
+14:44 < sam_moore> Which should avoid this sort of thing happening
+14:44 < jtanx> Yeah, except that we were repeating the same sort of load code
+14:44 < jtanx> in most of the pages
+14:44 < jtanx> I've just added a check in seterrorlog
+14:44 < jtanx> which should ignore if there's no such div anyway
+14:44 < sam_moore> ok
+14:44 < jtanx> that whole 'experiment dir' thing is ~.~
+14:44 < jtanx> I think it's mostly done
+14:45 < sam_moore> Ok
+14:45 < jtanx> so
+14:45 < jtanx> instead of having a file 'name.exp'
+14:45 < sam_moore> Yeah that was hacky
+14:45 < jtanx> it's a folder 'name.exp'
+14:45 < jtanx> all the stuff for one experiment gets stuck in that folder
+14:45 < sam_moore> That's slightly less hacky
+14:45 < jtanx> so you have something like
+14:45 < sam_moore> Makes sense
+14:46 < jtanx>  /experiments_folder/username/experiment_name.exp
+14:46 < sam_moore> Cool
+14:46 < sam_moore> If it ever is changed to use local user accounts you can just set experiments_folder to /home
+14:47 < jtanx> yeah
+14:47 < jtanx> experiments_folder is just an argument you pass to it when you start it
+14:47 < jtanx> -e experiment_folder
+14:49 < sam_moore> Found a syntax error in graph.html now
+14:49 < jtanx> just pushing stuff now
+14:49 < jtanx> but what's the errro?
+14:50 < sam_moore> There's an unterminated bracket on the runBeforeLoad.done
+14:50 < sam_moore> I think
+14:50 < jtanx> ah
+14:50 < sam_moore> So many brackets
+14:50 < jtanx> hehehe
+14:50 < jtanx> yeah you're probably right
+14:50 < jtanx> netbeans is giving angry red on the bracket
+14:51 < jtanx> do you want me to push the fix for that?
+14:51 < sam_moore> Well there are other issues with the page
+14:52 < sam_moore> No method "always" where it's being chained on the document.ready
+14:53 < jtanx> no wait
+14:53 < sam_moore> Wait what the hell is it meant to do there
+14:53 < jtanx> [14:52:32.186] ReferenceError: mctx is not defined @ http://localhost:8383/MCTXWeb/static/mctx.graph.js:8
+14:53 < jtanx> hmm
+14:53 < jtanx> I broke something 
+14:53 < sam_moore> That's not the problem I'm getting, but generally there are lots of wierd things here
+14:53 < jtanx> yeah
+14:53 < jtanx> sorry
+14:53 < jtanx> it was probably working before I pushed changes yesterday
+14:54 < sam_moore> You have runBeforeLoad.done() calling $(document).ready which does nothing, but is chained to .always which will then call $(document).ready which then loads $("#graph-controls").setDevices()
+14:55 < sam_moore> ... I think what I originally had was runBeforeLoad.always() calling $("#graph-controls").setDevices
+14:55 < sam_moore> Possibly inside a document.ready
+14:55 < sam_moore> But now mctx.gui.js is calling document.ready itself...
+14:55 < jtanx> waiit
+14:55 < jtanx> I think it's ok now
+14:56 < jtanx> it was just brackets
+14:56 < jtanx> I'll try it on my server first
+14:58 < jtanx> yeah, I see what you mean
+15:01 < jtanx> ahh
+15:01 < sam_moore> Well I fixed it enough to test stuff
+15:01 < jtanx> yeah
+15:02 < jtanx> you planning on modifying stuff?
+15:02 < sam_moore> I think it's just a matter of having runBeforeLoad().done() call $(document).ready() and then initialise stuff
+15:02 < jtanx> I'll just keep it in my repo for now
+15:03 < sam_moore> With runBeforeLoad.fail if you want to handle bad stuff
+15:03 < jtanx> I just made it
+15:03 < jtanx> runBeforeLoad().always(function() {
+15:03 < jtanx>         $(document).ready(function() {
+15:03 < jtanx>           $("#graph-controls").setDevices();
+15:03 < jtanx>         });
+15:03 < jtanx>       });
+15:03 < sam_moore> Yep, that's what I just did
+15:03 < sam_moore> You can commit it and I'll pull it
+15:03 < jtanx> okay
+15:03 < sam_moore> If you fix the console and the errorlog things as well
+15:03 < jtanx> yep
+15:03 < jtanx> pushed that too
+15:05 < sam_moore> Hmm, start_time = -1 is not actually giving the most recent second of data
+15:05 < sam_moore> That might be a server API problem
+15:05 < jtanx> hmmm
+15:05 < sam_moore> But it might also explain why things were shitting themselves so much with the fast sampling rate
+15:06 < jtanx> what is it giving?
+15:06 < sam_moore> Because the jQuery would be getting hundreds of thousands of points...
+15:07 < sam_moore> At the moment the server API is not giving any points and giving back a stupid value for start_time
+15:07 < sam_moore> I think I might have broken it when I changed all the clocks
+15:07 < jtanx> when did you change ti?
+15:07 < sam_moore> Just now
+15:07 < jtanx> ah
+15:07 < sam_moore> I'm hoping that my first assumption about the thousands of points was the case before I broke it as well :P
+15:08 < sam_moore> (ie: It was already broken before I broke it more)
+15:08 < jtanx> ahahahah
+15:08 < jtanx> I can try
+15:08 < jtanx> I still have the old version
+15:09 < jtanx> with start_time=-1 it returns nothing
+15:09 < jtanx> start_time in the response is constant
+15:11 < sam_moore> Yeah I get wierd stuff
+15:11 < sam_moore> start_time = 17889.590701
+15:12 < sam_moore> "current_time" : 18589.539255
+15:12 < jtanx> is that with clock_gettime?
+15:12 < sam_moore> "running_time" : 699.948554,
+15:12 < sam_moore> Yes
+15:13 < sam_moore> Oh herdurp
+15:13 < sam_moore> start_time in the JSON response is *not* the same as start_time the parameter to the sensor
+15:13 < jtanx> yeah
+15:13 < sam_moore> .... should probably change that
+15:13 < jtanx> start time of experiment
+15:14 < jtanx> experiment_start_time?
+15:14 < jtanx> long variable names...
+15:14 < sam_moore> I think it's actually the program start time
+15:14 < jtanx> nup
+15:14 < jtanx> experiment starttime
+15:14 < sam_moore> Alright
+15:14 < jtanx> oh
+15:14 < jtanx> actually you may be right
+15:14 < sam_moore> Haha
+15:14 < jtanx> I thought i changed it
+15:14 < jtanx> wway back when i did the control stuff
+15:15 < jtanx> initially
+15:15 < sam_moore> ControlData has a start_time variable
+15:15 < jtanx> yeah
+15:15 < sam_moore> But g_options has a start_time variable
+15:15 < sam_moore> -_-
+15:15 < jtanx> that's confusing
+15:15 < jtanx> hahaha
+15:15 < sam_moore> Yeah, what idiot designed this...
+15:15 < jtanx> ~.~`
+15:19 < sam_moore> Right, sensor values are being saved relative to Control_GetStartTime (experiment starting time)
+15:19 < sam_moore> That's fine
+15:19 < jtanx> yep
+15:19 < sam_moore> Sensor_Handler gets "current_time" from that as well
+15:19 < jtanx> Thread safety on that is dodgey
+15:19 < jtanx> I must say
+15:20 < jtanx> but it's probably fine
+15:20 < sam_moore> It's fine, clock_gettime is posix thread safe
+15:21 < sam_moore> Oh, do you mean if the experiment changes
+15:21 < jtanx> yeah
+15:21 < jtanx> the whole *Control_GetStartTime() looks dodgy too
+15:22 < sam_moore> Perhaps just a "double Control_CurrentTime()" would be better
+15:22 < sam_moore> But it works
+15:22 < jtanx> hmm
+15:24 < sam_moore> Anyway, I think start_time=-1 is not giving any data because the default sampling rate is 1s and therefore current_time - 1 is outside the data range most of the time
+15:25 < sam_moore> start_time=-3 gives a single point with the default sampling rate
+15:25 < sam_moore> Increasing the sampling rate then you appear to get the right points
+15:31 < sam_moore> I'm going to repeat my timestamp test with the current software under regular kernel and RT linux
+15:32 < sam_moore> I know we can't ever get RT linux but I want to see if it makes much of a difference
+15:46 < jtanx> okay
+15:50 < jtanx> finally... back to actually coding the control page
+22:59 -!- jtanx [[email protected]] has quit ["ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]"]
+--- Day changed Sun Oct 20 2013
+15:56 -!- Callum [[email protected]] has joined #mctxuwa_softdev
+15:59 < Callum> hey sam, got a link to the dropbox?
+16:06 < sam_moore> https://www.dropbox.com/sh/km90dmbdrgin3mg/OimGp0qopv
+16:06 < Callum> thanks
+16:07 < sam_moore> I think I might be able to hack together a user management system based on UserCake
+16:08 < sam_moore> Someone else will have to make it look pretty though
+17:25 < Callum> opencv is fucking retarded.
+17:25 < Callum> C++ has a bunch of different functions for each individual type of blur
+17:25 < Callum> C has one function but you pass it an ID for which type of blur you want to use..
+17:30 < sam_moore> OpenCV used to be in C, but they moved it to C++
+17:30 < sam_moore> But it still supports the C API
+17:30 < sam_moore> Through some wierd magic
+17:30 < sam_moore> At least, if you run our program in valgrind, it reports a lot of stuff happening with things like "std::string" and "cv::Mat"; ie: C++ namespaces
+17:32 < Callum> yea. its a bit of a bitch to code in C...all the documentation is for c++ pretty much
+17:32 < Callum> like right now im trying to find out how to simply set all elements to 0.. where in c++ its just Mat::Scalar(0)
+17:32 < sam_moore> If you really want you can probably compile in C++, but I'm not sure if it will cause issues elsewhere
+17:33 < Callum> il just keep going like this. just a couple of things atm i need to figure out. hopefully thats it
+17:33 < sam_moore> Cool
+17:34 < sam_moore> The server now supports 3 entirely different authentication methods :S
+17:34 < Callum> haha. a little excessive.
+17:34 < Callum> hopefully they'll be happy with atleast one of them..
+17:34 < sam_moore> If we modify UserCake we can run our own user management system
+17:35 < sam_moore> I need to change it so that instead of users registering themselves it's the admin that adds users manually though
+17:35 < sam_moore> Also we'd have to get email working
+17:57 < Callum> uuh. so using one of his test images for the microscope, running it through Canny gives a bunch of squiggly lines all over the place
+17:57 < Callum> its funny, the part which is actually the edge...has the most black
+17:57 < Callum> il try some of his other images and see what it does
+20:22 -!- Callum [[email protected]] has quit [EOF From client]
+20:50 -!- MctxBot_ [[email protected]] has joined #mctxuwa_softdev
+21:05 -!- MctxBot [[email protected]] has quit [Ping timeout]
+21:06 -!- Irssi: #mctxuwa_softdev: Total of 2 nicks [0 ops, 0 halfops, 0 voices, 2 normal]
+21:08 -!- jtanx [[email protected]] has joined #mctxuwa_softdev
+21:10 < jtanx> working on the report the day before...
+21:10 < jtanx> what is this madness
+22:23 -!- jtanx [[email protected]] has quit ["ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258]"]

UCC git Repository :: git.ucc.asn.au