Skip to content

Commit

Permalink
Merge master. Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
errissa committed Oct 13, 2023
2 parents 6e156c1 + a1ae217 commit 405698f
Show file tree
Hide file tree
Showing 163 changed files with 2,278 additions and 1,124 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
test-wheel-cpu:
name: Test wheel CPU
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: [build-wheel]
strategy:
fail-fast: false
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
name: open3d-devel-linux-x86_64
path: open3d-devel-*.tar.xz
if-no-files-found: error
- name: Upload viewer to GitHub artifacts
if: ${{ env.BUILD_SHARED_LIBS == 'OFF' }}
uses: actions/upload-artifact@v3
with:
name: open3d-viewer-Linux
path: open3d-viewer-*-Linux.deb
if-no-files-found: error
- name: GCloud CLI auth
if: ${{ github.ref == 'refs/heads/master' }}
uses: 'google-github-actions/auth@v1'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ jobs:
# no need to run on Windows
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
needs: [build-wheel, windows]
# temp workaround for Windows CUDA Debug CI out of space. Still update docs.
# needs: [build-wheel, windows]
needs: [build-wheel]
steps:
- name: GCloud CLI auth
uses: google-github-actions/auth@v1
Expand Down
21 changes: 21 additions & 0 deletions 3rdparty/cmake/FindTBB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Try to use pre-installed config
find_package(TBB CONFIG)
if(TARGET TBB::tbb)
set(TBB_FOUND TRUE)
else()
message(STATUS "Target TBB::tbb not defined, falling back to manual detection")
find_path(TBB_INCLUDE_DIR tbb/tbb.h)
find_library(TBB_LIBRARY tbb)
if(TBB_INCLUDE_DIR AND TBB_LIBRARY)
message(STATUS "TBB found: ${TBB_LIBRARY}")
add_library(TBB::tbb UNKNOWN IMPORTED)
set_target_properties(TBB::tbb PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${TBB_INCLUDE_DIR}"
IMPORTED_LOCATION "${TBB_LIBRARY}"
)
set(TBB_FOUND TRUE)
else()
set(TBB_FOUND FALSE)
endif()
endif()

101 changes: 78 additions & 23 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ endfunction()
# If <pkg> also defines targets, use them instead and pass them via TARGETS option.
#
function(open3d_find_package_3rdparty_library name)
cmake_parse_arguments(arg "PUBLIC;HEADER;REQUIRED;QUIET" "PACKAGE;PACKAGE_VERSION_VAR" "TARGETS;INCLUDE_DIRS;LIBRARIES" ${ARGN})
cmake_parse_arguments(arg "PUBLIC;HEADER;REQUIRED;QUIET" "PACKAGE;VERSION;PACKAGE_VERSION_VAR" "TARGETS;INCLUDE_DIRS;LIBRARIES" ${ARGN})
if(arg_UNPARSED_ARGUMENTS)
message(STATUS "Unparsed: ${arg_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Invalid syntax: open3d_find_package_3rdparty_library(${name} ${ARGN})")
Expand All @@ -281,6 +281,9 @@ function(open3d_find_package_3rdparty_library name)
set(arg_PACKAGE_VERSION_VAR "${arg_PACKAGE}_VERSION")
endif()
set(find_package_args "")
if(arg_VERSION)
list(APPEND find_package_args "${arg_VERSION}")
endif()
if(arg_REQUIRED)
list(APPEND find_package_args "REQUIRED")
endif()
Expand Down Expand Up @@ -539,11 +542,26 @@ endif()

