Table of Contents

Installing UIMA/C++

Last Update: January 2013

Tested on: Ubuntu 11.10 with ROS Electric

First, install some standard libs

sudo apt-get install libicu-dev libxerces-c-dev openjdk-6-jdk libapr1-dev

Choose an installation location

cd $HOME
mkdir uima

Put the right paths into your ~/.bashrc

In the following code, replace $HOME/uima with the location where you actually want your UIMA environment to reside.

export UIMA_WORKSPACE=$HOME/uima
export UIMA_HOME=$UIMA_WORKSPACE/apache-uima
export UIMACPP_HOME=$UIMA_WORKSPACE/uimacpp/install

export PATH=$UIMACPP_HOME/bin:$UIMA_WORKSPACE/apache-maven/bin:$PATH
export LD_LIBRARY_PATH=$UIMACPP_HOME/lib:$UIMA_WORKSPACE/iai-uima/ias-uima-cpp/lib:$LD_LIBRARY_PATH
export CLASSPATH=$UIMA_WORKSPACE/iai-uima/ias-uima-java/bin

export APR_HOME=/usr
export ICU_HOME=/usr
export XERCES_HOME=/usr  
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
export JAVA_INCLUDE=$JAVA_HOME/include

Get Maven

At least up to Ubuntu 11.10, you need to get the Maven 3.0 or later binaries from http://maven.apache.org/download.html.

Extract everything into $UIMA_WORKSPACE/apache-maven, so ls $UIMA_WORKSPACE/apache-maven should give you something like:

bin  boot  conf  lib  LICENSE.txt  NOTICE.txt  README.txt

Get UIMA/C++ from the SVN & build

cd $UIMA_WORKSPACE
svn co https://svn.apache.org/repos/asf/uima/uimacpp/trunk/ uimacpp

uimacpp will look for libapr-1.0.so which isn't there in Ubuntu, so we need to create a symlink to that:

cd /usr/lib
sudo ln -s libapr-1.so libapr-1.0.so

Build everything

# deprecated -  cd $UIMA_WORKSPACE/uimacpp/src
# deprecated -  make -f Makefile.prebuild
# deprecated -  make -f Makefile.unix install

Note: recent trunk seems to have a different build system setup, I had to do:

cd $UIMA_WORKSPACE/uimacpp
./autogen.sh
./configure --without-activemq --with-jdk=/usr/lib/jvm/java-6-openjdk/include --prefix=${UIMACPP_HOME}
make install

What this will do is compile everything and create a couple of folders in $UIMACPP_HOME, so ls $UIMACPP_HOME should give you:

bin  data  include  lib

Get the UIMA Java SDK Binaries

Download and extract latest binaries to $UIMA_WORKSPACE

http://uima.apache.org/downloads.cgi

Doing ls $UIMA_WORKSPACE/apache-uima should give something like

bin  config  docs  eclipsePlugins  examples  issuesFixed  lib  LICENSE  NOTICE  README  RELEASE_NOTES.html

Set up ROS and PCL

Install ROS electric (see http://www.ros.org/wiki/fuerte/Installation/Ubuntu):

sudo apt-get install ros-electric-desktop-full

Check out the trunk version of PCL (-r 8566 works) and add it your $ROS_PACKAGE_PATH:

http://svn.pointclouds.org/ros/branches/electric/perception_pcl_unstable/

Note: trunk of pcl will be checked out in …/perception_pcl_unstable/pcl/build/pcl_trunk/ once you start running rosmake pcl. This is where you need to revert to revision 8566 if needed not the ros package home dir.

Install dependencies:

sudo apt-get install ros-electric-openni-kinect
rosdep install pcl

Set up MongoDB

Get the server. See: http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages

Get the lates client and unpack it to $UIMA_WORKSPACE http://dl.mongodb.org/dl/cxx-driver/

If you don't yet have it, get scons

sudo apt-get install scons

Before compiling the client, uncomment the following line in src/SConscript.client

env.SharedLibrary('mongoclient', clientSource),

Add this to the .bashrc

export MONGODBCLIENT_HOME=$UIMA_WORKSPACE/mongo-cxx-driver-v2.2/
export MONGODBCLIENT_HOME_INCLUDE=$MONGODBCLIENT_HOME/src

Get the IAS UIMA Repository

Check out code and submodules:

cd $UIMA_WORKSPACE
git clone git@bitbucket.org:code_iai/iai-uima.git
cd iai-uima
git submodule init
git submodule update

Install dependencies and compile ias-uima-cpp:

rosdep install ias-uima-cpp
rosmake ias-uima-cpp

Create a new eclipse Java project and use as location $UIMA_WORKSPACE/iai-uima/ias-uima-java/. If Project → Build Automatically is enabled ls $UIMA_WORKSPACE/iai-uima/ias-uima-java/bin/org/ias/uima/collectionreader/ should show:

Clock.class

To install apache, php and other things required for the database visualization website, look at $UIMA_WORKSPACE/iai-uima/www/README.txt. To get histograms visualized as graphs, install libphp-jpgraph.

Run Example

roslaunch openni_launch openni.launch
rosrun dynamic_reconfigure reconfigure_gui # enable depth registration and hiRes RGB
$UIMA_WORKSPACE/apache-uima/bin/cpeGui.sh # use as collection reader ias-uima-java/desc/ClockDescriptor and as analysis engine ias-uima-cpp/descriptors/analysis_engines/iaiGoggles.xml

Troubleshooting

In case the website complains that sorting needs mongodb index do the following…

mongo uima
db.uima.ensureIndex({"scenes.timestamp":-1})
//double check : 
db.uima.getIndexes()

In case you RosKinnectBridge hangs check if depth registered is turned on in openni. you can do this by listening to the topic:

rostopic hz /camera/depth_registered/points

If RosKinnectBridge fails check the parameters for tf from to and camera frames in the description of the annotation.