Skip to content

Commit

Permalink
update install manual and codes
Browse files Browse the repository at this point in the history
  • Loading branch information
seungjae24 committed Oct 11, 2023
1 parent cc0db2e commit dc33f59
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
build/

examples/cpp/demo_visualize
examples/cpp/demo_sequential
examples/cpp/demo_sequential

Open3D/
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ list(APPEND Open3D_LIBRARIES dl)

add_subdirectory(patchworkpp)

set(INCLUDE_PYTHON_WRAPPER OFF CACHE BOOL "Build Python wrapper")
set(INCLUDE_EXAMPLES ON CACHE BOOL "Build examples")

if (INCLUDE_PYTHON_WRAPPER)

message(STATUS "Building Python wrapper")
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
## :package: Prerequisite packages
> You may need to install Eigen, numpy, and Open3D. Open3D is used for point cloud visualization.
```bash
# Install prerequisite packages including Open3D
$ git clone https://github.com/url-kaist/patchwork-plusplus
$ cd patchwork-plusplus
$ bash scripts/install_open3d.bash
```

<details>
<summary> Manual Installation line-by-line </summary>

```bash
# To install Eigen and numpy
$ sudo apt-get install libeigen3-dev
Expand All @@ -51,16 +61,24 @@ $ cd Open3D
$ util/install_deps_ubuntu.sh # Only needed for Ubuntu
$ mkdir build && cd build
$ cmake ..
$ make
$ make # If it fails, try several times or try 'sudo make'
$ sudo make install
```

</details>

## :gear: How to build
> Please follow below codes to build Patchwork++.
### Python
```bash
$ git clone https://github.com/url-kaist/patchwork-plusplus
$ cd patchwork-plusplus
# in patchwork-plusplus directory
$ pip install .
```

### C++
```bash
# in patchwork-plusplus directory
$ mkdir build && cd build
$ cmake ..
$ make
Expand Down
1 change: 0 additions & 1 deletion examples/python/demo_visualize.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import sys
import open3d as o3d
import numpy as np
import pypatchworkpp
Expand Down
4 changes: 2 additions & 2 deletions python_wrapper/pybinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace py = pybind11;

PYBIND11_MODULE(pypatchworkpp, m) {

m.doc() = "Python Patchwork";
m.attr("__version__") = 1;
m.doc() = "Python Patchwork++";
m.attr("__version__") = "0.0.1";

py::class_<patchwork::Params>(m, "Parameters")
.def(py::init<>())
Expand Down
18 changes: 15 additions & 3 deletions install_open3d.bash → scripts/install_open3d.bash
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
set -e

sudo apt-get install libeigen3-dev
pip install numpy

pip install open3d

VERSION=0.15.1

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

[ ! -d Open3D/build ] && mkdir Open3D/build
cd Open3D/build
cd Open3D && util/install_deps_ubuntu.sh

[ ! -d build ] && mkdir build
cd build

cmake .. \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -16,7 +23,12 @@ cmake .. \
-DBUILD_WEBRTC=OFF


make -j$(nproc)
if make -j$(nproc); then
echo "Build Open3D successful"
else
echo "Build failed, try 'make' several times ..."
exit 1
fi

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

0 comments on commit dc33f59

Please sign in to comment.