# cutlass
if(BUILD_CUDA_MODULE)
include(${Open3D_3RDPARTY_DIR}/cutlass/cutlass.cmake)
open3d_import_3rdparty_library(3rdparty_cutlass
INCLUDE_DIRS ${CUTLASS_INCLUDE_DIRS}
DEPENDS ext_cutlass
)
if(USE_SYSTEM_CUTLASS)
find_path(3rdparty_cutlass_INCLUDE_DIR NAMES cutlass/cutlass.h)
if(3rdparty_cutlass_INCLUDE_DIR)
add_library(3rdparty_cutlass INTERFACE)
target_include_directories(3rdparty_cutlass INTERFACE ${3rdparty_cutlass_INCLUDE_DIR})
add_library(Open3D::3rdparty_cutlass ALIAS 3rdparty_cutlass)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS 3rdparty_cutlass EXPORT ${PROJECT_NAME}Targets)
endif()
else()
set(USE_SYSTEM_CUTLASS OFF)
endif()
endif()
if(NOT USE_SYSTEM_CUTLASS)
include(${Open3D_3RDPARTY_DIR}/cutlass/cutlass.cmake)
open3d_import_3rdparty_library(3rdparty_cutlass
INCLUDE_DIRS ${CUTLASS_INCLUDE_DIRS}
DEPENDS ext_cutlass
)
endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_cutlass)
endif()

Expand Down Expand Up @@ -581,6 +599,7 @@ endif()
if(USE_SYSTEM_NANOFLANN)
open3d_find_package_3rdparty_library(3rdparty_nanoflann
PACKAGE nanoflann
VERSION 1.5.0
TARGETS nanoflann::nanoflann
)
if(NOT 3rdparty_nanoflann_FOUND)
Expand Down Expand Up @@ -1109,6 +1128,14 @@ open3d_import_3rdparty_library(3rdparty_poisson
)
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_poisson)

# Minizip
if(WITH_MINIZIP)
open3d_pkg_config_3rdparty_library(3rdparty_minizip
SEARCH_ARGS minizip
)
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM Open3D::3rdparty_minizip)
endif()

# Googletest
if (BUILD_UNIT_TESTS)
if(USE_SYSTEM_GOOGLETEST)
Expand Down Expand Up @@ -1429,9 +1456,15 @@ endif()
# msgpack
if(USE_SYSTEM_MSGPACK)
open3d_find_package_3rdparty_library(3rdparty_msgpack
PACKAGE msgpack
TARGETS msgpackc
PACKAGE msgpack-cxx
TARGETS msgpack-cxx
)
if(NOT 3rdparty_msgpack_FOUND)
open3d_find_package_3rdparty_library(3rdparty_msgpack
PACKAGE msgpack
TARGETS msgpackc
)
endif()
if(NOT 3rdparty_msgpack_FOUND)
open3d_pkg_config_3rdparty_library(3rdparty_msgpack
SEARCH_ARGS msgpack
Expand Down Expand Up @@ -1826,25 +1859,47 @@ endif ()

# Stdgpu
if (BUILD_CUDA_MODULE)
include(${Open3D_3RDPARTY_DIR}/stdgpu/stdgpu.cmake)
open3d_import_3rdparty_library(3rdparty_stdgpu
INCLUDE_DIRS ${STDGPU_INCLUDE_DIRS}
LIB_DIR ${STDGPU_LIB_DIR}
LIBRARIES ${STDGPU_LIBRARIES}
DEPENDS ext_stdgpu
)
if(USE_SYSTEM_STDGPU)
open3d_find_package_3rdparty_library(3rdparty_stdgpu
PACKAGE stdgpu
TARGETS stdgpu::stdgpu
)
if(NOT 3rdparty_stdgpu_FOUND)
set(USE_SYSTEM_STDGPU OFF)
endif()
endif()
if(NOT USE_SYSTEM_STDGPU)
include(${Open3D_3RDPARTY_DIR}/stdgpu/stdgpu.cmake)
open3d_import_3rdparty_library(3rdparty_stdgpu
INCLUDE_DIRS ${STDGPU_INCLUDE_DIRS}
LIB_DIR ${STDGPU_LIB_DIR}
LIBRARIES ${STDGPU_LIBRARIES}
DEPENDS ext_stdgpu
)
endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_stdgpu)
endif ()

