README.md 3.41 KB
Newer Older
Pierre NARVOR's avatar
Pierre NARVOR committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# rtac_base

This package contains various types / algorithms which are extensively used in
the RTAC projects developments (namely the rtac_display, rtac_optix and
rtac_acoustics repositories).

Disclaimer : this packages and the dependent ones have only been tested on
Ubuntu. Don't expect to see it work right away with another system.

# Installation

### Dependencies

The two main dependencies are Eigen3 and CUDA (you can skip if these are already
Pierre NARVOR's avatar
Pierre NARVOR committed
15
16
installed on your system). If you do not need CUDA, you may deactivate CUDA
support in rtac_base (See in the Compiling and Installing section).
Pierre NARVOR's avatar
Pierre NARVOR committed
17
18
19
20

#### Installing Eigen

The Eigen version being provided in the Ubuntu package manager being rather old,
Pierre NARVOR's avatar
Pierre NARVOR committed
21
22
this software uses more recent version of Eigen (we use Eigen 3.4) provided by
Eigen [official repository](https://gitlab.com/libeigen/eigen).
Pierre NARVOR's avatar
Pierre NARVOR committed
23
24
25
26

```
git clone https://gitlab.com/libeigen/eigen.git
cd eigen
Pierre NARVOR's avatar
Pierre NARVOR committed
27
git checkout 3.4
Pierre NARVOR's avatar
Pierre NARVOR committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
make build && cd build
cmake -DCMAKE_INSTALL_PREFIX=<your install location> ..
make install
```

#### Installing CUDA on Ubuntu

To our knowledge, when these line were written there are still no consensus on
how to install CUDA on your machine while being sure not to break everything. We
present here how we do it, which takes a little more efforts but has the benefit
of not breaking you graphical session. The idea is to let Ubuntu manage the
graphical driver, and install CUDA by manually selecting the CUDA version
depending on which graphic driver was/is installed.

**CAUTION** Installing graphical drivers has the potential to break your
graphical session. If this happens, you can save yourself by logging into a TTY
(CTRL-ALT-F[1-2-3-4]), removing all that is nvidia related using apt, and
deleting the /etc/X11/xorg.conf file. This will re-enable the use of the mesa
driver and give you back a graphical session. (But use at your own risks...).


1. Check your graphic card model using lshw and install a suitable driver.

```
lshw | grep display -A10 -B10
```
Find the model of your NVIDIA graphic card and search on the [NVIDIA
website](https://www.nvidia.com/Download/index.aspx) the driver version suitable
for your graphic card **DO NOT DOWNLOAD THE DRIVER, JUST CHECK THE VERSION**

Instead, install the most suitable version for your system from the **ADDITIONAL
DRIVER** dialog in Ubuntu. Install it and reboot.



2. Check the CUDA version and install the highest one compatible with your
driver.

Check the CUDA version you can install using the Table II in [CUDA release
notes](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html).

Download the CUDA installation file from
[here](https://developer.nvidia.com/cuda-downloads).

**TAKE THE RUNFILE, NOT A .DEB. THE .DEB MIGHT INSTALL AN INCOMPATIBLE DRIVER**

Run the runfile as sudo but **DO NOT INSTALL THE DRIVER** (You already did
that).

Let the installer do his thing, and voilà ! CUDA should be installed under
/usr/local




Pierre NARVOR's avatar
Pierre NARVOR committed
83
### Compiling and installing
Pierre NARVOR's avatar
Pierre NARVOR committed
84
85
86

This is a standard CMake compilation/installation.

Pierre NARVOR's avatar
Pierre NARVOR committed
87
88
You may deactivate CUDA support with the option WITH_CUDA=OFF.

Pierre NARVOR's avatar
Pierre NARVOR committed
89
90
```
mkdir build && cd build
Pierre NARVOR's avatar
Pierre NARVOR committed
91
cmake -DWITH_CUDA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<an install location in $CMAKE_PREFIX_PATH, or on the system> ..
Pierre NARVOR's avatar
Pierre NARVOR committed
92
93
94
95
96
97
make -j4 install
```

Feel free to use this CMakeLists.txt and the associated cmake/\*.cmake scripts as
a CMake template for your own projects. They are not perfect but try to follow
modern CMake conventions (Please use CMake targets !)
Pierre NARVOR's avatar
Pierre NARVOR committed
98