iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Get NRT

Download and install binary packages from nrtkit.org

If you are running a 64-bit version of Ubuntu 11.10 or later, then you can simply install our .deb package from http://nrtkit.org. This package will take care of installing all dependencies for you!

You just need to do the following (ignore any errors about missing signatures):

Todo:
fix nrtkit signatures
sudo apt-get update
sudo apt-get install python-software-properties    # make sure add-apt-repository is here
sudo add-apt-repository "deb http://nrtkit.org/apt precise main"
sudo apt-get update
sudo apt-get install nrt    # say 'y' to install even though signatures are missing

You should be ready to roll. See the User Tutorial for instructions on how to start using NRT.

Download the latest source and compile NRT yourself

If you are running any other OS than 64-bit Ubuntu, or want to hack at NRT's core yourself, you can grab an SVN checkout and build it yourself. Here are some brief instructions:

Pre-requisites

You need the following packages installed. In Ubuntu, you can get them using the apt-get program. In other distributions you would use another program. Consult your Linux distribution's documentation.

Optional: Before you install, it is worth checking that you have a fast server in your list of software sources. For example, here is how to use the USC Ubuntu mirror for Ubuntu 12.04 (replace precise by the name of your ubuntu distribution if using another version):

sudo bash
/bin/mv /etc/apt/sources.list /etc/apt/sources.list.bak
/bin/cat > /etc/apt/sources.list <<EOF
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.usc.edu/pub/linux/distributions/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu precise partner
EOF
apt-get update
exit

Install the following (this list is for Ubuntu 13.10 amd64, you may need to change it a bit for other distributions):

    apt-get -y --force-yes install build-essential
    apt-get -y --force-yes install autoconf
    apt-get -y --force-yes install autoconf-archive
    apt-get -y --force-yes install automake
    apt-get -y --force-yes install vim-gtk
    apt-get -y --force-yes install tcl-dev
    apt-get -y --force-yes install tk-dev
    apt-get -y --force-yes install tcl8.4-dev
    apt-get -y --force-yes install tk8.4-dev
    apt-get -y --force-yes install libpopt-dev
    apt-get -y --force-yes install bzip2 libbz2-dev
    apt-get -y --force-yes install ffmpeg
    apt-get -y --force-yes install fftw3-dev
    apt-get -y --force-yes install gsl-bin
    apt-get -y --force-yes install gdb
    apt-get -y --force-yes install libgsl0-dev
    apt-get -y --force-yes install libblas-dev
    apt-get -y --force-yes install liblapack-dev
    apt-get -y --force-yes install libavc1394-dev
    apt-get -y --force-yes install libdc1394-22-dev
    apt-get -y --force-yes install libraw1394-dev
    apt-get -y --force-yes install libsdl1.2-dev
    apt-get -y --force-yes install libsdl-gfx1.2-dev
    apt-get -y --force-yes install libsdl-mixer1.2-dev
    apt-get -y --force-yes install libsdl-image1.2-dev
    apt-get -y --force-yes install libsdl-ttf2.0-dev
    apt-get -y --force-yes install libopenmpi-dev
    apt-get -y --force-yes install libgd-tools
    apt-get -y --force-yes install libgd2-xpm-dev
    apt-get -y --force-yes install libreadline-dev
    apt-get -y --force-yes install libncurses5-dev 
    apt-get -y --force-yes install libqwt-dev
    apt-get -y --force-yes install libode-dev
    apt-get -y --force-yes install libcwiimote-dev
    apt-get -y --force-yes install libbluetooth-dev 
    apt-get -y --force-yes install qt3-dev-tools qt3-designer libqt3-headers libqt3-mt-dev
    apt-get -y --force-yes install make
    apt-get -y --force-yes install cmake
    apt-get -y --force-yes install mencoder
    apt-get -y --force-yes install mplayer
    apt-get -y --force-yes install libpostproc-dev # install with libavcodec-dev
    apt-get -y --force-yes install libavcodec-dev  # install with libpostproc-dev
    apt-get -y --force-yes install vlc
    apt-get -y --force-yes install zsh
    apt-get -y --force-yes install libdb libdb-dev 
    apt-get -y --force-yes install openssl
    apt-get -y --force-yes install expat 
