Installing ROS and the Kinect stack on the Pandaboard

Preface

I did all of this on my own computer (64-bit Ubuntu 11.10) with a the premade OMAP4 Ubuntu server image from Ubuntu's website, a program called kpartx to help mount it, chroot, and qemu (user, not system). I won't be describing any of that in detail here, and hopefully these same steps will workon the Pandaboard itself, albeit much more slowly ;)

Also note that some of this is from memory, and the rest is stuff I haven't tried but I think should be easier than what I did. I don't guarentee that this will all work.

Rosinstall

Install rosinstall based on the instructions here: http://www.ros.org/wiki/rosinstall. Then, into ~/ros, install from http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no. This will probably download all the source and then fail, but that's good enough for now.

Install dependancies

Run

rosdep install -ar

which will hopefully install everything needed, with a few exceptions. Then run

sudo apt-get install libserial-dev libsdl-image-1.2-dev libusb-1.0-0-dev libhdf5-serial-dev

which installs a few that rosdep missed for me. Also, you'll need to install OpenNI and some other thing, so follow the instructions in Cross compiling OpenNI for ARM. As for the rest of the things rosdep missed, they'll have to be built from source:

yaml-cpp

Download from http://code.google.com/p/yaml-cpp/, and compile with

mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install

assimp

Download with

svn co -r 1149 https://assimp.svn.sourceforge.net/svnroot/assimp/trunk assimp

Revision 1150 changed header file names and broke compatibility ಠ_ಠ

mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-std=c++0x" ..
make
sudo make install

nvidia-cg-toolkit

Ignore this one. You won't be able to build ogre or anything depending on it as a result.

opencv

This has a tendency to freeze for some reason. It's quite annoying. Hopefully you can get it to work by trying it enough times while running pkg-config a lot of times in another window. Configure like this:

cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_V4L=OFF -DWITH_OPENNI=ON -DWITH_GTK=ON -DWITH_FFMPEG=OFF -DWITH_1394=OFF ..

Once it's built, cd to /usr/local/lib/pkgconfig, and run

ln -s opencv.pc opencv-2.3.1.pc

Compiling

Everything in ~/ros should now compile! (except ogre and friends). Run

rosmake -air --no-rosdep

I haven't tried that command, so I don't know if it will actually put ROS_NOBUILD in the packages. I used these in my ~/.bash_aliases:

function nobuild {
  touch `rospack find $1`/ROS_NOBUILD
}

function try {
  echo
  echo
  echo Trying  $1
  echo
  echo
  roscd $1
  make && touch ROS_NOBUILD
}

function tryall {
  for i in "$@"; do try $i; done
}

along with a tool I wrote myself which would tell me in what order to "try" the packages. It was much easier than dealing with rosmake.

Kinect

Check out the code with

hg clone -u electric https://kforge.ros.org/openni/openni_ros openni_kinect

There have been significant and breaky changes after the tag electric. Even in that tag, you'll probably need to add

include_directories(/usr/include/ni)

to CMakeLists.txt in openni_tracker and openni_camera. Then, they should build.

Good luck!