Personal tools
You are here: Home sirblog GUI tool(kit) to view data coming from your PIC
About the SirBot Project
The SirBot Project is a framework on which you can easily build robots. Have a look at the SirBot Labs to see what can be done with it !
Here's the Tamabot DayCare, the bot that takes care of your tamagotchi !!!

And the SirBot Ranger is able to measure distances, and detect obstacles such as fruits...
« March 2010 »
Su Mo Tu We Th Fr Sa
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
 
Document Actions

GUI tool(kit) to view data coming from your PIC

by Sébastien Lelong posted at 2009-02-15 12:04 last modified 2009-02-15 12:04
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

 application.addMenuItem("File","New") 

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.


Eyesweb


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


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


Max/MSP is derived from Pure Data. Lots of nice widgets. Runs under Mac and Windows. Not Linux.





OSC


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...

Fluxus


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


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.






Category(s)
Geek

Processing...

Posted by Vasi at 2009-08-22 18:07
What about Processing?
http://processing.org
Try the examples. Is super fast in creating an application... and real time if you want.
Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
(Required)
(Required)
(Required)

(Required)

Powered by Plone Powered by Gentoo