Monday, May 30, 2011

rosjava setup on Fedora 15

After the announcement of the rosjava stack for android devices, I decided to bite the bullet and finally familiarize myself with ROS.  I have been looking for a way to periodically transmit my phone's GPS coordinates to a remote server for a project I'm working on, so I figured I'd try that as my first project with rosjava.

I've been following the directions at http://code.google.com/p/rosjava/wiki/Welcome to install the rosjava stack on my Fedora 15 x86_64 system.  Unfortunately, there are a few gotchas that aren't outlined in the documentation:

1) If you have an x86_64 installation, you'll need some i686 libraries for the android SDK.  Luckily, Fedora supports installing libraries from multiple architectures side-by-side very well.  You can install the required libraries using the following command:

sudo yum install ncurses-devel.i686 zlib.i686 glibc.i686 libgcc.i686 ncurses-libs.i686 libstdc++.i386

2) Before you run "ant dist" to build rosjava, you'll likely have to edit the ant property files.  This is for two reasons: the location of your SDK installation may not be detected, and the target android API may also be wrong.  You can add a build.properties to the following directories:

rosjava/android/library
all subdirs under rosjava/android/tutorials/

containing the following text:
target=android-10
sdk.dir=/path/to/your/android-sdk-linux_x86

You can modify the target for your desired API version (I found a more detailed explanation of these levels at http://sagistech.blogspot.com/2010/05/android-sdk-error-unable-to-resolve.html).

3) There's a missing directory in the build tree that ant seems to need, a simple "mkdir rosjava/android/library/libs" should suffice.

Now you should be able to run "ant dist" as per the directions and build rosjava.

Tuesday, May 24, 2011

Kinect driver for Player

Better late than never right?  I've just committed a driver for the Kinect to the Player SVN, based on the libfreenect library from the openkinect project.  I've actually been sitting on this driver for a while, but it looks like the libfreenect API has finally stabilized enough that publishing a driver is warranted.  Features of the driver include
  • On the fly resolution adjustment for both the video and depth images
  • On the fly control of downsampling/heatmap display output for the depth image
  • Accelerometer and Tilt motor support
Pointcloud and LED support are still absent from the driver, patches welcome!

Monday, May 23, 2011

New Player tutorials & Guile driver

Last night I hashed out the Driver Capability and Driver Property stubs on the Player wiki.  They now contain some explanation of what both features are, and some example code to implement both features on the driver and client sides.  Both of these features are quite compelling, and go a long way to help deal with run-time driver configuration using Player.

Another exciting new Player contribution: Paul Osmialowski recently contributed a Guile driver to allow Scheme-like scripting from within a Player driver.  The driver is well-documented, and he was also kind enough to complete a writeup on the wiki.

The Fedora 15 Robotics Suite

With Fedora 15's release imminent, I'd like to take the time to talk about the Fedora Robotics Suite.  As some of you may have noticed, the Fedora Robotics Suite is a new feature for Fedora 15 and it is already showing up as a bullet point in many reviews of the Fedora 15 alpha and beta releases.  In an effort to elevate this feature past 'neat-sounding bullet point,' I'll do my best to explain the motivations behind the feature and give a preview of what's in store for future Fedora releases.

What is it?
The Fedora 15 release notes have this to say about the Robotics Suite:
Fedora 15 now includes the Robotics Suite, a collection of packages that provides a usable out-of-the-box robotics development and simulation environment. This ever-growing suite features up-to-date robotics frameworks, simulation environments, utility libraries, and device support, and consolidates them into an easy-to-install package group. Visit http://fedoraproject.org/wiki/Robotics for more details.
In a nutshell, the Fedora Robotics SIG has been working hard over the past few releases to create a fast and easy way to dive into robotics development, for newbies and seasoned developers alike.  The first visible result of this effort is the Fedora Robotics Suite, a package group that brings together many different robotics related libraries to make it as easy as possible for developers to use Fedora in their robotics projects.

Why is the suite needed?
The open-source robotics scene is diverse, consisting of vast amounts of independent libraries and frameworks that can be used for all kinds of robotics tasks.  Unfortunately, the robotics develpment community is small enough that even some of the largest and most well-known software packages are still "niche" packages in the scope of a large Linux distribution, often with only a handful of developers upstream. These factors add up to several problems that the Robotics Suite aims to alleviate:
  • Software is difficult to configure and install.  This is mostly a problem for users who aren't familiar with Linux development and are diving in headfirst.  A short visit to many small projects' mailing lists can tell you: if the configuration and installation process for a software component is complex, or the process isn't well documented, new users can be put off by the hurdle of getting their software environment set up, long before any development can take place.  Our goal is to streamline the process by doing the hard work for you in the context of robotics-related software.
  • Software has too many dependencies.  Many robotics-related programs have critical dependencies on small or fledgling libraries that otherwise have little use to the Linux community in general.  For example, the Point Cloud Library (currently under review) depends on the cminpack, flann, and eigen3 libraries.  We want to make sure all of these are available with Fedora to spare the users the time-consuming process of finding, building, troubleshooting, and installing all of these small dependencies.
  • Software doesn't build properly with Fedora's system libraries.  Fedora leads the way in software versions with the latest and greatest packages from upstream.  Often, developers of smaller libraries are only testing their packages against the set of libraries on their own machine, and may be oblivious to build errors resulting from newer system libraries.  The Robotics SIG encounters these errors during packaging and updates and works with upstream to correct the issues.
Basically we want to extend the benefits of pre-packaged software to the robotics community, and in the process make Fedora the distribution of choice for robotics developers.
    What's in the suite?
    As noted at http://fedoraproject.org/wiki/Robotics, the Robotics Suite currently includes several large-scale robotics frameworks and simulators, including Fawkes, Player, Stage, and the RoboCup Soccer Simulator.  The Robotics Suite also consists of many specialized libraries like libphidget and libkni that interact with sensors and actuators, libraries like mrpt and openni that implement specialized algorithms for things like motion planning and image processing, and IDEs like Eclipse and Arduino to make code development easier.


    What's next?
    The Robotics Suite is a big milestone for the Robotics SIG, but we've got plenty of grand plans for future Fedora releases.  We'd like to create an official Robotics Spin for future releases to make it even easier to sample and use the Robotics Suite, in the home or the classroom, without having to go through the whole install process.  We are also sponsoring a Google Summer of Code student to create educational robotics software for new users that takes advantage of the packages available in the Robotics Suite.  Finally, we're always hard at work packaging new and interesting robotics-related software for the Fedora community.