Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registration development #3

Closed
wants to merge 75 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
d5cb531
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
1f990ff
ADD: temp folder to ignore
9and3 Mar 26, 2024
329769b
FIX: corrected a mostruosity I did in the building of DFMesh from file
9and3 Mar 26, 2024
431b9bb
WIP-FLASH: before trying to implement CGAL for io reading
9and3 Mar 26, 2024
8aa5767
FIX: deleting CGAL test
9and3 Mar 26, 2024
c087ce8
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
29276a0
WIP-TEMP: working with open3d as package
9and3 Mar 27, 2024
3cd0efb
FIX: removed submodules not needed
9and3 Mar 28, 2024
aa25873
CAP: working refactor version of cmake project
9and3 Mar 28, 2024
c7e95ca
FIX: update readme with new instructions
9and3 Mar 28, 2024
689e0db
FIX: update readme with new instructions x2
9and3 Mar 28, 2024
61586b6
FIX-WIP: got rid of gitmodule boost
9and3 Mar 28, 2024
e036847
ADD: boost instructions
9and3 Mar 28, 2024
5489f06
ADD: boost and cgal integrated
9and3 Mar 28, 2024
c2eafe7
FIX: commented out unused cgal
9and3 Mar 28, 2024
e306e9d
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
b2d8afe
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
bf6569e
REFACTOR: branch rebased from main, now with open3d compiled from source
DamienGilliard Mar 28, 2024
ad9f91e
REFACTOR: branch rebased from main, new deps
DamienGilliard Mar 28, 2024
5351a97
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
027946a
FIX: Update README.md for Open3D library installation
DamienGilliard Mar 29, 2024
f9b3496
FIX: Path to .exe in README
DamienGilliard Mar 29, 2024
b467a9e
FIX: path in README.md made more universal
DamienGilliard Mar 29, 2024
2566df6
FIX: readme but with link to source
9and3 Mar 29, 2024
ba86fbe
Merge pull request #4 from diffCheckOrg/README_improvement
9and3 Mar 29, 2024
9fd1421
WIP: stashing before refactoring cmake project
9and3 Mar 29, 2024
497d3fb
WIP: testing docker windows
9and3 Mar 29, 2024
de24aa4
FIX: updated version with bats for workflow
9and3 Mar 29, 2024
25af031
WIP: testing different config for ci
9and3 Mar 29, 2024
0e65970
FIX: udpated correct istructions README
9and3 Mar 29, 2024
12c5ac9
FIX: udpated correct istructions README x2
9and3 Mar 29, 2024
994bba3
Merge pull request #5 from diffCheckOrg/refactor_cmakeproj
9and3 Mar 29, 2024
62b5476
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
b226368
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
1fe1725
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
c45b714
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
427102d
REFACTOR: branch rebased from main, now with open3d compiled from source
DamienGilliard Mar 28, 2024
b4082c9
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
23f5c09
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
338e3ae
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
2aecb02
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
2c79c27
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
91b8e23
REFACTOR: branch rebased from main, now with open3d compiled from source
DamienGilliard Mar 28, 2024
98dc20f
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
e1ae188
WIP: Merge branch 'registration-dev' of github.com:diffCheckOrg/diffC…
DamienGilliard Mar 29, 2024
bb87e10
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
9ba2efb
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
ef66944
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
2fc3ebe
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
13eef69
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
290e0ab
Merge branch 'registration-dev' of github.com:diffCheckOrg/diffCheck …
DamienGilliard Mar 29, 2024
a6bac3f
FIX: updated planning
9and3 Mar 29, 2024
5488549
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
e9670cf
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
9874b1b
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
bdd7a0f
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
413d0a7
REFACTOR: branch rebased from main, now with open3d compiled from source
DamienGilliard Mar 28, 2024
f8a7ef6
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
2f47203
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
7425738
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
3dbe0e7
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
747ff90
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
c127d31
REFACTOR: branch rebased from main, now with open3d compiled from source
DamienGilliard Mar 28, 2024
23e0d84
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
b3d16de
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
3325371
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
1bab55c
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
d222378
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
9ef81f5
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
de9cefd
WIP ADD Registration class. No method implemented yet
DamienGilliard Mar 23, 2024
3824212
WIP registration class ( ! WITH SEGMENTATION FAULT)
DamienGilliard Mar 27, 2024
a735b1b
FLASH: Preparing rebase
DamienGilliard Mar 28, 2024
b02bb68
REFACTOR: branch rebased from main, now with open3d compiled from source
DamienGilliard Mar 28, 2024
a4d705b
WIP: Branch rebased from main
DamienGilliard Mar 29, 2024
148c0ef
Merge branch 'registration-dev' of github.com:diffCheckOrg/diffCheck …
DamienGilliard Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 2 additions & 4 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
- uses: actions/checkout@v4

