I now have quite a nice base for my SirBot project, highly configurable, and hopefully more stable now implementation is done using Twisted (no threads anymore). With this base, any data coming from the PIC (a request, a response, a message, seeÂ SirBot’s docÂ for more), can be parsed and objects can be created from them. Then spread to whatever application needs them. Now the time has come to build a GUI…
For instance, I’ve experimentedÂ back-emf while trying to control DC motor. This was very fun and produced very nice data and graphs. But those were done after the experiment. I just logged raw data on a file, then process them with a awful python script to build gnuplot graphs. Where is the real-time ? Observing these graphs in real-time is now mandatory. I need to know what’s going on this bot !
Yes, I now need to build a GUI, and it really pisses me off The simple idea I could write
really gets me sick. It’s so much waste of time in my opinion. I just don’t want to design a GUI, selecting the appropriate layout, putting some code for buttons here and there. Maybe I’d need a graphical GUI builder. But when it comes to deal with real-time graphs, I’ll need to implement a sort-of canvas, and draw points on it, and… I just don’t want to spend my time on this, I just want to see my data coming from my PIC. In real-time. And I’d like it flexible, with a lot of widgets, like gauges, sliders, knobs, etc…
I first tried and thought to have a solution withÂ Flex. Interestingly enough, Flex can be used to build GUI with real-time data. It’s quite fun to use, compiler is open-source, documentation is awesome. Lots of widgets are available, for free, likeÂ Fusion Charts. And it’s cross-platform since it’s all about Flash. I prototyped and even wrote a Flash gateway to spread message from the SirBot’s core, over a Flash XMLSocket. Worked great, nice performance. Then I tried to add some colors and… you have to sub-class, add callbacks for whatever I don’t know, etc… I may have missed something, but it looks too complicated for just what I want to do. And most importantly, I’ll need to design a layout, add a menu, add a button here, write the code so when to button here is pressed, then it switch on this pane. I just don’t have time !
So, how can I do this ? How can I build a rich GUI, with real-time widgets, easy and fast to implement ? Which tool(s) to use ? Is there a tool which can do this ?
Though I’ve never tried it,Â LabviewÂ seems to be a solution, but it’s way, way too much expensive, and there’s no free-of-charge edition for the “cheap guy”… Looks like I need aÂ Labview alternative. During this “quest”, I’ve found many interesting projects. What can be surprising is most of the time, this is about sounds, videos and artistic related projects.
I first foundÂ EyeswebÂ throughÂ BioMobius, which integrates it, adds blocks dedicated to the biomedical field (and also provides an awful GUI builder…).Â EyeswebÂ is free, works on Windows. It looks very powerful, and seems to be a real Labview-alternative. Its first purpose was about to deal with audio and video, in real-time, with motion-capture, for artistic projects. I can remember having read it was used on a opera, to produce nice visual effects according to what’s going on the scene.
I tried to prototype things, and the cost to enter is quite high (but this is what I expect for these type of tools). I tried to connect it to my SirBot’s core, via a NetReceiver, but it just crashes. This really is a nice tool, I’d need to spend more time on it, if others don’t do the trick. And the motion capture can be interesting when I add a camera to my bot…
Pure DataÂ is an old project. I’ve seen many incredible videos on youtube about it. Though it has a visual environment, it’s more like classical “type” programming: you have to know objects’ name, and what you can do with them. Runs under Linux.
I did not give a try with this one, but it looks very powerful and fast. It may be too much audio-oriented.
Max/MSPÂ is derived from Pure Data. Lots of nice widgets. Runs under Mac and Windows. Not Linux.
Open Sound Control. Not a GUI toolkit nor a tool by itself, but a specification: “Open Sound Control (OSC) is a protocol for communication among computers, sound synthesizers, and other multimedia devices that is optimized for modern networking technology.” Many, many tools I’ve found, included those listed here (and particularlyÂ Eyesweb), can useÂ OSCÂ as input.Â OSCÂ is used inÂ many areasÂ other than sounds. I think I’ll need to implement a OSC output in SirBot’s core.
Other fun tools…
From their site: “Fluxus reads live audio, midi orÂ OSCÂ network messages which can be used as a source of animation data for realtime performances or installations. Keyboard or mouse input can also be read for games development, and aÂ physics engineÂ is included for realtime simulations of rigid body dynamics.” Looks fun ! While not directly usable for what I want (and from what I understand), it may be interesting to keep this in mind. For instance, it could be used to “just” produce a visual… stuff which globally represents the bot’s state. No “scientific” graphs, or the like. Just… visual stuff.Â FluxusÂ can be programmed in live (seeÂ this videoÂ for more). No GUI, no visual programming.
SuperColliderÂ seems very similar to Fluxus. Live coding, no GUI, just type and to see/listen to the results. See thisÂ video, scratching with a WiiMote
There are many other tools, libraries out there, (Quartz Composer,Â vvvv,Â CSound, …) to deal with real-time data, lots of artistic projects I just discover (and started to discover withÂ Arduino), and look very, very fun
So, which to choose ?
I don’t know yet, butÂ EyesWebÂ probably fits my needs the best. Others are of interest too, but maybe not right now. I have to spend more time onÂ EyesWeb, and build a real prototype for validation, probably based on a OSC server/gateway.