libsixdof 0.0.1 released with spacenavigator support

Questions and answers about 3Dconnexion devices on UNIX and Linux.

Moderator: Moderators

Post Reply
monkeyiq
Posts: 6
Joined: Wed Apr 23, 2008 8:50 am

libsixdof 0.0.1 released with spacenavigator support

Post by monkeyiq » Wed Apr 23, 2008 9:13 am

Hi,
I created libsixdof to help map from XInput events generated by the spacenavigator into application actions. As the default events are absolute from X and relative events are much easier to work with libsixdof maps axis movements into relative from -1.00 to +1.00 and handles a customizable dead zone etc.

I have a patch for kphotoalbum svn (see their mailing list) and feh from cvs contains support for libsixdof. Things are still simple there, but you can zoom, pan, move through slideshows, rotate the image using a spacenavigator. I've yet to attack the gimp but that should be fun when it happens.

What follows is the bulk of the README from libsixdof.

libsixdof provides a C and C++ interface to 6 degrees of freedom
devices.

The library is intended to be very unintrusive to an application
allowing support to be implemented without great effort. For example,
an application might only need to issue 3-4 API calls to tell
libsixdof about Xwindow objects that it should monitor. Apart from
those setup calls, functions that are useful for controllers should be
registered with libsixdof. The configuration of the device, how its
axis movements map to these registered functions is then taken care of
completely from the libsixdof code. The application doesn't really
need to care what 6dof device is attached, where it is attached (usb
etc) or what its name is, or if there are more than one such device.

Having the configuration of controller movement to function being
performed in libsixdof itself allows the user to setup modal 6dof use
and other complex configurations for their applications. For example,
having x-axis movement flick through a slideshow, except when the
first side button has been pressed, in which case x-axis movement does
something different until z-axis movement changes back to the main
mode.

Though this modal engine is not implemented at version 0.0.1 of the
library, it is planned that a state engine can be added to libsixdof
to allow very complex setups like this. Such a level of customization
is unlikely to be desired by somebody writing an audio player or image
viewer who does not own a 6dof device themselves. But a patch with a
few scattered 6dof calls and a function table is likely to be accepted
by such application authors.

I have released this under many licenses because I just dont want the
crap about not being able to use libsixdof with all my apps. I like
the GPL myself but as there are applications which are not compatible
with GPL that I want to use 6dof devices to control I made the library
fairly wide open in licensing so that it can become the initial
widespread standard for 6dof controllers on Linux... maybe. Hey, you
are welcome to produce a better library ;)

To control an application you must setup bindings in ~/.libsixdofrc.
A sample is provided with the distribution with settings for the
examples in the distribution as well as feh and other applications
that I have hacked optional 6dof support into. Perhaps in the future
applications will themselves contain sample inputrc files, but for
now I am maintaining a central repository for rc files. You can setup
thresholds that will effect how much axis movement will be reported
to an application. For example, using a SpaceNavigator with the gimp
Input module trying to zoom in using the z-axis will not work well
because it is too quick. With libsixdof you can control how sensitive
each axis movement, tilt and rotation will be.

Currently support is limited to the SpaceNavigator when it is setup
to send XInput events. This setup can be done by adding the following
to your xorg.conf file.

Section "ServerLayout"
...
InputDevice "SpaceNavigator"
...
EndSection

Section "InputDevice"
Identifier "SpaceNavigator"
Driver "evdev"
Option "Name" "3Dconnexion*"
Option "Pass" "3"
Option "Mode" "Relative"
Option "XRelativeAxisMap" "0"
Option "YRelativeAxisMap" "1"
Option "ZRelativeAxisMap" "2"
Option "RXRelativeAxisMap" "3"
Option "RYRelativeAxisMap" "4"
Option "RZRelativeAxisMap" "5"
Option "ZRelativeAxisButtons" "off"
EndSection

ellson
Posts: 4
Joined: Wed Apr 23, 2008 7:50 pm

patch to libsixdof.spec.in

Post by ellson » Wed Apr 23, 2008 7:56 pm

With this patch you can make rpms using:
./configure
make dist
rpmbuild -ta libsixdof-0.0.1.tar.gz