# embree
include(${Open3D_3RDPARTY_DIR}/embree/embree.cmake)
open3d_import_3rdparty_library(3rdparty_embree
HIDDEN
INCLUDE_DIRS ${EMBREE_INCLUDE_DIRS}
LIB_DIR ${EMBREE_LIB_DIR}
LIBRARIES ${EMBREE_LIBRARIES}
DEPENDS ext_embree
)
if(USE_SYSTEM_EMBREE)
open3d_find_package_3rdparty_library(3rdparty_embree
PACKAGE embree
TARGETS embree
)
if(NOT 3rdparty_embree_FOUND)
set(USE_SYSTEM_EMBREE OFF)
endif()
endif()
if(NOT USE_SYSTEM_EMBREE)
include(${Open3D_3RDPARTY_DIR}/embree/embree.cmake)
open3d_import_3rdparty_library(3rdparty_embree
HIDDEN
INCLUDE_DIRS ${EMBREE_INCLUDE_DIRS}
LIB_DIR ${EMBREE_LIB_DIR}
LIBRARIES ${EMBREE_LIBRARIES}
DEPENDS ext_embree
)
endif()
list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_CUSTOM Open3D::3rdparty_embree)

# WebRTC
Expand Down
5 changes: 2 additions & 3 deletions 3rdparty/fmt/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ include(ExternalProject)

set(FMT_LIB_NAME fmt)

