Important!
The following document is a guide to install the CAR component.
It gives the steps to install CAR on Fedora 19 64bits from scratch.
Summary :
- Install ASUS Sensor and OpenNI
- Install PostgreSQL Database
- Install SUP packages
- Test and use the CAR component
Requirements :
- You have a machine with Fedora 19 64bits installed (get fedora 19 64bits).
- A network access on Internet is necessary.
- A user with administrative rights (with sudo or root) is necessary.
- You need wget and unzip programs (yum install wget unzip).
Instructions :
- You can copy and paste each commands.
- When it’s specified “As root”, you have to run the command with administrative rights :
- you can become root by running su before run the command,
- or with sudo, add sudo at the head of the command.
Preparation :
You may create a work folder for getting the packages and configuration files :
mkdir ~/demcare cd demcare
In your work folder, you may create a new folder to download the packages :
mkdir ~/demcare/packages
1 – Install ASUS Sensor and OpenNI
1.1 – Get the OpenNI packages from Stars website :
Go into your packages folder, run the following command to get the packages from the Stars website :
wget http://www-sop.inria.fr/stars/car-component/openni-fc19-x86_64.tar.bz2
tar -xjf openni-fc19-x86_64.tar.bz2
1.2 – Install the packages from the packages folder (As root) :
Check to remove all previous versions :
yum remove openni*
Run the following command to install OpenNI with examples, and the ASUS Sensor driver :
yum install openni*.rpm openni-examples*.rpm openni-primesense*.rpm
1.3 – Check the installation :
If you want check now the installation of OpenNI see this page.
2 – Install PostgreSQL Database
2.1 – Activate the PostgreSQL 9.2 repository (As root) :
rpm -Uvh http://yum.postgresql.org/9.2/fedora/fedora-$(rpm -E %fedora)-x86_64/pgdg-fedora92-9.2-6.noarch.rpm
Notice
To ensure you install the good package, you can exclude Fedora own PostgreSQL Packages (As root) :
Edit /etc/yum.repo.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo and add the following line at the end of the fedora repository description :
exclude=postgresql*
2.2 – Install Postgresql packages (As root) :
Before, you had to activate the PostgreSQL 9.2 repository (step 2.1), install this packages :
yum install postgresql92 postgresql92-server postgresql92-contrib
The packages should be provided by pgdg92 repository.
2.3 – Initialise the database (As root) :
su - postgres -c /usr/pgsql-9.2/bin/initdb
Warning!
Please make sure that in the line above you employ a hyphen between su and postgres keywords.
2.4 – Configure PostgreSQL (As root) :
Edit /var/lib/pgsql/9.2/data/postgresql.conf to uncomment and modify the file as following (As root) :
(e.g. gedit /var/lib/pgsql/9.2/data/postgresql.conf)
listen_addresses = '*' port = 5432
Edit PostgreSQL /var/lib/pgsql/9.2/data/pg_hba.conf file to have (As root) :
(e.g. gedit /var/lib/pgsql/9.2/data/pg_hba.conf)
# “local” is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust host all all samenet trust # add this line
2.5 – Enable postgresql on every boot (As root) :
systemctl enable postgresql-9.2.service
Now restart the service…
service postgresql-9.2 restart
2.6 – Download the dump.sql :
Create the demcare folder and download the dump.sql in this folder :
cd ~ mkdir demcare cd demcare wget https://team.inria.fr/stars/files/2013/07/carDB_20130702.sql_.zip unzip carDB_20130702.sql_.zip
To allow all users to read the dump.sql file :
chmod ugo+rw carDB_20130702.sql mv ~/demcare/carDB_20130702.sql /tmp/
2.7 – Create the new demcare database (As root) :
To create the new demcare database, run the following commands (As root) :
su - postgres
Notice
If you need to clean or remove any previous demcare database, run this command before create the database :
dropdb demcare
Then run the following commands to build the database :
createdb --encoding=utf-8 --owner=postgres demcare psql -Upostgres -ddemcare -p5432 -f /tmp/carDB_20130702.sql exit
2.8 – Check the installation :
If you want check now the installation of OpenNI see this page.
3 – Install SUP packages
3.1 – Activate RPM Fusion Repostories (As root) :
To install OpenCV INRIA package, we need some depencies provided by RPM Fusion Repositories.
Activate the RPM Fusion Repositories (As root) :
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
3.2 – Get OpenNI packages from Stars website :
Go into your packages folder, run the following command to get the packages from the Stars website :
wget http://www-sop.inria.fr/stars/car-component/opencv-inria-fc19-x86_64.tar.bz2 wget http://www-sop.inria.fr/stars/car-component/sup-fc19-x86_64.tar.bz2
tar -xjf opencv-inria-fc19-x86_64.tar.bz2 tar -xjf sup-fc19-x86_64.tar.bz2
3.3 – Install OpenCV INRIA SUP and Dtk packages (As root):
Check to remove all previous versions :
yum remove opencv*
Run the following command to install OpenCV and SUP packages from your packages folder :
yum install opencv-inria*.rpm
yum install dtk*.rpm sup*.rpm sup-plugins*.rpm extra*.rpm
Install the following package to fix some issues :
yum install libvpx-devel
3.4 – Create a new file /etc/ld.so.conf.d/inria.conf (As root) :
Edit the file to add this content (As root) :
(e.g. gedit /etc/ld.so.conf.d/inria.conf)
/usr/local/inria/dtk/lib /usr/local/inria/sup/lib /usr/local/inria/3party/lib /usr/local/inria/extra/AnhTuan/lib /usr/local/inria/extra/MTS/lib /usr/local/inria/extra/DepthCompression/lib /usr/local/inria/extra/rleSegmentation/lib /usr/local/inria/extra/SED/lib /usr/local/inria/sup/plugins /usr/local/inria/sup/extralibs/lib
Update the libraries link cache (As root) :
ldconfig
4. Test and use the CAR component
Now you are able to follow the following instructions :