AnimatLab SDK Release History

Download AnimatLab Linux SDK

The SDK source code for AnimatLab can be downloaded here (AnimatLabSDK.tar.gz). I have tested the SDK on Ubuntu 12.04. However, It should work on other Linux variants. The steps needed to get it installed, compiling and running are listed below. I have split the steps into discrete groups to try and make it easier to follow. This guide is assuming a clean install of Ubuntu 12.04 with the video drivers already configured. Terminal commands are shown with a grey background, while packages that need to be installed are shown in light blue.

If you are setting up the NVIDIA Jetson then please follow the steps found in this page first. You only need to follow the rest of the steps on this page if you want to run simulations on the Jetson. I will add similar pages for the Odroid U3 and the Parallella soon.

Initial Setup
1.  Configure your video drivers. AnimatSimulator will not run, and you will not be able to properly install the prerequisites packages unless you have your actual video drivers installed and configured correctly. The default drivers that come with the Ubuntu installation will not work.
2.  Install synaptic from software center. (Or whatever package manager you prefer.)
3. Install build-essentials
>sudo apt-get install build-essential linux-source
>sudo apt-get install linux-headers-`uname -r`
4.  Use software center to install git, Cola git GUI (or whatever git GUI you want to use)
git
Cola git GUI
5.   Install mono runtime, and Monodevelop from the software center
mono runtime
Monodevelop
6.  Install monodevelop-debugger-gdb using synaptics
monodevelop-debugger-gdb
7.  Download and extract AnimatLabSDK.tar.gz. You can place this anywhere you want it. However, please note that the cmake commands used below on Bullet, osgWorks, and osgBullet cannot use relative paths, so if you want to debug them then you will want to place the SDK where it will finally reside, or you will need to regenerate these.
Get the latest code. In a terminal, cd into AnimatLabSDK/AnimatLabPublicSource and run:
>git pull


Install boost
If pre-built versions of boost 1.55 or greater are available for your version of Linux then use those and install them through synaptics following step 1. If these are not available, as is the case for older versions of Ubuntu, then you will need to get the source and build boost as is shown in step 2. 
1.  Install boost 1.55 or greater packages using synaptics
libboost1.55-dbg
libboost1.55-all-dev
libboost1.55-doc
libboost1.55-dev
2. OR, build from source
>wget -O boost_1_55_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
>tar xzvf boost_1_55_0.tar.gz
>cd boost_1_55_0/
>sudo apt-get update/
>sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev/
>./bootstrap.sh --prefix=/usr/local/
>sudo ./b2 --prefix=/usr/local/


Build CMake 2.8.12.2
If pre-built versions of CMake 2.8.12.2 are available for your version of Linux then use those and install them through synaptics following step 1. If these are not available, as is the case for older versions of Ubuntu, then you will need to get the source and build CMake as is shown in step 2-3. 
1.  Install CMake 2.8.12.2 packages using synaptics
cmake
ccmake
OR, build from source
2.  Download cmake-2.8.12.2.tar.gz from http://www.cmake.org/cmake/resources/software.html Unzip it.
3.  cd into cmake folder, compile, and install it.
>./bootstrap
>make
>sudo make install


Build OpenSceneGraph
If pre-built versions of OpenSceneGraph (OSG) 3.0.1 are available for your version of Linux then use those and install them through synaptics following step 1. If these are not available, as is the case for most ARM microcomputers like the Nvidia Jetson TK1, then you will need to get the source and build OSG as is shown in step 2-3. 
1.  Install Openscenegraph packages using synaptics
openscenegraph
openscenegraph-doc
openscenegraph-examples
libopenscenegraph-dev
libopenscenegraph80
libopenthreads-dev
libopenthreads14
OR, build from source
2.  Download OSG 3.0.1 from http://www.openscenegraph.org/index.php/download-section/stable-releases/145-openscenegraph-3-0-1-release-downloads
3.  Download OSG data from http://trac.openscenegraph.org/projects/osg//wiki/Downloads/SampleDatasets
3.  Extract both archive packages to your home folder and CD into OpenSceneGraph-3-0-1.
3.  Open the CMakeLists.txt file in gedit and remove the FIND_PACKAGE(FFMPEG) line. Trying to compile FFMEP always fails for me and I have found it is easier to just remove it. If you need FFMPEG Then you will need to investigate how to get this to compile correctly on your system.
3. 
>sudo cmake ../
>sudo make -j4
>sudo make install
>sudo ldconfig