- name: CMAKE Configure
run: >
cmake -B ${{github.workspace}}/build -S ${{github.workspace}}
-D CMAKE_BUILD_TYPE=Release
run: ${{github.workspace}}/cmake/config.bat
- name: CMake Build
run: cmake --build ${{github.workspace}}/build --config Release
run: ${{github.workspace}}/cmake/build.bat
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,10 @@ _deps
.history/

# Built Visual Studio Code Extensions
*.vsix
*.vsix

#######################################
## General
#######################################
# temp folder
temp/
16 changes: 3 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
path = deps/googletest
url = https://github.com/google/googletest
branch = main
[submodule "deps/open3d"]
path = deps/open3d
url = https://github.com/diffCheckOrg/submodule-open3d.git
branch = main
[submodule "deps/eigen"]
path = deps/eigen
url = https://gitlab.com/libeigen/eigen.git
[submodule "deps/fmt"]
path = deps/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "deps/libigl"]
path = deps/libigl
url = https://github.com/libigl/libigl.git
[submodule "deps/boost"]
path = deps/boost
url = https://github.com/diffCheckOrg/submodule-boost.git
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
"shared_mutex": "cpp",
"source_location": "cpp",
"stack": "cpp",
"valarray": "cpp"
"valarray": "cpp",
"*.inc": "cpp",
"coroutine": "cpp",
"resumable": "cpp"
}
}
99 changes: 51 additions & 48 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()



#--------------------------------------------------------------------------
# diffCheck dynamic lib
#--------------------------------------------------------------------------
set(SHARED_LIB_NAME diffCheck)

file(GLOB_RECURSE SOURCES_LIB
src/diffCheck.hh # diffCheck interface
src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src
src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src
src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src
)

