SmartSoft/ACE Manual Installation
1) ACE installation
The first step is to download and install the package for ACE.
We recommend to build ACE middleware from sources (Ubuntu's binaries for ACE are usually too old, we need at least ACE-6.0.2).
As a precondition for building ACE from sources the Ubuntu packages g++ and make must be installed first.
The easiest way to install and build ACE is to use our installation script:
# wget http://sourceforge.net/p/smartsoft-ace/code/HEAD/tree/trunk/INSTALL-ACE-6.0.2.sh?format=raw -O INSTALL-ACE-6.0.2.sh # chmod +x INSTALL-ACE-6.0.2.sh # sudo ./INSTALL-ACE-6.0.2.sh /opt
In case everything went ok you should see:
..... ACE successfully installed!! BYE!
Hints: For more information and customized installation, feel free to read or modify the bash script to your needs. Instead of /opt/ you can also choose a different directory to install ACE to.
2) Get ACE/SmartSoft
SmartSoft can be checked out via subversion or downloaded from SourceForge.
- svn checkout (recommended):
# mkdir ~/SOFTWARE # cd ~/SOFTWARE # svn checkout https://svn.code.sf.net/p/smartsoft-ace/code/trunk/ smartsoft
3) Define ACE_ROOT and SMART_ROOT_ACE environment variables
This step decides where the libraries will be accessible for library users.
On Ubuntu, we recommend to set ACE_ROOT, SMART_ROOT_ACE, SMART_PACKAGE_PATH in .profile. The environment variable SMART_PACKAGE_PATH is used by the CMake build process as entry point to recursively find packages containing SmartSoft components, communication objects or utilities. The variable has to point to one or many directories containing SmartSoft projects. e.g. $SMART_ROOT_ACE/src.
# echo "export ACE_ROOT=/opt/ACE_wrappers" >> ~/.profile # echo "export SMART_ROOT_ACE=\$HOME/SOFTWARE/smartsoft" >> ~/.profile # echo "export SMART_PACKAGE_PATH=\$SMART_ROOT_ACE/src" >> ~/.profile # source ~/.profile Hint: To apply the changes in .profile to the system, it is recommended to reboot your OS.
4) Build SmartSoft
In order to build the SmartSoft-Kernel and some basic SmartSoft-Components in Ubuntu, the following packages are required:
- ACE as shown above (required by SmartSoft-Kernel)
- CMake ACE/SmartSoft (since version 1.9.0) uses CMake as build tool.
- doxygen to build the doxygen documentation of the SmartSoft-kernel.
- (opencv) libopencv-dev libcvaux-dev libhighgui-dev libcv-dev is required by the several components
- libmrpt-dev flex bison (some components)
- wmctrl expect
- libxml++2.6-dev is required by some component
# sudo apt-get install doxygen libopencv-dev libcvaux-dev libhighgui-dev libcv-dev\ libboost-math-dev wmctrl expect libxml++2.6-dev libmrpt-dev flex bison
The svn checkout or the file release contains many projects, each of them can be built separately. All projects can be built as follows:
# cd $SMART_ROOT_ACE/build # cmake .. # make
5) Run NamingService
To easily start and stop the Naming-Service, SmartSoft provides the following bash-scripts (available in $SMART_ROOT_ACE):
Thus the NamingService can be started using the following command:
# cd $SMART_ROOT_ACE/ # ./startSmartSoftNamingService
To see the content of the NamingService and to check if it is working use ./showNamingService. One could see that the NamingService is running and at this point no component is registered to it:
# cd $SMART_ROOT_ACE/ # ./showSmartSoftNamingService Naming Service: ---------------
Hint: Feel free to modify these scripts in order to parametrize the Naming-Service on your needs.
6) Test some example-components
This example demonstrates the PushTimed communication pattern. A timestamp is pushed from exampleComponent70 to exampleComponent71. The exampleComponent71 subscribes to every second push.
# cd $SMART_ROOT_ACE/bin/ # ./exampleComponent70
# cd $SMART_ROOT_ACE/bin/ # ./exampleComponent71