Are these sources on a SVN or GIT server someplace?

--------------------------------------

diff -rub libsixdof-0.0.1.orig/libsixdof.spec.in libsixdof-0.0.1/libsixdof.spec.in
--- libsixdof-0.0.1.orig/libsixdof.spec.in 2008-04-22 08:18:55.000000000 -0400
+++ libsixdof-0.0.1/libsixdof.spec.in 2008-04-23 22:37:44.000000000 -0400
@@ -1,4 +1,4 @@
-Version: @FUSELAGEFS_VERSION@
+Version: @LIBSIXDOF_VERSION@
Release: 70031
Name: libsixdof
Summary: A library for 6 degree of freedom devices
@@ -17,9 +17,6 @@
%description
A library for 6 degree of freedom devices

-%debug_package
-
-
%prep
%setup -q

@@ -47,9 +44,22 @@
%files
%defattr(-,root,root,0755)
%doc AUTHORS README COPYING ChangeLog INSTALL
-%attr(0555, root, root) %{_includedir}/*
-%attr(0555, root, root) %{_libdir}/*so*
+%attr(0555, root, root) %{_libdir}/*.so.*
+
+%package devel
+Group: Development/Libraries
+Summary: Development package for libsixdof
+Requires: libsixdof = %{version}-%{release} pkgconfig

+%description devel
+A library for 6 degree of freedom devices
+This package contains development files for libsixdof.
+
+%files devel
+%defattr(-,root,root,0755)
+%attr(0555, root, root) %{_includedir}/*
+%{_libdir}/*.so
+%attr(0555, root, root) %{_libdir}/pkgconfig/*.pc

%changelog

monkeyiq
Posts: 6
Joined: Wed Apr 23, 2008 8:50 am

Re: patch to libsixdof.spec.in

Post by monkeyiq » Wed Apr 23, 2008 8:15 pm

ellson wrote:With this patch you can make rpms using:
./configure
make dist
rpmbuild -ta libsixdof-0.0.1.tar.gz

Are these sources on a SVN or GIT server someplace?
Thanks, patch applied. I knew there were still some rough edges in the distro tarball...seems I forgot to update the spec.in file :/

I'm still using Intranet only version control on it.
Once I slow down on updating it then I'll check it into a public repository somewhere. If anyone wants to hack on it right away then I can check it into sf.net's cvs fairly quickly. Otherwise patches against the tarball releases should be fine.

ellson
Posts: 4
Joined: Wed Apr 23, 2008 7:50 pm

autoconf problem

Post by ellson » Sun May 04, 2008 11:23 am

Running autoconf on Fedora-9 fails on your configure.ac:

configure.ac:45: error: possibly undefined macro: AM_FERRIS_POPT

ellson
Posts: 4
Joined: Wed Apr 23, 2008 7:50 pm

Re: autoconf problem

Post by ellson » Sun May 04, 2008 11:26 am

ellson wrote:Running autoconf on Fedora-9 fails on your configure.ac:

configure.ac:45: error: possibly undefined macro: AM_FERRIS_POPT
My bad. "autoconf -Imacros" works better.

An autogen.sh wrapper might help dummies like me ;)

monkeyiq
Posts: 6
Joined: Wed Apr 23, 2008 8:50 am

Version 0.0.2 released

Post by monkeyiq » Sun May 04, 2008 10:27 pm

Changes:
Added button binding support. API extended to allow an application to have more than one window managed by libsixdof. Public C++ interface is now pure virtual to aid future extensions not breaking ABI compatability.

Also includes the spec file changes from this forum and autogen.sh should now do the right thing.

Slight update needed in C++ API clients from 0.0.1 release to move to the more ABI preserving API. See included test client for details.

monkeyiq
Posts: 6
Joined: Wed Apr 23, 2008 8:50 am

0.0.3 released

Post by monkeyiq » Thu May 08, 2008 3:50 am

Consider subscribing here
http://freshmeat.net/projects/libsixdof/
if you want to keep knowing about new releases...

monkeyiq
Posts: 6
Joined: Wed Apr 23, 2008 8:50 am

linux.com article on libsixdof

Post by monkeyiq » Wed May 28, 2008 1:52 am


Post Reply