#    apt-get -y --force-yes install liblivemedia-dev livemedia-utils  # latest version not compatible with previous
    apt-get -y --force-yes install freeglut3-dev
    apt-get -y --force-yes install libsvm-dev
    apt-get -y --force-yes install libxml2-dev
    apt-get -y --force-yes install libjpeg-progs
    apt-get -y --force-yes install libjpeg62-dev
    apt-get -y --force-yes install qt4-dev-tools
    apt-get -y --force-yes install qt4-designer
    apt-get -y --force-yes install qt4-qtconfig
    apt-get -y --force-yes install qconf
    apt-get -y --force-yes install libqt4-core
    apt-get -y --force-yes install libqt4-gui
    apt-get -y --force-yes install libqt4-sql-psql
    apt-get -y --force-yes install libpqxx3-dev
    apt-get -y --force-yes install libboost-all-dev  # boost
    apt-get -y --force-yes install python-paramiko
    apt-get -y --force-yes install python-vte
    apt-get -y --force-yes install libglew-dev
    apt-get -y --force-yes install libglewmx-dev
    apt-get -y --force-yes install libserial-dev
    apt-get -y --force-yes install gnuplot
    apt-get -y --force-yes install libsparsehash-dev
    apt-get -y --force-yes install libtorch-dev
    apt-get -y --force-yes install libxtst-dev
    apt-get -y --force-yes install libavformat-dev
    apt-get -y --force-yes install libavutil-dev
    apt-get -y --force-yes install libswscale-dev
    apt-get -y --force-yes install libavdevice-dev
    apt-get -y --force-yes install libavfilter-dev
    apt-get -y --force-yes install sysv-rc-conf  # to configure services
    apt-get -y --force-yes install chkconfig  # to configure services
    apt-get -y --force-yes install sysstat
    apt-get -y --force-yes install ncftp
    apt-get -y --force-yes install ntp
    apt-get -y --force-yes install flex
    apt-get -y --force-yes install bison
    apt-get -y --force-yes install libdevil-dev
    apt-get -y --force-yes install libtool
    apt-get -y --force-yes install shtool
    apt-get -y --force-yes install libomniorb4-dev
    apt-get -y --force-yes install omniidl
    apt-get -y --force-yes install libblitz0-dev
    apt-get -y --force-yes install sqlite3
    apt-get -y --force-yes install libsqlite3-dev
    apt-get -y --force-yes install libxp6 # for matlab
    apt-get -y --force-yes install libtbb2
    apt-get -y --force-yes install libv4l-dev
    apt-get -y --force-yes install python-dev libgtk2.0-dev libgtkmm-2.4-dev libzeroc-ice34-dev cmake
    apt-get -y --force-yes install libportaudio2
    apt-get -y --force-yes install doxygen graphviz
    apt-get -y --force-yes install gccxml libicu-dev python-dev python2.7-dev
    apt-get -y --force-yes install zip unzip
    apt-get -y --force-yes install csh # needed by matlab
    apt-get -y --force-yes install libeigen3-dev

/bin/ln -s /usr/include/eigen3/Eigen /usr/include/Eigen

    apt-get -y --force-yes install libopencv-dev python-opencv
    apt-get -y --force-yes install libthrust-dev
    apt-get -y --force-yes install libyaml-cpp-dev
    apt-get -y --force-yes install libpcl1-dev
    apt-get -y --force-yes install libflann-dev
    apt-get -y --force-yes install guvcview
    apt-get -y --force-yes install libyaml-perl
    apt-get -y --force-yes install synaptic
    apt-get -y --force-yes install psensor

    apt-get -y --force-yes install liburg0-dev

You also need Ice 3.5, openni, etc which you can find at: http://ilab.usc.edu/packages/forall/current/

Note that all of these should be recent, for example gcc should be at least 4.7, Ice at least 3.4, python at least 2.7, etc

You also need yaml-cpp 0.2.5 or higher. Unfortunately it is not part of standard Ubuntu distributions BEFORE 13.10 (their version is too old). If using Ubuntu 13.10 or later, skip this. Otherwise, you can either try to find yaml-cpp somewhere, or get it from us (ignore any error messages about signatures):

sudo apt-get install python-software-properties  # make sure add-apt-repository is here
sudo add-apt-repository "deb http://nrtkit.org/apt precise main"
sudo apt-get update
sudo apt-get install yaml-cpp     # say 'y' to install even though signatures are missing

Getting the source code

The NRT source code is stored on a subversion (SVN) server. You can get it as follows, which will create a drectory called nrt/ in your current directory (we recommend that you first change directory to your home directory):

svn checkout svn://iSvn.usc.edu/software/nrt/trunk/nrt
# Enter in username/password...

Setting up environment variables

Add the following lines to the end of your .bashrc file:

# For NRT core:
export NRTMASTER=127.0.0.1:10000
export NRTHOME=${HOME}/nrt
export PATH=${PATH}:${NRTHOME}/scripts/nrtTools
export PYTHONPATH=${PYTHONPATH}:${NRTHOME}/scripts
export CPPFLAGS="-I${NRTHOME}/include"
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/local/lib64:${NRTHOME}/build
export LDFLAGS="-L${NRTHOME}/build"

# For NRT user modules (here, assuming they are in ~/nrtbase/):
export NRTMODULEPATH=${HOME}/nrtbase/src/Modules
export NRTMESSAGEPATH=${HOME}/nrtbase/src/Messages

and start a new shell (to execute these lines). Check that the environment variables are set:

echo $NRTHOME

Compiling NRT

NRT uses cmake. Thus you compile it as follows:

cd nrt
mkdir build
cd build
cmake ..

At this point check that everything was found. If not, try to install missing packages and try these steps again. OpenNI may be the hardest one to get, it's for Kinect device support and is not essential.

Now compile (you should still be in the nrt/build/ directory):

make

If you have several CPU cores on your machine (and who doesn't these days?), you can parallelize the compilation over your cores. Below we count the number of cores and run as many parallel compilation jobs as we have cores. Note that if you do not have a lot of memory you could choke your machine if you use too many parallel threads:

make -j `grep processor /proc/cpuinfo | wc -l`

Try running some of the test programs included in the build to ensure everything went ok.

./tests/test-ThreadPool
./tests/test-Option
./tests/test-stream --in=random --out=display # Should display some random-pixel images
# etc..

You should be ready to roll. See the User Tutorial for instructions on how to start using NRT.

designer.png
Above: The NRT designer graphical interface. Users can add and remove modules, or create and delete connections between modules, even as the system is running.

NRT basically consists of: A core library (which implements the blackboard, messages, etc), a Designer graphical interface, and contributed modules that perform various operations.

modlist.png
Above: Sample collection of NRT modules developed at the University of Southern California.