Version 3 (modified by 11 years ago) ( diff ) | ,
---|
Installation
Download
To get the source code from the SVN repository :
$ svn co https://devel.hds.utc.fr/svn/pacpussensors/trunk/
It creates a folder named "trunk" containing the code source of every available plugin.
Compilation
First, make sure the CMakeList.txt at the root of the directory is well configured (into trunk/). In order to install the Sick plugin, modify the file and verify you have the following line :
add_subdirectory(Sick)
Also, the environment variable $PACPUS_ROOT must point to the pacpus installation directory (you normally already set it when you installed PACPUS).
Then we need to configure the installation :
$ export PACPUS_ROOT=/opt/pacpus/0.0.2 # Pacpus Framework path $ cd trunk/build/ # first go into the build folder $ cmake ..
Now we can compile and install :
$ sudo make install
Make sure the executable files you just created are copied into $PACPUS_ROOT/lib/.
Configuration
In order to work with the plugins we want, PACPUS needs an XML file.
XML
Depending on used sensors and how many, you should define these three property in a "Sick" node (X must start from ’0’) :
- sickldmrs_X
- sicklms151_X
- sicklms511_X
For example, let’s say we have two Sick LMS151, one LDMRS and one LMS511 :
<?xml version="1.0" encoding="ISO-8859-1"?> <pacpus> <components> <Sick type="SickComponent" sickldmrs_0="192.168.0.1:12002" sickldmrs_0_recording="1" sicklms151_0="192.168.0.10:2111" sicklms151_0_recording="1" sicklms151_1="192.168.0.11:2111" sicklms151_1_recording="1" sicklms511_0="192.168.0.50:2111" sicklms511_0_recording="1" /> </components> <parameters> <plugins list="libSick.so" /> </parameters> </pacpus>
Execution
First, we need to set the environment variable $LD_LIBRARY_PATH. This variable is used by the main program to find where the plugins (.so files) are.
$ export LD_LIBRARY_PATH=$PACPUS_ROOT/lib
The Sick plugin will use files to record the data it processes (if configured to, see XML). To make sure the files are created or opened, we have two solutions :
- Give all the rights to users of the bin directory
sudo chmod 777 $PACPUS_ROOT/bin/
- Execute Pacpus as root (not working)
Then, we can execute Pacpus :
$ cd $PACPUS_BIN/bin/ $ ./PacpusSensor path/to/xml/file.xml