Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorials:uimacpp_groovy [2013/03/13 12:57] jworchtutorials:uimacpp_groovy [2013/03/13 13:19] (current) jworch
Line 1: Line 1:
 +====== Installing UIMA/C++ ======
 +
 +Last Update: March 2013
 +
 +Tested on: Ubuntu 12.04 with ROS Groovy
 +
 +===== First, install some standard libs =====
 +
 +  sudo apt-get install libicu-dev libxerces-c-dev openjdk-7-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  
 +  
 +Depending on your OS replace ARCH by amd64 or i386
 +  
 +  export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-ARCH/ 
 +  export JAVA_INCLUDE=$JAVA_HOME/include
 +
 +===== Get Maven =====
 +
 +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
 +
 +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 Groovy (see ''http://www.ros.org/wiki/groovy/Installation/Ubuntu''):
 +
 +  sudo apt-get install ros-groovy-desktop-full
 +  
 +Install dependencies:
 +
 +  sudo apt-get install ros-groovy-pcl ros-groovy-openni-camera ros-groovy-openni-launch
 +  
 +===== 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
 +
 +Checkout dependencies and add them to your ROS_PACKAGE_PATH:
 +
 +  git clone git@bitbucket.org:code_iai/iai_perception_stack.git
 +  git clone git@bitbucket.org:code_iai/entres.git
 +  git clone git@bitbucket.org:code_iai/iai_msgs.git
 +  svn co https://code.ros.org/svn/ros-pkg/stacks/vslam/trunk vslam
 +  svn co https://cmu-ros-pkg.svn.sourceforge.net/svnroot/cmu-ros-pkg/trunk/3rdparty/ann2 ann2
 +  svn co https://jsk-ros-pkg.svn.sourceforge.net/svnroot/jsk-ros-pkg/trunk/3rdparty/libsiftfast libsiftfast
 +  git clone https://github.com/dejanpan/objects_of_daily_use_finder
 +  
 +Get the libsvm folder from 
 +
 +  http://sourceforge.net/p/tum-ros-pkg/code/1016/tree/3rdparty/
 +
 +Adapt manifest.xml files from icf_dataset and ias_uima_cpp:
 +
 +Replace 
 +  <depend package="eigen"/>
 +by
 +  <rosdep name="eigen"/>
 +
 +Additionally in ias_uima_cpp you have to replace 
 +  <depend package="openni"/>
 +by
 +  <depend package="openni_camera"/>
 +
 +Compile ann2, vslam, libsiftfast and libsvm.
 +
 +NOTE: When compiling libsvm the compiler might complain about not being able to find build/libsvm-3.12 - just rename build/libsvm-3.16 to build/libsvm-3.12 and everything should be fine.
 +
 +Now call
 +
 +  rosmake ias-uima-cpp
 +
 +Finally browse to ''$UIMA_WORKSPACE/iai-uima/ias-uima-java/ant'' and call 
 +
 +  ant
 +
 +Now ''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 =====
 +
 +  rosrun openni_camera openni_node
 +  rosrun rosrun rqt_reconfigure rqt_reconfigure # 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. 
 +
 +
  
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki