README.md 2.11 KB
Newer Older
Victor Lamoine's avatar
Victor Lamoine committed
1
[![Institut Maupertuis logo](http://www.institutmaupertuis.fr/media/gabarit/logo.png)](http://www.institutmaupertuis.fr)
Victor Lamoine's avatar
Victor Lamoine committed
2

Victor Lamoine's avatar
Victor Lamoine committed
3
# General information
4
5
6
- This is a modified copy of the [David-Laserscanner](http://david-3d.com) SDK. It allows the SDK to be used under GNU/Linux and with CMake.
- You need a [DAVID ENTERPRISE/SDK ](http://david-3d.com/en/products/david-sdk) software copy in order to use the SDK.
- The lastest versions of the SDK can be downloaded [here](http://www.david-3d.com/en/support/downloads).
Victor Lamoine's avatar
Victor Lamoine committed
7
- For licensing, please read the [license](LICENSE.txt) file.
8
- A [change log](ChangeLog.txt) is available.
9

Victor Lamoine's avatar
Victor Lamoine committed
10
# Documentation
Victor Lamoine's avatar
Victor Lamoine committed
11
12
13
- The documentation of the SDK can be found [here](http://docs.david-3d.com/sdk/en/index.html). (check the version number!).
- A tutorial on how to use the davidSDK with the Point Cloud Library is available [here](http://www.pointclouds.org/documentation/tutorials/davidsdk.php).

Victor Lamoine's avatar
Victor Lamoine committed
14
# Compile and install davidSDK
15
16
Clone, configure and compile:
```bash
Victor Lamoine's avatar
Victor Lamoine committed
17
18
19
20
21
22
mkdir davidSDK
cd davidSDK
git clone https://gitlab.com/InstitutMaupertuis/davidSDK.git src
mkdir build
cd build
cmake ../src
23
24
25
26
27
28
29
30
make -j2
```

Install:
```
sudo make -j2 install
```

Victor Lamoine's avatar
Victor Lamoine committed
31
# Example project using the davidSDK
32
33
34
35
36
37
38
39
40

```
.
├── build
└── src
    ├── CMakeLists.txt
    └── david_sls2.cpp
```

Victor Lamoine's avatar
Victor Lamoine committed
41
`CMakeLists.txt`
42
43
44
45
46
47
48
49
50
51
52
53
54
```cmake
cmake_minimum_required(VERSION 2.8)
project(davidSDK_test)

find_package(davidSDK 1.5.2 REQUIRED)
include_directories (${davidSDK_INCLUDE_DIRS})
link_directories    (${davidSDK_LIBRARY_DIRS})
add_definitions     (${davidSDK_DEFINITIONS})

add_executable (david_sls2 david_sls2.cpp)
target_link_libraries (david_sls2 davidSDK ${davidSDK_LIBRARIES})
```

Victor Lamoine's avatar
Victor Lamoine committed
55
`david_sls2.cpp`
56
```cpp
Victor Lamoine's avatar
Victor Lamoine committed
57
#include "david.h"
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
83
84
85
86
87

int main(int argc, char *argv[])
{
  try
  {
    david::Client david;
    if (argc == 2)
      david.Connect(argv[1]);
    else
      david.Connect();

    david.sls().Calibrate(120.0);
    david.sls().Scan();
  }
  catch (david::Exception& e)
  {
    e.PrintError();
  }

  return 0;
}
```

Configure and compile:
```bash
cd build
cmake ../src -DdavidSDK_DIR=/usr/local/lib/CMake/davidSDK/ # Default cmake path
make
./david_sls2 
```