if (MSVC AND MSVC_VERSION VERSION_LESS 1930 OR
CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
# MSVC 17.x required for building fmt >6
if (MSVC OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
# MSVC has errors when building fmt >6, up till 9.1
# SYCL / DPC++ needs fmt ver <=6 or >= 9.2: https://github.com/fmtlib/fmt/issues/3005
set(FMT_VER "6.0.0")
set(FMT_SHA256
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/nanoflann/nanoflann.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include(ExternalProject)
ExternalProject_Add(
ext_nanoflann
PREFIX nanoflann
URL https://github.com/jlblancoc/nanoflann/archive/refs/tags/v1.3.2.tar.gz
URL_HASH SHA256=e100b5fc8d72e9426a80312d852a62c05ddefd23f17cbb22ccd8b458b11d0bea
URL https://github.com/jlblancoc/nanoflann/archive/refs/tags/v1.5.0.tar.gz
URL_HASH SHA256=89aecfef1a956ccba7e40f24561846d064f309bc547cc184af7f4426e42f8e65
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/nanoflann"
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/possionrecon/possionrecon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include(ExternalProject)
ExternalProject_Add(
ext_poisson
PREFIX poisson
URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz
URL_HASH SHA256=917d98e037982d57a159fa166b259ff3dc90ffffe09c6a562a71b400f6869ddf
URL https://github.com/isl-org/Open3D-PoissonRecon/archive/90f3f064e275b275cff445881ecee5a7c495c9e0.tar.gz
URL_HASH SHA256=1310df0c80ff0616b8fcf9b2fb568aa9b2190d0e071b0ead47dba339c146b1d3
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson"
SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS.
UPDATE_COMMAND ""
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## Master

* Fix tensor based TSDF integration example.
* Use GLIBCXX_USE_CXX11_ABI=ON by default
* Python 3.9 support. Tensorflow bump 2.4.1 -> 2.5.0. PyTorch bump 1.7.1 -> 1.8.1 (LTS)
* Fix undefined names: docstr and VisibleDeprecationWarning (PR #3844)
* Corrected documentation for Tensor based PointClound, LineSet, TriangleMesh (PR #4685)
* Corrected documentation for KDTree (typo in Notebook) (PR #4744)
* Corrected documentation for visualisation tutorial
* Remove `setuptools` and `wheel` from requirements for end users (PR #5020)
* Fix various typos (PR #5070)
* Exposed more functionality in SLAM and odometry pipelines
Expand All @@ -13,6 +16,8 @@
* Fix Python bindings for CUDA device synchronization, voxel grid saving (PR #5425)
* Support msgpack versions without cmake
* Changed TriangleMesh to store materials in a list so they can be accessed by the material index (PR #5938)
* Support multi-threading in the RayCastingScene function to commit scene (PR #6051).
* Fix some bad triangle generation in TriangleMesh::SimplifyQuadricDecimation

## 0.13

Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ else()
option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" ON )
endif()
option(BUILD_SYCL_MODULE "Build SYCL module with Intel oneAPI" OFF)
if(BUILD_SYCL_MODULE)
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" ON )
else()
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" OFF)
endif()
option(GLIBCXX_USE_CXX11_ABI "Set -D_GLIBCXX_USE_CXX11_ABI=1" ON )
option(ENABLE_SYCL_UNIFIED_SHARED_MEMORY "Enable SYCL unified shared memory" OFF)
if(BUILD_GUI AND (WIN32 OR UNIX AND NOT LINUX_AARCH64 AND NOT APPLE_AARCH64))
option(BUILD_WEBRTC "Build WebRTC visualizer" ON )
Expand All @@ -91,7 +87,9 @@ else()
endif()
option(USE_SYSTEM_ASSIMP "Use system pre-installed assimp" OFF)
option(USE_SYSTEM_CURL "Use system pre-installed curl" OFF)
option(USE_SYSTEM_CUTLASS "Use system pre-installed cutlass" OFF)
option(USE_SYSTEM_EIGEN3 "Use system pre-installed eigen3" OFF)
option(USE_SYSTEM_EMBREE "Use system pre-installed Embree" OFF)
option(USE_SYSTEM_FILAMENT "Use system pre-installed filament" OFF)
option(USE_SYSTEM_FMT "Use system pre-installed fmt" OFF)
option(USE_SYSTEM_GLEW "Use system pre-installed glew" OFF)
Expand All @@ -107,6 +105,7 @@ option(USE_SYSTEM_OPENSSL "Use system pre-installed OpenSSL" OFF
option(USE_SYSTEM_PNG "Use system pre-installed png" OFF)
option(USE_SYSTEM_PYBIND11 "Use system pre-installed pybind11" OFF)
option(USE_SYSTEM_QHULLCPP "Use system pre-installed qhullcpp" OFF)
option(USE_SYSTEM_STDGPU "Use system pre-installed stdgpu" OFF)
option(USE_SYSTEM_TBB "Use system pre-installed TBB" OFF)
option(USE_SYSTEM_TINYGLTF "Use system pre-installed tinygltf" OFF)
option(USE_SYSTEM_TINYOBJLOADER "Use system pre-installed tinyobjloader" OFF)
Expand All @@ -121,6 +120,7 @@ else()
endif()

option(PREFER_OSX_HOMEBREW "Prefer Homebrew libs over frameworks" ON )
option(WITH_MINIZIP "Enable MiniZIP" OFF)

# Sensor options
option(BUILD_LIBREALSENSE "Build support for Intel RealSense camera" OFF)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For more, please visit the [Open3D documentation](http://www.open3d.org/docs).
## Python quick start

Pre-built pip packages support Ubuntu 18.04+, macOS 10.15+ and Windows 10+
(64-bit) with Python 3.6-3.10.
(64-bit) with Python 3.7-3.10.

```bash
# Install
Expand Down Expand Up @@ -87,8 +87,8 @@ To use Open3D in your C++ project, checkout the following examples

<img width="480" src="https://raw.githubusercontent.com/isl-org/Open3D/master/docs/_static/open3d_viewer.png">

Open3D-Viewer is a standalone 3D viewer app available on Ubuntu and macOS.
Please stay tuned for Windows. Download Open3D Viewer from the
Open3D-Viewer is a standalone 3D viewer app available on Debian (Ubuntu), macOS
and Windows. Download Open3D Viewer from the
[release page](https://github.com/isl-org/Open3D/releases).

## Open3D-ML
Expand Down
3 changes: 3 additions & 0 deletions cmake/Open3DPackaging.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This is packaging for the Open3D library. See
# cpp/apps/Open3DViewer/Debian/CMakeLists.txt for packaging the Debian Open3D
# viewer
set(CPACK_GENERATOR TXZ)
if(WIN32)
set(CPACK_GENERATOR ZIP)
Expand Down
11 changes: 10 additions & 1 deletion cpp/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,17 @@ macro(open3d_add_app_gui SRC_DIR APP_NAME TARGET_NAME)
RENAME "${APP_NAME}.xml")
# Various caches need to be updated for the app to become visible
install(CODE "execute_process(COMMAND ${SOURCE_DIR}/postinstall-linux.sh)")
configure_file("${SOURCE_DIR}/Debian/CMakeLists.in.txt"
"${CMAKE_BINARY_DIR}/package-${TARGET_NAME}-deb/CMakeLists.txt" @ONLY)
add_custom_target(package-${TARGET_NAME}-deb
COMMAND cp -a "${CMAKE_BINARY_DIR}/${APP_NAME}" .
COMMAND cp "${SOURCE_DIR}/icon.svg" "${APP_NAME}/${APP_NAME}.svg"
COMMAND cp "${SOURCE_DIR}/${TARGET_NAME}.xml" "${APP_NAME}/"
COMMAND "${CMAKE_COMMAND}" -S .
COMMAND "${CMAKE_COMMAND}" --build . -t package
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/package-${TARGET_NAME}-deb/"
DEPENDS ${TARGET_NAME})
elseif (WIN32)
# Don't create a command window on launch
target_sources(${TARGET_NAME} PRIVATE "${SOURCE_DIR}/icon.rc") # add icon

# MSVC puts the binary in bin/Open3D/Release/Open3D.exe
Expand Down
2 changes: 1 addition & 1 deletion cpp/apps/OfflineReconstruction/LegacyReconstructionUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ class ReconstructionPipeline {
Eigen::Matrix6d info;
const size_t num_scale = voxel_size.size();
for (size_t i = 0; i < num_scale; i++) {
const double max_dis = config_["voxel_szie"].asDouble() * 1.4;
const double max_dis = config_["voxel_size"].asDouble() * 1.4;
const auto src_down = src.VoxelDownSample(voxel_size[i]);
const auto dst_down = dst.VoxelDownSample(voxel_size[i]);
const pipelines::registration::ICPConvergenceCriteria criteria(
Expand Down
36 changes: 36 additions & 0 deletions cpp/apps/Open3DViewer/Debian/CMakeLists.in.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Create Debian package
cmake_minimum_required(VERSION 3.8.0)
project("Open3D-Debian")

message(STATUS "Building package for Debian")

# Install assets
install(DIRECTORY "Open3D"
DESTINATION share
USE_SOURCE_PERMISSIONS
PATTERN "Open3D/Open3D.svg" EXCLUDE
PATTERN "Open3D/Open3D.desktop" EXCLUDE
PATTERN "Open3D/Open3DViewer.xml" EXCLUDE
PATTERN "Open3D/Open3D" EXCLUDE
PATTERN "Open3D/CMakeLists.txt" EXCLUDE
)
install(FILES "Open3D/Open3D.desktop" DESTINATION /usr/share/applications)
install(FILES "Open3D/Open3DViewer.xml" DESTINATION /usr/share/mime/packages)
install(FILES "Open3D/Open3D.svg" DESTINATION /usr/share/icons/hicolor/scalable/apps)
install(PROGRAMS "Open3D/Open3D" DESTINATION bin)

# CPACK parameter
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_NAME "open3d-viewer")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open3D Viewer for 3D files")
set(CPACK_PACKAGE_CONTACT "Open3D team <@PROJECT_EMAIL@>")
set(CPACK_DEBIAN_PACKAGE_SECTION "Graphics")
set(CPACK_PACKAGE_VERSION "@OPEN3D_VERSION@")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc++1, libgomp1, libpng16-16, libglfw3")
set(CPACK_PACKAGE_HOMEPAGE_URL "@PROJECT_HOMEPAGE_URL@")

# How to set cpack prefix: https://stackoverflow.com/a/7363073/1255535
set(CPACK_SET_DESTDIR true)
set(CPACK_INSTALL_PREFIX /usr/local)

include(CPack)
Loading

0 comments on commit 405698f

Please sign in to comment.