Build Bullet
1.  cd to AnimatLabSDK/3rdPart/bullet-2.82/build
2.  create build directories
>mkdir single_debug
>mkdir double_debug
>mkdir single_release
>mkdir double_release
3. Build single_debug
>cd single_debug
>cmake ../../../bullet-2.82/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DINSTALL_LIBS=ON -DBUILD_EXTRAS=ON -DBUILD_MULTITHREADING=ON -DCMAKE_DEBUG_POSTFIX=_single_debug -DCMAKE_CXX_FLAGS=-fPIC
>make -j4
>sudo make install
4. Build double_debug
>cd double_debug
>cmake ../../../bullet-2.82/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DINSTALL_LIBS=ON -DBUILD_EXTRAS=ON -DBUILD_MULTITHREADING=ON -DCMAKE_DEBUG_POSTFIX=_double_debug -DUSE_DOUBLE_PRECISION=ON -DCMAKE_CXX_FLAGS=-fPIC
>make -j4
>sudo make install
5. Build single_release
>cd single_release
>cmake ../../../bullet-2.82/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DINSTALL_LIBS=ON -DBUILD_EXTRAS=ON -DBUILD_MULTITHREADING=ON -DCMAKE_RELEASE_POSTFIX=_single -DCMAKE_CXX_FLAGS=-fPIC
>make -j4
>sudo make install
6. Build double_release
>cd double_release
>cmake ../../../bullet-2.82/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DINSTALL_LIBS=ON -DBUILD_EXTRAS=ON -DBUILD_MULTITHREADING=ON -DCMAKE_RELEASE_POSTFIX=_double -DUSE_DOUBLE_PRECISION=ON -DCMAKE_CXX_FLAGS=-fPIC
>make -j4
>sudo make install
Sometimes I have received an error related to copying one of the bullet demo app files while running make. In particular, this happens on the Nvidia Jetson TK1 for some reason. I have not yet figured out why this happens. If you run into this though, then a way to get around this is to configure it to not build the demo apps by add -DBUILD_DEMOS=OFF just after the -DBUILD_EXTRAS setting.


Build osgWorks
1.  cd to AnimatLabSDK/3rdPart/osgWorks_03_00_00/build
2.  create build directories
>mkdir debug
>mkdir release
3. Build debug
>cd single_debug
>cmake ../../../osgWorks_03_00_00/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DCMAKE_DEBUG_POSTFIX=_animat_debug
>make
>sudo make install
4. Build release
>cd single_release
>cmake ../../../osgWorks_03_00_00/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_RELEASE_POSTFIX=_animat
>make
>sudo make install


