Skip to content

Commit dc33f59

Browse files
committed
update install manual and codes
1 parent cc0db2e commit dc33f59

File tree

6 files changed

+44
-10
lines changed

6 files changed

+44
-10
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
build/
44

55
examples/cpp/demo_visualize
6-
examples/cpp/demo_sequential
6+
examples/cpp/demo_sequential
7+
8+
Open3D/

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ list(APPEND Open3D_LIBRARIES dl)
2222

2323
add_subdirectory(patchworkpp)
2424

25+
set(INCLUDE_PYTHON_WRAPPER OFF CACHE BOOL "Build Python wrapper")
26+
set(INCLUDE_EXAMPLES ON CACHE BOOL "Build examples")
27+
2528
if (INCLUDE_PYTHON_WRAPPER)
2629

2730
message(STATUS "Building Python wrapper")

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
## :package: Prerequisite packages
3838
> You may need to install Eigen, numpy, and Open3D. Open3D is used for point cloud visualization.
3939
40+
```bash
41+
# Install prerequisite packages including Open3D
42+
$ git clone https://github.com/url-kaist/patchwork-plusplus
43+
$ cd patchwork-plusplus
44+
$ bash scripts/install_open3d.bash
45+
```
46+
47+
<details>
48+
<summary> Manual Installation line-by-line </summary>
49+
4050
```bash
4151
# To install Eigen and numpy
4252
$ sudo apt-get install libeigen3-dev
@@ -51,16 +61,24 @@ $ cd Open3D
5161
$ util/install_deps_ubuntu.sh # Only needed for Ubuntu
5262
$ mkdir build && cd build
5363
$ cmake ..
54-
$ make
64+
$ make # If it fails, try several times or try 'sudo make'
5565
$ sudo make install
5666
```
5767

68+
</details>
69+
5870
## :gear: How to build
5971
> Please follow below codes to build Patchwork++.
6072
73+
### Python
6174
```bash
62-
$ git clone https://github.com/url-kaist/patchwork-plusplus
63-
$ cd patchwork-plusplus
75+
# in patchwork-plusplus directory
76+
$ pip install .
77+
```
78+
79+
### C++
80+
```bash
81+
# in patchwork-plusplus directory
6482
$ mkdir build && cd build
6583
$ cmake ..
6684
$ make

examples/python/demo_visualize.py

100644100755
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import sys
32
import open3d as o3d
43
import numpy as np
54
import pypatchworkpp

python_wrapper/pybinding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ namespace py = pybind11;
88

99
PYBIND11_MODULE(pypatchworkpp, m) {
1010

11-
m.doc() = "Python Patchwork";
12-
m.attr("__version__") = 1;
11+
m.doc() = "Python Patchwork++";
12+
m.attr("__version__") = "0.0.1";
1313

1414
py::class_<patchwork::Params>(m, "Parameters")
1515
.def(py::init<>())
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
set -e
22

3+
sudo apt-get install libeigen3-dev
4+
pip install numpy
5+
6+
pip install open3d
7+
38
VERSION=0.15.1
49

510
[ ! -d Open3D ] && git clone https://github.com/isl-org/Open3D.git -b v$VERSION || echo "Skip pulling repo"
611

7-
[ ! -d Open3D/build ] && mkdir Open3D/build
8-
cd Open3D/build
12+
cd Open3D && util/install_deps_ubuntu.sh
13+
14+
[ ! -d build ] && mkdir build
15+
cd build
916

1017
cmake .. \
1118
-DCMAKE_BUILD_TYPE=Release \
@@ -16,7 +23,12 @@ cmake .. \
1623
-DBUILD_WEBRTC=OFF
1724

1825

19-
make -j$(nproc)
26+
if make -j$(nproc); then
27+
echo "Build Open3D successful"
28+
else
29+
echo "Build failed, try 'make' several times ..."
30+
exit 1
31+
fi
2032

2133
echo "Applying 'sudo make install'. Enter password"
2234
sudo make install

0 commit comments

Comments
 (0)