I’m trying to build a Raspberry Pi powered robot based on the DRDs from Farscape, I thought I’d blog my progress.
DRDs or “Diagnostic Repair Drones” are robots from the cult science fiction series Farscape. They carry out various functions aboard a leviathian (a species of living biomechanoid spaceship) including repairing and maintaining the ship. They’re ovoid in shape and they have two moving eye stalks and all sorts of tools like a robotic claw and a plasma welder.
Here’s some video footage from the series to give you an idea of what these little guys get up to:
The original DRDs were designed and built by the extremely talented folks at the Jim Henson Creature Shop in London (yes Jim Henson as in the Muppets!). They built lots of different variations of the robot over the years to be used in shooting different scenes for the show, but to my knowledge they’ve never released any designs.
I assumed I was going to have to painstakingly design a 3D computer model of one based on frame grabs from my DVDs of the series. I then planned to track down someone with a CNC router and a vacuum forming machine and persuade them to let me use them. Either that or find someone with an industrial sized 3D printer!
Luckily I came across a special effects company in the US who sells a kit to build a model of a DRD. The model is made from hollow cast fiberglass and resin and comes with ribbed plastic for the eye stalks, eye pieces with clear lenses, two parts of a claw and some colourful wires to make it look the part.
The kit isn’t perfect. The size, shape and proportions aren’t quite right and the finish is a bit rough but it’s good enough for my purposes. The part I’m really interested in is the robotics so I’m grateful that someone has already done the work for me on the basic shell.
The web site provides video tutorials on how to build the model and then how to put LEDs in the eyes and mount an remote controlled car underneath to make it move about in a bit of a crude fashion.
We can be a bit more sophisticated than that.
The Raspberry Pi is a credit-card sized computer developed in the UK by the not-for-profit Raspberry Pi Foundation to promote the teaching of programming in schools. It’s a single-board computer with a 700Mhz ARM processor and 512MB RAM, boots off an SD card and costs only around £30.
This is my Raspberry Pi:
The Gertboard is an expansion board which attaches to the Raspberry Pi via its GPIO pins and helps when experimenting with interfacing the Pi with the outside world. It comes with an Arduino compatible AVR microcontroller, analogue to digital converters, digital to analogue converters, a motor controller, push buttons, LEDs and much more.
Booting the Pi
The Raspberry Pi can boot Linux from an SD card and the most popular distribution is Raspbian which is a Debian-derivative. You can download an image and flash it to an SD card, or even buy an SD card with it already loaded.
To boot the Raspberry Pi all you need to do is insert your Raspbian SD card, plug it into a TV via either the HDMI port or the composite video port and power it up by plugging it into a Micro USB phone charger.
Here’s my Raspberry Pi booted and plugged into an old CRT TV:
Logging In Remotely
It’s cool that I can plug the Raspberry Pi into a TV, but I don’t want to be squinting at an old portable TV or sitting in the lounge next to my big flatscreen TV all the time I’m programming the robot, so I want to be able to log in remotely. Also, my plan is to build a web interface to control the robot over WiFi, so it’s going to need to connect to a network at some point.
First I plugged a USB keyboard into the Raspberry Pi and an ethernet cable to connect it to my network. The SSH daemon is already started by default, but I wanted to set a static IP address so that I always knew what to log in to.
I logged into the Raspberry Pi locally (the default username is pi and the password is raspberry) and edited the network configuration using the vi text editor.
$ sudo vi /etc/network/interfaces
I provided the following configuration to assign a static IP address of 192.168.1.42 on my local network:
iface lo inet loopback
iface eth0 inet static
Then restart the network interface with:
$ sudo ifdown -a
$ sudo ifup -a
Then check that I’m connected to the network, and the Internet by pinging Google.
$ ping google.com
I see that I’m successfully connected, so I can now log into the Raspberry Pi remotely using its new static IP.
From my desktop Linux box I type:
$ ssh firstname.lastname@example.org
type in the password “raspberry”, and voilà! I’m logged in.
I hope you weren’t expecting to see a finished robot! There’s a very long way to go yet.
If you desperately wanted to see a finished robot, here’s a picture of the last one I worked on, a line following robot we built at university powered by a PIC microcontroller.
Next I want to start playing around with the Gertboard and and make LEDs blink on and off from Python.
Through Krellian I will be able to continue to lead the Webian project, and I will also be taking up a new contract with the Mozilla Corporation to work with them on Boot to Gecko (B2G).
Like me and the other members of the Webian community, Mozilla believes that the open web can displace proprietary, single-vendor stacks for application development. The B2G project will include prototype APIs for exposing device and OS capabilities to web content, a privilege model to safely expose these new capabilities, a complete "low-level substrate" for Android-compatible devices and a collection of web apps to prioritise and prove the power of the platform.
Benefits to Webian
The potential benefits for Webian are enormous. Webian Shell was already hitting limitations of what is currently possible with Mozilla Chromeless and this new work on the core Mozilla platform promises to make many more of Webian's goals possible. While B2G initially focuses on the mobile space, Webian can focus on nettop and netbook form factors and perhaps eventually the two projects could even converge.
Sponsorship from Krellian will provide the ongoing resources necessary for running the Webian project and ensure that it remains free and open source.
I'm excited about this new chapter in Webian's story and believe more strongly than ever in the future of the open web.
The best thing about web apps is that they can run on any platform. This is because they use a set of open standards which are universally supported. The latest incarnations of these standards like HTML5 and CSS3 are more powerful than ever and it seems inevitable to me that the web will eventually win out as the open, universal app platform.
The current generation of popular desktop operating systems like Windows 7, OS X and Linux and mobile operating systems like iOS, Android and Windows Phone treat web apps as second class citizens, inferior to their native platform-specific counterparts. But that's all set to change.
Microsoft Windows 8, Google Chrome OS, The Linux Foundation's Tizen and Mozilla B2G will all join Webian in putting web apps centre stage, as the preferred category of app on their respective platforms.
Thanks to HTML5 and related standards web apps are already pretty powerful, but there is still some way to go before web apps can do everything that native apps can do. On mobile platforms new APIs are needed for access to telephony, messaging and cameras for example, and some kind of "app store" style distribution and installation mechanism is likely to be needed to provide a more app-like experience. "Installing" a web app is a little like bookmarking a web site and can provide an opportunity for the app to ask the user for all the permissions it needs up-front, download any resources which will be needed for offline use and perhaps add an shortcut icon to an app list.
Because there aren't currently established standards for all of these features, each platform is intially rolling its own approach. Apps for Chrome OS can only be found via Google's own "Chrome Web Store", you have to have a Google Account to install them and many of the apps found there will only work in Chrome. Windows 8 will have a set of APIs for its new Metro user interface, but apps written for Metro won't necessarily work on other platforms. We don't yet know much about Tizen, but previous mobile platforms like HP's WebOS and the MeeGo Web Runtime have also had platform-specific APIs.
An Open Approach
Mozilla is also working on a new set of web APIs, but in line with their mission of promoting openness on the web they're doing so in a more open way. You can see the progress of their APIs for telephony, messaging (SMS), battery, visibility, settings, power management and contacts on Bugzilla. These new APIs on Mozilla's core platform are the first step towards a new mobile OS from Mozilla called B2G or "Boot to Gecko". B2G will have a highly customisable UI built entirely with web technologies and will allow for the installation of Open Web Apps, as proposed by Mozilla Labs. With Open Web Apps, anyone can run their own app store or directory and the aim is to create cross-platform installable web apps.
Mozilla is also collaborating with Google on "Web Activities" or "Web Intents" which could provide a standard mechanism for apps to call other apps for certain functions. This collaboration is a promising sign because Mozilla can not define standards on their own and will need to co-operate with other browser & OS vendors.
For example, W3C Widgets provide a mechanism for installing a "widget" locally on a device by packaging up all of its resources in a zip file, including an XML manifest file. The specification was used for widgets in the Opera browser but when the MeeGo Web Runtime tried to use it as a method of installing fully fledged web apps it didn't work out very well.
Mozilla and Google are taking a different approach to installable web apps, both choosing to use a JSON manifest file and rely to a large extent on HTML5's offline capabilities for caching and updating offline resources. Even these two similar implementations have subtle differences which make them incompatible with each other so there's a real need for standardisation in this area if we're to have cross-platform installable web apps.
Hosted vs. Packaged
One slightly odd trend in the standardisation of "web apps" is the tendency to focus on "packaging" apps rather than "hosting" them. This seems to be an attempt to emulate the way mobile and desktop apps currently work by bundling up all of the app's resource in a "package" which is downloaded and installed locally. The whole package then needs to be updated every time any of the resources change. This seems odd to me because this isn't the way the web usually works and it doesn't seem very web-like at all.
The fact that an individual resource can be identified by a URI is what makes it a part of the web, so to package resources up in one big bundle to be downloaded and used locally seems to break the web paradigm and therefore these apps are not "web apps" in my view, just apps downloaded over the web. This is how W3C widgets work and it's also how Chrome "packaged" apps work and seems to be the direction of the Wholesale Apps Community, the EU funded Webinos project and the Native Web Apps community on the W3C web site.
It seems that web apps will be the preferred category of apps for a whole new generation of operating systems, but in order for these web apps to remain cross-platform new open standards must be agreed upon for APIs which give web apps all the power of native apps.
A mechanism for the discovery, installation and updating of hosted installable web apps and a trust framework which allows for secure open distribution is also something which I think desperately needs standardisation if the vision of a universal open web app platform is to be realised.
(Reposted from the Webian blog) Webian Shell is a full screen web browser for devices that don't need a desktop. As of today you can download a prototype which you can try for yourself.
A Graphical Shell for the Web
If you’re anything like me then you’ll find that most of the stuff you do on your PC these days happens in a web browser and the desktop environment you used to depend on is now just getting in your way. Modern web applications can do just about everything traditional desktop applications can do (like flashy graphics, sound, video and offline storage) so often all you really need is the browser. The idea of the Webian Shell project is to replace your computer’s interface with something much simpler, which treats web applications as first class citizens and does away with all the un-necessary clutter.
These are some of my ideas for future directions to take the prototype, but I’d love to hear your ideas.
Home screens – instead of a desktop, Shell could have multiple home screens like you see on mobile devices, but containing web widgets and icons for “installed” web apps. See Mozilla’s Open Web Apps project for some inspiration.
Hardware controls – any graphical shell for a hardware device needs the ability to monitor and control hardware for things like sound, network, GPS, battery etc.
Zoomable tiled window manager – zoom out to a view of all currently loaded web pages (like Panorama in Firefox or Expose in OS X), then zoom in to the page you want.
Some Google Chrome engineers uploaded a video they called a "Chromercial" to promote Chrome OS, much to the marketing department's dismay! They asked for video responses where you give your own take on Chrome OS.
I originally created the artwork I used in this video for my "Graphical Shell for the Web" design concept which basically portrays the same idea as Chrome OS (but was published before Chrome OS was released!)
I created the artwork using Inkscape and put the video together using PiTiVi. I used Creative Commons licensed music and sound effects and licensed the video itself under a Creative Commons Non-commercial Sharealike license so you can remix & share it as much as you like. You can download the source png slides and sound files (along with the completed video in ogg format) here (I also have the SVG source of the images if anyone wants it).
When I first heard about Google's and then Mozilla's concepts of "installable web apps" I was a little dubious. Surely the whole benefit of web applications is that they don't need to be installed!
But if you think of installable web apps as a convergence of the "app store" and "cloud computing" models (arguably the two most significant trends in the software industry today) it actually makes quite a lot of sense.
The diversity of different software platforms available for smartphones, tablets, smart TVs and PCs is great for encouraging competition and driving innovation – but it also causes problems for both app developers and consumers. An app written for Apple's iOS for example will not run on Android, Blackberry OS, WebOS, Meego, Bada, Symbian or any other competing platform. For consumers this is confusing and frustrating because unless they allow themselves to be locked in to a single vendor they may have to re-purchase different apps for different devices. For app developers it's even more frustrating because they're faced with a bewildering array of platforms to target their software at.
Web applications have different problems with limited discoverability and access to hardware. To a web browser web applications are no different to any other web site which means that the apps can easily get lost in the ocean of content on the web. Web apps also traditionally have very limited default access to client-side hardware for security reasons which limits their capabilities when compared to native applications.
Installable web apps can combine the best parts of web applications (the benefits of cloud computing and accessiblity from any device) with the best parts of the app store model (easy distribution and discovery of software which has full access to the device's hardware). This new breed of apps could leverage web technologies to reach the whole range of competing platforms with a single application which can be distributed via a range of competing app stores. By "installing" a web application the user can pre-approve access to local hardware like offline storage, accelerated graphics and geolocation to allow the app to make the most of the hardware it's running on and the user can keep a local repository of all the applications they use.
Both developers and consumers only have to worry about one kind of application running on one open platform (the web), but still have a choice of hardware and app stores. In this model the only people who lose out are the corporations who seek to lock consumers into their own products and services.
It could take a long time for installable web apps to become the predominant model of software distribution, but the idea of converging cloud computing with the app store model makes the idea very appealing and might go some way to explaining why Google currently has both the Android and Chrome OS operating systems in development. Each OS is approaching the convergence from a different direction whilst maximising on the market potential of what can already be done today.
I hope that standards for "installable web apps" can be agreed upon sooner rather than later so that if this model does become a growing trend, the new breed of apps will not suffer from the same fragmentation as other platforms do today.
Apart from netbooks, tablets and smartphones another key target device for accessing Webian Home Server will be TVs. With big players having recently announced their entries into the smart TV space, this blog post explores their different approaches and the unique challenges of designing for the TV.
Many companies have tried to combine web and TV experiences before, but it's never really caught on. Google believes that their approach will be a success because they aren't trying to re-create the web for the TV or make you choose between the web or TV, instead they want to give you access to the whole of the existing web and all the channels you already receive, as well as allowing you to install apps from the Android marketplace all from one device.
Google TV will allow all of this to be done via a 10ft interface with a remote control including a full QWERTY keyboard and pointing device. The software stack will include the Android operating system, Chrome browser, Flash and a new IP-based protocol to interface with DVR boxes allowing you search TV listings and schedule recordings.
Rather than a releasing a single Google branded device, Google has defined a standard hardware and software platform which will be implemented by multiple device manufacturers. Among the first will be an HDTV and BluRay player from Sony and a set-top box from Logitech which are expected this autumn.
Apple has recently announced the release of the latest generation of Apple TV which takes a very different approach to that of Google. The original version of Apple TV was released in 2006 but didn't prove to be a huge success. In the keynote announcing the new version, Steve Jobs explained that Apple had learnt a lot from the customers who did buy the original set-top device and that this time they think they've cracked it.
Apple's observations were that consumers want premium HD content delivered to their TV, but they don't want a "computer" on their TV or to have to manage storage on their TV or sync content with other devices. Their response is a new generation of Apple TV which is a smaller streaming-only device which streams content from other Apple products (iPod, iPhone, iPad or iMac) over the home network or from Apple's partners over the Internet with a rental model.
The new Apple TV is characteristically proprietary but well designed, with a slick custom UI for a closed list of tightly integrated online services. Apple has chosen a much simpler remote control with just a few buttons and opts for an interaction style much more familiar to TV users.
Another smart TV option comes in the form of the Boxee Box from a small startup in the US. You can already download a beta of the Boxee software to your PC but with "Boxee Box", D-Link has manufactured a piece of hardware dedicated to using Boxee on your TV which is available to pre-order now.
The Boxee software has an interesting heritage (having been derived from the open source XBMC project) and has a great UI which is well suited to a 10ft interface. The remote control which comes with the D-Link device has a simple ordinary looking remote on one side, but you can flip it over to reveal a full QWERTY keyboard if you need it.
Boxee is pretty rich on features, it will let you stream films, TV shows, music and photos in a large variety of formats over your home network and adds a social dimension by allowing you to share what media you're viewing with your friends. Boxee will also have a Webkit-based web browser built in and is extensible through the development of apps.
Whilst big and small tech companies in the US launch their entires into the TV space, big media companies in the UK have been collaborating to create a new platform called YouView. YouView is billed as a replacement for the popular free-to-view TV "FreeView" boxes currently popular on this side of the pond.
YouView (previously codenamed Project Canvas) will provide the familiar digital TV channels but will also provide on-demand catch-up content from all of the major UK channels on your TV. YouView will also let you pause & rewind live TV, it will provide pay-TV options and will allow developers to create apps for the platform.
The BBC's heavy involvement in YouView is controversial with some other media companies who complain that the license fee funded corporation should not be using their resources to develop this platform which they argue damages competition for smaller players. Although the collaboration of so many large media and communications companies makes YouView a compelling choice in the UK, it doesn't follow existing standards common in Europe and the rest of the world.
Currently YouView is publicly little more than a collection of technical documents available on the web, but the first devices are scheduled to be launched in Q1 2011 and are likely to make a big splash in the UK.
The products described above seem to have caught the attention of the media and blogosphere recently, but there are of course many other options out there. Other big players in this space include Microsoft's older Zune and Mediaroomplatforms for the XBox 360 games console and set-top boxes respectively and Samsung's own app platform for their high end TVs. There are also many open source projects like MythTV which provide a geekier way to create your own smart DVR.
The four different products described here take quite different approaches to the smart TV problem but also have similarities. I very much support Google's open approach but they could learn a thing or two from Apple's user experience, I'm really not sure a QWERTY keyboard and pointing device is going to catch on in the living room – the TV is not a PC. Boxee provides a compelling alternative but their app platform may struggle faced with competition from Android and others. YouView will be difficult to ignore in the UK but it provides yet another platform to develop apps for.
One thing all four have in common is the idea that the TV is for streaming content from other sources, not as the media centre for the home. The smart TV solutions presented here allow you to stream media from the Internet or from other devices like PCs, tablets and smartphones on the home network to your TV – but there is no central store for your whole media collection which can be accessed 24/7 by all of these devices.
If there was such a centralised media store then creating an app for every smart TV platform, mobile platform and tablet platform in order to access that media would seem impractical. The common denominator among all of these devices (with the exception of Apple TV which currently offers no opportunities for third party development) is the web, specifically HTML5. A single HTML5 web application hosted in the home could allow access to your entire media collection 24/7 from all of these devices.
The challenge for such web applications will be to create a user interface which works well on such a range of form-factors – from a small multi-touch smartphone through to the 10ft interface of a smart TV with a simple remote control. This will require a new breed of applications which can be controlled in a variety of ways and can adapt to a range of different screen sizes. Some examples of these experimental new types of web applications are YouTube Leanback, Google Reader Play and Clicker but it's likely to take a long while for best practices to emerge.
With approximately 1 billion PC users, 2 billion mobile users and 4 billion TV users worldwide – web applications with the potential to support all of these devices would seem very compelling indeed!
This is why the Webian project will strive to create a graphical web interface which provides an enjoyable user experience across all of these form factors.
A quick update on some foundations being laid for the Webian project.
The project scope has been set. Broadly this covers managing photos, music and videos but with some potential future directions and specific exclusions as well. Some very high level requirements have been developed for the first release with a focus on photo management.
The focus for the first release will be on making a really good job of photo management using a slick HTML5 interface. That includes uploading photos, organising them into albums, tagging them, subscribing to photo feeds, browsing and searching.
A simple initial architecture design describes an HTML5 interface served from a Django-based Python web application. The next step is to build some technical prototypes to explore some key technologies and UI prototypes to validate the key high level use cases. This will mark the end of the "inception phase" of the project and next will be the "elaboration phase" when the architecture design will be tested with a working architecture prototype.
Talking of phases, the project plan approximates the Agile Unified Process but with a particularly user-centered flavour. The AUP is kind of an Agile version of the heavyweight Rational Unified Process used in enterprise software development. The AUP is described as being "serial in the large, iterative in the small" and aims to take a lightweight, iterative approach to software development, but with the recognition of distinct phases of the project. I've chosen to experiment with this methodology to try and get the best out of both user-centered design and agile development. If it doesn't work, I'll switch to something else!
If you want to get involved in the Webian project then sign up to the mailing list and introduce yourself!
The current popular breed of social networking services are closed networks which don't connect with each other. If a user from one network wants to connect with a user on another network, they generally have to sign up for an account with the second network. This inconvenience ultimately results in a few very large networks with an inordinate amount of control over peoples' most personal data and a lack of choice and privacy for users.
Current Social Networking Services
In 2007 I wrote about an idea for building a distributed social network using a collection of existing open standards. The idea was to allow for social networking functionality equivalent to services like Facebook, but in a more open way where users can choose their provider or host their own data, but still connect with each other. The result would be a "network of networks" connecting to each other with open standards and ultimately much more control and choice for the end user.
Distributed Social Networking
Things have moved on a little since 2007 and a new collection of protocols has now emerged to allow near real time publishing of "activity streams" which can be discovered and commented upon within a social graph in an open, distributed way. You can think of this as a Facebook news feed, but without Facebook. Users will be able to choose from a whole range of different social networking services (or even run their own), and connect with their friends on different networks. Your news feed can then aggregate information from all of the people you're following across a range of different networks, update you about what's going on in near real time and allow you to send a response from your network to theirs.
OStatus is a collective name given to a suite of existing protocols which make this possible. They include:
PubSubHubbub – Real-time publishing ("PuSH")
ActivityStreams – Represent social actions in XML with Atom
Salmon – "Upstream" comments and replies
Portable Contacts – Social graph and contact data sharing
WebFinger – XML representation of a user's identity in terms of the services they use
The OStatus standardisation process is just getting started to define how these existing protocols can work together, but sites like Google Buzz, StatusNet, WordPress.com, and Tumblr are already implementing some or all of the protocols.
There are lots of projects which are working on the idea of distributed social networking. One which has attracted a lot of attention in the press recently is Diaspora which was recently started by a group of four students from New York University thanks to funds raised with an online campaign. The Diaspora team hasn't released any code yet, but they have committed to supporting OStatus. There are many other similar projects, including but not limited to:
Hopefully OStatus and some or all of these projects can do for social networking what SMTP & Sendmail did for email, what HTTP/HTML and Apache did for document sharing and what RSS/Atom and WordPress did for blogging. If just some of these projects choose to support the OStatus group of protocols (some of them already have), then the social web will be a much more open place!
Hello, World! I'mBenand I'd like to introduce you to theWebianproject.
Desktop to Web
You may have noticed that there's a growing trend of web applications replacing desktop applications, a mass migration from the "desktop" to the "cloud". Web applications are great because you can access them from anywhere, on any web-enabled device and their networked nature means they can be more connected and social than their desktop counterparts.
All of this innovation is building momentum around a new standard calledHTML5which is going to transform the web as we know it. Web applications of the future will be richer, more graphical, more interactive, will include high quality audio and video and may even work if you don't have an Internet connection. In other words, they'll have all the power of desktop applications but with all the benefits of the web.
Host Your Own Data
At home I have a collection of documents, images, audio and video measuring in the terabytes. No commercial service will currently host this amount of data online for me at a reasonable cost and even if it would, I'm not sure I'd want to use it. I like the idea of having full control over my own data and I can store it pretty cheaply myself. However, Iwouldlike to be able to access my data from anywhere on any device, and enjoy the kind of user experience provided by the new breed of HTML5 web applications.
The great thing about the web is that it's so open. You don't have to be a large corporation or pay a license fee to host a web server, anyone can do it themselves using free software and a domestic broadband connection. However, it does currently require quite a lot of technical know-how and there aren't a huge number of useful web applications you can install yourself that the average web user might want to use.
Let's Make the Home Server Awesome
I've been running a Linux-based web server from my home since 2003 to allow me to access all of my data online, but really it's little more than a glorified file server. I'm starting the Webian project to build an open source social media server for your home with a rich HTML5 web interface. I want Webian to make it easy to access all of your media online from a range of devices like phones, tablets, netbooks and your TV.
I can't do this on my own. I need your help to design the best solution to this problem, make a great job of building it and then promote it so that everyone can benefit. If you share my vision, or you're just interested in hosting your own data online, visit webian.orgtoday to learn more about this project and find out how you can participate.