Build osgBullet
1.  cd to AnimatLabSDK/3rdPart/osgBullet_03_00_00/build
2.  create build directories
>mkdir single_debug
>mkdir double_debug
>mkdir single_release
>mkdir double_release
3. Build single_debug. Please note in all of these cmakes that the path to osgWorks_DIR is absolute, not relative. You must replace this with the correct path for where you installed AnimatLabSDK. Also, the first time you run the cmake command it will tell you it cannot find the bullet include directory. I am not sure why it does this, but if you run the same command again it will find it and compile.
>cd single_debug
>cmake ../../../osgBullet_03_00_00/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DCMAKE_DEBUG_POSTFIX=_single_debug -DosgWorks_DIR=/media/Ubuntu_Data/AnimatLabSDK/3rdParty/osgWorks_03_00_00/build/debug/lib/x86_64-linux-gnu -DOSGBULLET_USE_DOUBLE_PRECISION=OFF -DBULLET_INCLUDE_DIR=/usr/local/include/bullet -DBULLET_COLLISION_LIBRARY=/usr/local/lib/libBulletCollision_single.a -DBULLET_COLLISION_LIBRARY_DEBUG=/usr/local/lib/libBulletCollision_single_debug.a -DBULLET_DYNAMICS_LIBRARY=/usr/local/lib/libBulletDynamics_single.a -DBULLET_DYNAMICS_LIBRARY_DEBUG=/usr/local/lib/libBulletDynamics_single_debug.a -DBULLET_MATH_LIBRARY=/usr/local/lib/libLinearMath_single.a -DBULLET_MATH_LIBRARY_DEBUG=/usr/local/lib/libLinearMath_single_debug.a -DBULLET_SOFTBODY_LIBRARY=/usr/local/lib/libBulletSoftBody_single.a -DBULLET_SOFTBODY_LIBRARY_DEBUG=/usr/local/lib/libBulletSoftBody_single_debug.a
>make
>sudo make install
4. Build double_debug
>cd double_debug
>cmake ../../../osgBullet_03_00_00/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DCMAKE_DEBUG_POSTFIX=_double_debug -DosgWorks_DIR=/media/Ubuntu_Data/AnimatLabSDK/3rdParty/osgWorks_03_00_00/build/debug/lib/x86_64-linux-gnu -DOSGBULLET_USE_DOUBLE_PRECISION=ON -DBULLET_INCLUDE_DIR=/usr/local/include/bullet -DBULLET_COLLISION_LIBRARY=/usr/local/lib/libBulletCollision_double.a -DBULLET_COLLISION_LIBRARY_DEBUG=/usr/local/lib/libBulletCollision_double_debug.a -DBULLET_DYNAMICS_LIBRARY=/usr/local/lib/libBulletDynamics_double.a -DBULLET_DYNAMICS_LIBRARY_DEBUG=/usr/local/lib/libBulletDynamics_double_debug.a -DBULLET_MATH_LIBRARY=/usr/local/lib/libLinearMath_double.a -DBULLET_MATH_LIBRARY_DEBUG=/usr/local/lib/libLinearMath_double_debug.a -DBULLET_SOFTBODY_LIBRARY=/usr/local/lib/libBulletSoftBody_double.a -DBULLET_SOFTBODY_LIBRARY_DEBUG=/usr/local/lib/libBulletSoftBody_double_debug.a
>make
>sudo make install
5. Build single_release
>cd single_release
>cmake ../../../osgBullet_03_00_00/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_RELEASE_POSTFIX=_single -DosgWorks_DIR=/media/Ubuntu_Data/AnimatLabSDK/3rdParty/osgWorks_03_00_00/build/release/lib/x86_64-linux-gnu -DOSGBULLET_USE_DOUBLE_PRECISION=OFF -DBULLET_INCLUDE_DIR=/usr/local/include/bullet -DBULLET_COLLISION_LIBRARY=/usr/local/lib/libBulletCollision_single.a -DBULLET_COLLISION_LIBRARY_DEBUG=/usr/local/lib/libBulletCollision_single_debug.a -DBULLET_DYNAMICS_LIBRARY=/usr/local/lib/libBulletDynamics_single.a -DBULLET_DYNAMICS_LIBRARY_DEBUG=/usr/local/lib/libBulletDynamics_single_debug.a -DBULLET_MATH_LIBRARY=/usr/local/lib/libLinearMath_single.a -DBULLET_MATH_LIBRARY_DEBUG=/usr/local/lib/libLinearMath_single_debug.a -DBULLET_SOFTBODY_LIBRARY=/usr/local/lib/libBulletSoftBody_single.a -DBULLET_SOFTBODY_LIBRARY_DEBUG=/usr/local/lib/libBulletSoftBody_single_debug.a
>make
>sudo make install
6. Build double_release
>cd double_release
>cmake ../../../osgBullet_03_00_00/ -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_RELEASE_POSTFIX=_double -DosgWorks_DIR=/media/Ubuntu_Data/AnimatLabSDK/3rdParty/osgWorks_03_00_00/build/release/lib/x86_64-linux-gnu -DOSGBULLET_USE_DOUBLE_PRECISION=ON -DBULLET_INCLUDE_DIR=/usr/local/include/bullet -DBULLET_COLLISION_LIBRARY=/usr/local/lib/libBulletCollision_double.a -DBULLET_COLLISION_LIBRARY_DEBUG=/usr/local/lib/libBulletCollision_double_debug.a -DBULLET_DYNAMICS_LIBRARY=/usr/local/lib/libBulletDynamics_double.a -DBULLET_DYNAMICS_LIBRARY_DEBUG=/usr/local/lib/libBulletDynamics_double_debug.a -DBULLET_MATH_LIBRARY=/usr/local/lib/libLinearMath_double.a -DBULLET_MATH_LIBRARY_DEBUG=/usr/local/lib/libLinearMath_double_debug.a -DBULLET_SOFTBODY_LIBRARY=/usr/local/lib/libBulletSoftBody_double.a -DBULLET_SOFTBODY_LIBRARY_DEBUG=/usr/local/lib/libBulletSoftBody_double_debug.a
>make -j4
>sudo make install