add_library(${SHARED_LIB_NAME} SHARED ${SOURCES_LIB})
Expand All @@ -35,69 +38,69 @@ if (WIN32)
endif()
set_target_properties(${SHARED_LIB_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # for dll
# ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # for lib
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib # for lib
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib # for lib
)
target_include_directories(${SHARED_LIB_NAME}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src
)



#--------------------------------------------------------------------------
# 3rd party
#--------------------------------------------------------------------------
# fmt (header-only)--------------------------------------------------------
download_submodule_project(fmt)
add_subdirectory(deps/fmt)

target_link_libraries(${SHARED_LIB_NAME} PUBLIC fmt::fmt)

# Eigen (header-only)------------------------------------------------------
# Eigen -------------------------------------------------------------------
# Eigen -------------------------------------------------------------------
download_submodule_project(eigen)
add_subdirectory(deps/eigen)

target_link_libraries(${SHARED_LIB_NAME} PUBLIC Eigen3::Eigen)

# OpenGL (from system) ----------------------------------------------------
find_package(OpenGL REQUIRED)
target_link_libraries(${SHARED_LIB_NAME} PUBLIC OpenGL::GL)
target_link_libraries(${SHARED_LIB_NAME} INTERFACE OpenGL::GL)

# Libigl + glfw (header-only) ---------------------------------------------
download_submodule_project(libigl)
# all dependecies for libigl: https://libigl.github.io/third-party/
# set compiling flags for libigl
set(LIBIGL_USE_STATIC_LIBRARY OFF)
set(LIBIGL_GLFW ON)
add_subdirectory(deps/libigl)

target_link_libraries(${SHARED_LIB_NAME} PUBLIC igl::glfw)

# Open3D (pre-build binaries /headless not visuals)------------------------
download_submodule_project(open3d)
set(O3D_VERSION 0_17) # 0.17.0
set(OPEN3D_SHAREDLIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/bin)
set(OPEN3D_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/lib)
set(OPEN3D_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/include)

add_library(Open3D SHARED IMPORTED)
set_target_properties(Open3D PROPERTIES
IMPORTED_LOCATION ${OPEN3D_SHAREDLIB_PATH}/Open3D.dll
IMPORTED_IMPLIB ${OPEN3D_LIB_PATH}/Open3D.lib
INTERFACE_INCLUDE_DIRECTORIES ${OPEN3D_INCLUDE_PATH}
)
# Open3D (from system) -----------------------------------------------------
# The options need to be the same as Open3D's default
# If Open3D is configured and built with custom options, you'll also need to
# specify the same custom options.
option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" ON)
if(STATIC_WINDOWS_RUNTIME)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()

find_package(Open3D 0.18.0 REQUIRED)

# print the version debug or release of the package
message(STATUS "Open3D version: ${Open3D_VERSION}"
"Open3D include dir: ${Open3D_INCLUDE_DIRS}"
"Open3D library dir: ${Open3D_LIBRARIES}")

# link the release version of the open3d library
target_link_libraries(${SHARED_LIB_NAME} PUBLIC Open3D::Open3D)

# On Windows if BUILD_SHARED_LIBS is enabled, copy .dll files to the executable directory
if(WIN32)
get_target_property(open3d_type Open3D::Open3D TYPE)
if(open3d_type STREQUAL "SHARED_LIBRARY")
message(STATUS "Copying Open3D.dll to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
add_custom_command(TARGET ${SHARED_LIB_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:Open3D::Open3D>
$<TARGET_FILE_DIR:${SHARED_LIB_NAME}>)
endif()
endif()

target_link_libraries(${SHARED_LIB_NAME} PUBLIC Open3D)
target_include_directories(${SHARED_LIB_NAME} PUBLIC ${OPEN3D_INCLUDE_PATH})
# Boost (from system) -----------------------------------------------------
# download and install from https://sourceforge.net/projects/boost/files/boost-binaries/1.84.0/boost_1_84_0-msvc-14.3-64.exe/download
find_package(Boost REQUIRED)

# copy the o3d dll to the binary dir to make it available for the app
set(DEPENDENCIES Open3D)
# print boost include dir
message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}")

foreach(DEP_LIB ${DEPENDENCIES})
add_custom_command(TARGET ${SHARED_LIB_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:${DEP_LIB}>
$<TARGET_FILE_DIR:${SHARED_LIB_NAME}>
)
endforeach()
target_include_directories(${SHARED_LIB_NAME} PUBLIC ${Boost_INCLUDE_DIRS})

# CGAL (header-only) ------------------------------------------------------
target_include_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/cgal/include)

#--------------------------------------------------------------------------
# executable for prototyping
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ gantt
title diffCheck - backend dev
excludes weekends

data i/o :active, dataio, 2024-03-15, 1w
global registration :glbreg, after dataio, 2w
data i/o :active, dataio, 2024-03-15, 3w
global registration :glbreg, 2024-03-29, 2w
semantic seg. from 3D model :semseg, after glbreg, 1w
local registration :locreg, after semseg, 2w
error computation + results :errcomp, after locreg, 1w
Expand All @@ -47,18 +47,31 @@ gantt
## 3rd party libraries

The project uses the following 3rd party libraries:
- `Open3d` for 3D point cloud processing (as binary submodule for win64 that we store in [submodule-open3d](https://github.com/diffCheckOrg/submodule-open3d)). Note that we deactivate the visualization part of `Open3d` to avoid conflicts with our visualizator.
- `Open3d 0.18.0` for 3D point cloud processing it needs to be installed from source [from here](https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-devel-windows-amd64-0.18.0.zip), unzip the file and by following the instructions below:
```terminal
cd open3d
mkdir build
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Open3D" -S . -B build
cmake --build build --config Release --target ALL_BUILD
cmake --build build --config Release --target INSTALL
```
- `Eigen` for linear algebra (needed by `Open3d`)
- `fmt` for string formatting (needed by `Open3d`)
- `libigl` mainly for I/O and visualization
- `glfw` for window and context creation (needed by `libigl`)
- `CGAL` for general geometric processing and IO
- `Boost` for general utilities, it needs to be installed from source [from the repo](https://github.com/boostorg/boost) as such:
```terminal
git clone --recursive https://github.com/boostorg/boost.git
cd boost
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Boost" -S . -B build
cmake --build build --config Release --target ALL_BUILD
cmake --build build --config Release --target INSTALL
```

## How to build c++ project
To build and test the project, follow the following steps:

```terminal
cmake -S . -B build
cmake --build build
cmake/config.bat
cmake/build.bat
./build/bin/diffCheckApp.exe <-- for prototyping
```

Expand Down
3 changes: 3 additions & 0 deletions assets/dataset/mesh_fromRh_unfixedLength.ply
Git LFS file not shown
1 change: 1 addition & 0 deletions cmake/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake --build build --config Release
2 changes: 2 additions & 0 deletions cmake/clean_config.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rmdir /s /q build
cmake -S . -B build -G "Visual Studio 16 2019" -A x64
1 change: 1 addition & 0 deletions cmake/config.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake -S . -B build -G "Visual Studio 16 2019" -A x64
Loading
Loading