2011 has been an interesting year. Between the stupid earthquakes and the pressure of finishing my PhD, I have been silent because I have had nothing interesting to talk about (cf. twitter…).
But there is a light at the end, I’m on track to complete my thesis, ‘Biologically Inspired Visual Control of Flying Robots’, in December/January.
Christchurch, demolished, the old...
I’m excited to say that I have accepted a job at the Institute of Molecular pathology, in a research group studying the mechanisms of visual flight control in insects. Technology wise, it is a perfect fit; the experimental apparatus involves a multi-camera real-time flight tracking system and estimator for multiple targets in an augmented reality flight arena. It is open-source (ish), and python/numpy. Research wise, it allows me to investigate some of the assumptions and unknowns in the biomimetic control systems I implemented during my PhD. And it is in Vienna, 1st Feb, 2012!
Vienna, the new...
This is a career change for me. In the last few years it became increasingly clear that I was morally uncomfortable with the use of UAVs as weapons (drones). Previously I had consoled myself with there existing an ethical and philosophical difference between ‘the application of research’ and ‘the action of research’. When It came to looking for work, and considering who to work for, this difference was often eroded.
It has also been particularly frustrating being in New Zealand for the last 12 months and watching our flaccid national response to the three recent challenges here (world cup, earthquake, rena oil spill).
Technology Tidbits
gnome-tweak-tool is coming along nicely. I have some things in bugzilla to address, but I am happy with the state and direction.
GNOME 3 has helped my productivity greatly, maximized windows, keyboard navigation and less distractions have been welcome changes.
Pygtk is in maintenance mode (I need it to keep working for some of my UAV code). python-gobject and gobject-introspection are awesome and easy ways to write new GNOME apps.
I was recently asked to help a colleague access his image processing C-library from python; quite a common task. As those of you who are familiar with Python might realise, there are a whole bag of ways that this can be accomplished;
In this case the colleague only needed to access a single function from the library returning image data, and then hand this result onto OpenCV. One happy side effect of the new (> v2.1) python-opencv bindings is that they do no validation on CvImage.SetData, which means you can pass an arbitrary string/pointer. Because of this I advised him I thought using something like SWIG was overkill, and he could just write a wrapper to his library using ctypes, or a thin python extension directly.
Image data contains embedded NULLs, and I could not find a concise example of dealing with non null-terminated, non-string char * arrays via ctypes so I wrote one.
The full code can be found here and contains examples showing how to deal with data of this type using ctypes, and by writing a simple python extension linking with the library in question.
I just released PyGTK 2.24, which will almost certainly be the last major PyGTK release. The future of Python on the GNOME platform is PyGObject + GObject Introspection. From my experience over the last few months porting a number of my projects, the future is bright.
In a cruel twist of irony, the state of PyGTK on Windows and Mac has never been better. The credit for the windows work (and some great documentation improvements this cycle) must go to Dieter Verfaillie
I hope that the new stack will reach the same level of capability on other platforms as GTK+ 2.24, but in the large scheme of things the renewed development excitement surrounding GTK+ 3.0 and GNOME 3 is excellent consolation.
As a user I would like to thank those developers before me for creating PyGTK. It was the first ‘pythonic’ UI toolkit for linux, and a pleasure to use. As the recent maintainer of PyGTK I would especially like to thank those recent developers who helped me, in particular Dieter Verfaillie who really pushed PyGTK over the line regarding Windows support, into the great state it is now.
I’ll leave you with some graphical statistics (generated using pepper) for the 12 year history of PyGTK. If planet strips the wordpress gallery then please click here.
update: To clarify a point raised in the comments, PyGTK will be maintained in the exact same was as the GTK+-2.0 series will be maintained. Bug fix releases will be made if necessary, but no new features will be added. If you want the new GTK+-3.0 features then you should use PyGObject + GObject Introspection.
The PyGTK code will not disappear from any servers, it will continue to be shipped in all distributions for the forseeable future, it will continue to work very well on windows, and many applications will continue to use it.
The PyGTK team is pleased to announce the return of the highly popular all-in-one installer for Windows.
The PyGTK All-in-one installer provides an alternative installation method for PyGTK users on Windows. It bundles PyGTK, PyGObject, PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle and Glade in one handy installer.
Currently 32 bit Python 2.6 and 2.7 versions are supported on Windows XP and above.
Dieter Verfaillie deserves enormous thanks for this work. Firstly, he performed the tedious job of ensuring that all the component MSI installers were exactly correct, and secondly, the really difficult task of deconstructing these individual installers and reassembling their contents into a single cohesive executable.
This is a true all-in-one installer, it does not simply call out to launch the individual MSI files.
We are looking to collaborate with others who want to create gtk+ (and friends) all-in-one installers for Windows. We anticipate the tools to generate these installers will move to GNOME in future - perhaps in a common repository. Suggestions and feedback welcome.
I recently made a number of improvements to osm-gps-map, the easy to use mapping widget. The motivation for these came at the request of the foxtrotGPS developers (foxtrotGPS is a community developed fork of TangoGPS). These changes enhanced the API for adding images and tracks to the map, and in addition allowed me to clean up the basic API making it easier to use for the common case. But, there is more, especially relevant to Gtk+/GNOME 3.0.
After two complete rewrites following my initial experiments, the other gloobus developers (badchoice and kitkat) have continued to work on integrating this coverflow view into nautilus.
The implementation of the coverflow widget this time is a little more sane. It is passed a GtkTreeModel of GFiles, and basically does everything in isolation. The coupling to nautilus is quite loose, so the idea is that the widget can be reused easily by others.
The code is available from the linked blog post, or from github.
I had two days off while I moved offices, so I got a chance to catch up on my backlog of random hacking.
osm-gps-map
I released osm-gps-map v0.5.0 which adds a few new features (such as keyboard navigation) but also contains many bugfixes and performance improvements. Check the release notes for more information. The next item on the TODO is merging the OSD/layers branch.
Conduit
I released Conduit 0.3.17 which was long overdue. Mostly a bugfix release and updating to new API. The Conduit homepage has also moved to live.gnome.org. Progress on Conduit is a bit slow at the moment, it does everything I want it to (I have a budget cellphone so phone synce does not interest me), and is pretty stable. I have some SOC work I would like to merge, but basically I am looking for developers and inspiration…
PyGTK for Windows
I finished off the fixes to build correct PyGTK+ installers on windows, hopefully closing bug #589671. I uploaded new installers with the fixes people have reported. I expect these installers to become the ‘final’ installers at some point. Feedback welcome.
I wanted to play with the new client side windows work in Gtk+, so I ported the effects gtk-demo to Python. This required a bit of ctypes magic to access the new API (good), and some more ctypes magic to interact with new signals that appears to have unfriendly prototypes (not so good, bug filed here).
It has been a long time between blogs. I thought I should talk about the piece of software that has been responsible for the most emails in my inbox over the last few days - osm-gps-map, the Gtk+ based map widget. What started as a widget for use in one small application of mine has grown considerably.
Maep seems to be the flagship tile mapping application for the Nokia n900. Most notable is the wonderful onscreen display that Till has created on top of osm-gps-map.
BrainStorm is a storm chasing application that plots your track, and overlays current radar and severe warning imagery on the map.
Brainview
eCoach
eCoach is an application for recording and managing sport activities with Nokia N900, it records heart rate data from various monitors, and plots your path on the map as you exercise.
eCoach
Conclusion
With the help of these users, the future of osm-gps-map looks very positive.
I am currently working on merging Till’s improvements to master to discourage people from copying osm-gps-map source into their application.
If you are a user of osm-gps-map and I have forgotten you then I am sorry. Please contact me and join the osm-gps-map mailing list.
Some of you out there might be familiar with Gloobus. Over the last few nights I spent some time integrating Gloobus inside nautilus.
This is a proof of concept. I have done very little so far - it shows the first 8 files in the directory, and allows you to navigate between them with animation. It is mostly just a port of Gloobus from C++ into a ClutterGroup derived Actor in C, most of the thanks should go to the Gloobus author.
It features the same bugs as Gloobus, like poor support for resizing the window, positioning bugs, and it does not scale to very many files. It also leaks like a sieve (that one’s on me). Here is my inadequacy represented in video form.
Those of you who regularly work with computers and other technology will be aware of how important it is to have a good quality internet connection. If you are looking into getting a new broadband connection then I recommend you look at O2 uk broadband reviews.
However, if you would still like to take a look and perhaps fix all the bugs, the steps for testing it are