Spacenav Project

John Tsiombikas

23 March 2008

A few months ago, I bought a really nifty input device called "space navigator". These devices, produced by "3dconnexion", a logitech subsidiary, enable the user to intuitively manipulate a 3D object or viewport with 6 degrees of freedom (thus commonly refered to as 6dof devices). For instance, one could rotate around a 3D object while at the same time zooming in and slightly panning to the side to inspect a detail hidden there, all in simple fluid motions produced by manipulating a weird knob-looking thing.

3Dconnexion does provide a linux driver, called 3dxsrv, in the form of a user-space daemon. Applications talk to tha daemon and get motion, and button press events from the device, through an X11-based protocol. The problem is: it's proprietary, and it doesn’t work. Either one of these is problematic in its own right, but the combination demands drastic measures. Thus, I decided to write a free drop-in replacement of the daemon myself. The daemon is called spacenavd, it's compatible and transparent to any application that used to work with the 3dconnexion driver, and it also provides an alternative non-X11 interface through UNIX sockets.

3Dconnexion also provides a library, called magellan, which is supposed to make interfacing with the daemon easy. Unfortunately, the library is also proprietary (the code is there, but with nasty restrictions in the license text), and is utter crap API-wise. So, I decided to replace the library too, with a free library called libspnav. It's got an orthogonal much easier to understand and use API, and supports both spacenavd, and the 3dconnexion driver. When working with spacenavd, it can optionally use the simpler alternative interface which doesn't require an X server to be running or any Xlib code in the application. A magellan source-compatibility wrapper is also provided, to easily port existing applications to the free replacement library, thus freeing them from the shady licensing terms of magellan with zero effort.

The whole project is called "free spacenav", not very imaginative really, and I just released version 0.2 of both the daemon and the library. You can find everything, and more details on the project itself, at the spacenav website. The daemon is released under the terms of the GNU GPLv3, while the library is available under the 3-clause BSD license.

This was initially posted in my old wordpress blog. Visit the original version to see any comments.

Discuss this post

Back to my blog