Build Dynamixel SDK
You only need to build this if you need to use the robotics framework. If not then you can skip it. This SDK allows you to control Dynamixel servos using the Usb2Dynamixel control board
Open /AnimatLabSDK/3rdParty/DynamixelSDK/linux/src/dxl.workspace in codeblocks
Rebuild the workspace in both debug and release mode
Run the UpdateBin.sh file in that same folder


Build opeFrameworksArduino
You only need to build this if you need to use the robotics framework. If not then you can skip it. This project allows you to control robot parts using an Arduino board using the Firmata protocol. It is typically targeted to the ArbotixFirmata sketch to allow you to control Dynamixel servos. 
Open /AnimatLabSDK/3rdParty/openFrameworksArduino/linux/openFrameworksArduino.workspace in codeblocks
Rebuild the workspace in both debug and release mode
Run the UpdateBin.sh file in that same folder


Build AnimatSimulator
1.  Go to AnimatLabSDK/AnimatLabPublicSource/Projects_Mono and open AnimatLabSimCode.sln file in monodevelop (right click and open in).
2.  Make sure the configuration is set to debug and then do a rebuild all. All should succeed.
3. Change configuration to debug_double and rebuild BulletAnimatSim.
4. Change configuration to release and rebuild all.
5. Change configuration to release_double and rebuild BulletAnimatSim.
6. Open /AnimatLabPublicSource/Documentation/Ubuntu_help/AnimatLab.conf file in gedit.
7. Edit the file path to point to the location where you installed AnimatLabSDK/AnimatLabPublicSource/bin. Make sure you use the correct path. It should relative to the root user. For example, you should use /home/user/AnimatLabSDK as opposed to ~/AnimatLabSDK. 
8. Cd to AnimatLabSDK/AnimatLabPublicSource/Documents/Ubuntu_Help
and Copy AnimatLab.conf into ld config folder.
>sudo cp Animatlab.conf /etc/ld.so.conf.d/AnimatLab.conf
9. Refresh shared library list
>sudo ldconfig
10. Cd to AnimatLabSDK/AnimatLabPublicSource/bin/resources and copy arial true type font to user folder.
>sudo cp arial.ttf /usr/share/fonts/truetype
11. Cd to AnimatLabSDK/AnimatLabPublicSource/bin and test all AnimatSimulator configurations.
>./animatsimulator_debug ../Tutorials/Examples/StandAloneSimTest/Bullet_Single_Linux_Debug.asim
>./animatsimulator_debug ../Tutorials/Examples/StandAloneSimTest/Bullet_Double_Linux_Debug.asim
>./animatsimulator ../Tutorials/Examples/StandAloneSimTest/Bullet_Single_Linux.asim
>./animatsimulator ../Tutorials/Examples/StandAloneSimTest/Bullet_Double_Linux.asim