Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-bindings-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
cmake -B ${{github.workspace}}/build_pybind \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DPYBIND=ON
-DBUILD_WITH_PYBIND=ON

- name: Build Python bindings
run: cmake --build ${{github.workspace}}/build_pybind --target pybind_all --config ${{env.BUILD_TYPE}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-bindings-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
cmake -B ${{github.workspace}}/build_pybind `
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DPYBIND=ON `
-DBUILD_WITH_PYBIND=ON `
shell: pwsh

- name: Build Python bindings
Expand Down
28 changes: 21 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ set_property(CACHE HD_CPU_OPTIMIZATION PROPERTY STRINGS AUTO INTEL AMD ARM GENER
# Options to enable / disable specific components
option(BUILD_WITH_CLI_TOOLS "Build with command line tools" ON)
option(BUILD_WITH_HD_MAPPER_APPLICATION "Build with hd_mapper tool" OFF)
option(UTL_PROFILER_DISABLE "Disable UTL profiler (zero overhead when ON)" ON)
option(BUILD_WITH_QUICK_START_DEMO "Build with quick_start_demo" OFF)
option(BUILD_WITH_UTL_PROFILER_DISABLED "Disable UTL profiler (zero overhead when ON)" ON)
option(BUILD_WITH_BUNDLED_FREEGLUT "Build with bundled FreeGlut" ON)
option(BUILD_WITH_BUNDLED_GLEW "Build with bundled GLEW" ON)
option(BUILD_WITH_BUNDLED_LIBLASZIP "Build with bundled Lib LASZIP" ON)
option(BUILD_WITH_BUNDLED_ONETBB "Build with bundled oneTBB" ON)
option(PYBIND "Enable pybind11 bindings" OFF)
option(BUILD_WITH_PYBIND "Enable pybind11 bindings" OFF)

# Add definitions for all projects
add_definitions(-DHDMAPPING_VERSION_MAJOR=${HDMAPPING_VERSION_MAJOR})
Expand Down Expand Up @@ -68,6 +69,12 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# TODO(mwlasiuk) : fix
# if(WIN32)
# set(CMAKE_PDB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# endif()

# Include cmake configs
include(cmake/cpu_optimizations.cmake)
include(cmake/disable_target_warnings.cmake)
Expand Down Expand Up @@ -175,8 +182,8 @@ MESSAGE(STATUS "Using bundled spdlog from: ${THIRDPARTY_DIRECTORY}/spdlog")
add_subdirectory(${THIRDPARTY_DIRECTORY}/UTL)
MESSAGE(STATUS "Using bundled UTL from: ${THIRDPARTY_DIRECTORY}/UTL")

if(PYBIND)
message(STATUS "PYBIND is enabled: fetching pybind.")
if(BUILD_WITH_PYBIND)
message(STATUS "BUILD_WITH_PYBIND is enabled: fetching pybind.")
include(FetchContent)
set(pybind11_SOURCE_DIR "${CMAKE_BINARY_DIR}/3rdparty/pybind11-src")
set(pybind11_BINARY_DIR "${CMAKE_BINARY_DIR}/3rdparty/pybind11-build")
Expand All @@ -193,13 +200,17 @@ if(PYBIND)
endif()
add_subdirectory(pybind)
else()
message(STATUS "PYBIND is disabled.")
message(STATUS "BUILD_WITH_PYBIND is disabled.")
endif()


add_subdirectory(${THIRDPARTY_DIRECTORY}/vqf/vqf/cpp)
add_subdirectory(${THIRDPARTY_DIRECTORY}/Fusion/Fusion)

add_subdirectory(${EXTERNAL_LIBRARIES_DIRECTORY}/plycpp)
add_subdirectory(${EXTERNAL_LIBRARIES_DIRECTORY}/wgs84_do_puwg92)
add_subdirectory(${EXTERNAL_LIBRARIES_DIRECTORY}/WGS84toCartesian)

add_subdirectory(core)

set(CORE_LIBRARIES core)
Expand All @@ -213,6 +224,10 @@ if(BUILD_WITH_HD_MAPPER_APPLICATION)
add_subdirectory(apps/hd_mapper)
endif()

if(BUILD_WITH_QUICK_START_DEMO)
add_subdirectory(apps/quick_start_demo)
endif()

add_subdirectory(apps/lidar_odometry_step_1)
add_subdirectory(apps/manual_color)
add_subdirectory(apps/multi_session_registration)
Expand All @@ -221,14 +236,13 @@ add_subdirectory(apps/split_multi_livox)
add_subdirectory(apps/precision_forestry_tools)
add_subdirectory(apps/mandeye_raw_data_viewer)
add_subdirectory(apps/compare_trajectories)
#add_subdirectory(apps/quick_start_demo)
add_subdirectory(apps/mandeye_mission_recorder_calibration)
add_subdirectory(apps/mandeye_single_session_viewer)
add_subdirectory(apps/livox_mid_360_intrinsic_calibration)
add_subdirectory(apps/single_session_manual_coloring)
add_subdirectory(apps/concatenate_multi_livox)

# NOTE(m.wlasiuk) : disable warnings for third party libraries so they do not pollute build logs
# NOTE(mwlasiuk) : disable warnings for third party libraries so they do not pollute build logs

###
### DISABLE WARNINGS FOR THIRDPARTY CODE - START
Expand Down
18 changes: 10 additions & 8 deletions apps/lidar_odometry_step_1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ add_executable(

target_compile_definitions(lidar_odometry_step_1 PRIVATE
WITH_GUI=1
$<$<BOOL:${UTL_PROFILER_DISABLE}>:UTL_PROFILER_DISABLE>)
$<$<BOOL:${BUILD_WITH_UTL_PROFILER_DISABLED}>:BUILD_WITH_UTL_PROFILER_DISABLED>)

target_include_directories(
lidar_odometry_step_1
Expand All @@ -47,14 +47,15 @@ target_include_directories(

target_link_libraries(
lidar_odometry_step_1
PRIVATE vqf Fusion
PRIVATE
vqf
Fusion
unordered_dense::unordered_dense
spdlog::spdlog
UTL::include
# PRIVATE ${THIRDPARTY_DIRECTORY}/glew-2.2.0/lib/Release/x64/glew32s.lib
OpenGL::GLU
${FREEGLUT_LIBRARY}
${OPENGL_gl_LIBRARY}
OpenGL::GLU
${PLATFORM_LASZIP_LIB}
${PLATFORM_MISCELLANEOUS_LIBS}
${CORE_LIBRARIES}
Expand All @@ -80,7 +81,7 @@ add_executable(

target_compile_definitions(drag_folder_with_mandeye_data_and_drop_here-precision_forestry PRIVATE
WITH_GUI=1
$<$<BOOL:${UTL_PROFILER_DISABLE}>:UTL_PROFILER_DISABLE>)
$<$<BOOL:${BUILD_WITH_UTL_PROFILER_DISABLED}>:BUILD_WITH_UTL_PROFILER_DISABLED>)

target_include_directories(
drag_folder_with_mandeye_data_and_drop_here-precision_forestry
Expand All @@ -105,14 +106,15 @@ target_include_directories(

target_link_libraries(
drag_folder_with_mandeye_data_and_drop_here-precision_forestry
PRIVATE vqf Fusion
PRIVATE
vqf
Fusion
unordered_dense::unordered_dense
spdlog::spdlog
UTL::include
# PRIVATE ${THIRDPARTY_DIRECTORY}/glew-2.2.0/lib/Release/x64/glew32s.lib
OpenGL::GLU
${FREEGLUT_LIBRARY}
${OPENGL_gl_LIBRARY}
OpenGL::GLU
${PLATFORM_LASZIP_LIB}
${PLATFORM_MISCELLANEOUS_LIBS}
${CORE_LIBRARIES}
Expand Down
9 changes: 3 additions & 6 deletions apps/lidar_odometry_step_1/lidar_odometry_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <nlohmann/json.hpp>
#include <vqf.hpp>

#include <HDMapping/Version.hpp>

#include <Core/ndt.h>
#include <Core/structures.h>
#include <Core/transformations.h>
Expand All @@ -39,12 +41,7 @@ using NDTBucketMapType2 = ankerl::unordered_dense::map<uint64_t, NDT::Bucket2>;
// Helper function for getting software version from CMake macros
inline std::string get_software_version()
{
#ifdef HDMAPPING_VERSION_MAJOR
return std::to_string(HDMAPPING_VERSION_MAJOR) + "." + std::to_string(HDMAPPING_VERSION_MINOR) + "." +
std::to_string(HDMAPPING_VERSION_PATCH);
#else
return "0.84.0"; // fallback if CMake macros not available
#endif
return HDMAPPING_VERSION_STRING;
}

struct LidarOdometryParams
Expand Down
2 changes: 1 addition & 1 deletion apps/livox_mid_360_intrinsic_calibration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ target_include_directories(
${THIRDPARTY_DIRECTORY}/observation_equations/codes
${THIRDPARTY_DIRECTORY}/vqf/vqf/cpp)

target_compile_definitions(livox_mid_360_intrinsic_calibration PRIVATE UTL_PROFILER_DISABLE)
target_compile_definitions(livox_mid_360_intrinsic_calibration PRIVATE BUILD_WITH_UTL_PROFILER_DISABLED)

target_link_libraries(
livox_mid_360_intrinsic_calibration
Expand Down
2 changes: 1 addition & 1 deletion apps/mandeye_mission_recorder_calibration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ target_include_directories(
${THIRDPARTY_DIRECTORY}/observation_equations/codes
${THIRDPARTY_DIRECTORY}/vqf/vqf/cpp)

target_compile_definitions(mandeye_mission_recorder_calibration PRIVATE UTL_PROFILER_DISABLE)
target_compile_definitions(mandeye_mission_recorder_calibration PRIVATE BUILD_WITH_UTL_PROFILER_DISABLED)

target_link_libraries(
mandeye_mission_recorder_calibration
Expand Down
2 changes: 1 addition & 1 deletion apps/mandeye_raw_data_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ target_include_directories(
${THIRDPARTY_DIRECTORY}/vqf/vqf/cpp
${THIRDPARTY_DIRECTORY}/Fusion/Fusion)

target_compile_definitions(mandeye_raw_data_viewer PRIVATE UTL_PROFILER_DISABLE)
target_compile_definitions(mandeye_raw_data_viewer PRIVATE BUILD_WITH_UTL_PROFILER_DISABLED)

target_link_libraries(
mandeye_raw_data_viewer
Expand Down
8 changes: 5 additions & 3 deletions apps/multi_view_tls_registration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ target_include_directories(

target_link_libraries(
multi_view_tls_registration_step_2
# PRIVATE ${THIRDPARTY_DIRECTORY}/glew-2.2.0/lib/Release/x64/glew32s.lib
PRIVATE ${FREEGLUT_LIBRARY}
PRIVATE
WGS84toCartesian
wgs84_do_puwg92
unordered_dense::unordered_dense
spdlog::spdlog
${OPENGL_gl_LIBRARY}
OpenGL::GLU
${FREEGLUT_LIBRARY}
${OPENGL_gl_LIBRARY}
${PLATFORM_LASZIP_LIB}
${PLATFORM_MISCELLANEOUS_LIBS}
${CORE_LIBRARIES}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@

#include <HDMapping/Version.hpp>

#include "WGS84toCartesian.hpp"
#include "wgs84_do_puwg92.h"
#include "WGS84toCartesian/WGS84toCartesian.hpp"
#include "wgs84_do_puwg92/wgs84_do_puwg92.h"

#include <proj.h>
#ifdef _WIN32
Expand Down
5 changes: 3 additions & 2 deletions apps/quick_start_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ target_include_directories(
${THIRDPARTY_DIRECTORY}/observation_equations/codes
${THIRDPARTY_DIRECTORY}/vqf/vqf/cpp)

target_compile_definitions(quick_start_demo PRIVATE UTL_PROFILER_DISABLE)
target_compile_definitions(quick_start_demo PRIVATE BUILD_WITH_UTL_PROFILER_DISABLED)

target_link_libraries(
quick_start_demo
PRIVATE vqf
spdlog::spdlog
UTL::include
OpenGL::GLU
unordered_dense::unordered_dense
${FREEGLUT_LIBRARY}
${OPENGL_gl_LIBRARY}
OpenGL::GLU
${PLATFORM_LASZIP_LIB}
${CORE_LIBRARIES}
${GUI_LIBRARIES}
Expand Down
6 changes: 3 additions & 3 deletions apps/quick_start_demo/quick_start_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

#include <Eigen/Eigen>

#include <transformations.h>
#include <Core/transformations.h>
#include <Core/export_laz.h>

#include <portable-file-dialogs.h>

#include <filesystem>
#include "../lidar_odometry_step_1/lidar_odometry_utils.h"
#include <export_laz.h>
#include <HDMapping/Version.hpp>

#include <mutex>
Expand Down Expand Up @@ -711,7 +711,7 @@ bool compute_step_2_demo(std::vector<WorkerData> &worker_data, LidarOdometryPara

int main(int argc, char *argv[])
{
#if 0
#if 0
//ToDo
params.in_out_params_indoor.resolution_X = 0.3;
params.in_out_params_indoor.resolution_Y = 0.3;
Expand Down
1 change: 0 additions & 1 deletion cmake/implot.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include_guard()

set(IMPLOT_LIBRARY_DIRECTORY ${THIRDPARTY_DIRECTORY}/implot)


set(IMPLOT_SOURCE_FILES
${IMPLOT_LIBRARY_DIRECTORY}/implot.cpp
${IMPLOT_LIBRARY_DIRECTORY}/implot_items.cpp
Expand Down
10 changes: 4 additions & 6 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ set(CORE_BASE_SOURCES
src/pose_graph_slam.cpp
src/registration_plane_feature.cpp
src/session.cpp
# src/utils.cpp # TODO(mwlasiuk) : broken AF ...
${EXTERNAL_LIBRARIES_DIRECTORY}/src/wgs84_do_puwg92.cc
${EXTERNAL_LIBRARIES_DIRECTORY}/src/plycpp.cpp
# # src/utils.cpp # TODO(mwlasiuk) : broken AF ...
# ${EXTERNAL_LIBRARIES_DIRECTORY}/src/wgs84_do_puwg92.cc
# ${EXTERNAL_LIBRARIES_DIRECTORY}/src/plycpp.cpp
)

set(CORE_GUI_SOURCES
Expand All @@ -46,7 +46,7 @@ function(add_core_target target_name with_gui)

add_library(${target_name} STATIC ${SOURCES})
target_compile_definitions(${target_name} PRIVATE ${DEFINES})
target_link_libraries(${target_name} PRIVATE ${PLATFORM_LASZIP_LIB} ${PLATFORM_MISCELLANEOUS_LIBS} spdlog::spdlog vqf Fusion)
target_link_libraries(${target_name} PRIVATE ${PLATFORM_LASZIP_LIB} ${PLATFORM_MISCELLANEOUS_LIBS} PROJ::proj spdlog::spdlog vqf Fusion wgs84_do_puwg92 plycpp WGS84toCartesian)
target_include_directories(${target_name} PRIVATE
include
${EIGEN3_INCLUDE_DIR}
Expand All @@ -58,8 +58,6 @@ function(add_core_target target_name with_gui)
${THIRDPARTY_DIRECTORY}/Fusion/Fusion
)

target_link_libraries(${target_name} PRIVATE PROJ::proj)

if(${with_gui})
target_include_directories(${target_name} PRIVATE
${THIRDPARTY_DIRECTORY}/imgui
Expand Down
4 changes: 2 additions & 2 deletions core/src/gnss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <Core/gnss.h>
#include <Core/nmea.h>

#include <WGS84toCartesian.hpp>
#include <wgs84_do_puwg92.h>
#include <WGS84toCartesian/WGS84toCartesian.hpp>
#include <wgs84_do_puwg92/wgs84_do_puwg92.h>

#if WITH_GUI == 1
#include <GL/freeglut.h>
Expand Down
2 changes: 1 addition & 1 deletion core/src/point_cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <GL/freeglut.h>
#endif

#include <plycpp.h>
#include <plycpp/plycpp.h>

#include <laszip/laszip_api.h>

Expand Down
8 changes: 4 additions & 4 deletions docs/CMAKE_CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cmake -DCMAKE_BUILD_TYPE=Release \
### Python Bindings
```bash
# Enable Python bindings
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND=ON ..
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_PYBIND=ON ..
```

### Complete Configuration Examples
Expand All @@ -55,7 +55,7 @@ mkdir build-dev
cd build-dev
cmake -DCMAKE_BUILD_TYPE=Debug \
-DHD_CPU_OPTIMIZATION=AMD \
-DPYBIND=ON ..
-DBUILD_WITH_PYBIND=ON ..
cmake --build . --config Debug
```

Expand Down Expand Up @@ -90,7 +90,7 @@ make pack
| `BUILD_WITH_BUNDLED_FREEGLUT` | ON | ON, OFF | Use bundled FreeGLUT library |
| `BUILD_WITH_BUNDLED_EIGEN` | ON | ON, OFF | Use bundled Eigen library |
| `BUILD_WITH_BUNDLED_LIBLASZIP` | ON | ON, OFF | Use bundled LASzip library |
| `PYBIND` | OFF | ON, OFF | Enable Python bindings |
| `BUILD_WITH_PYBIND` | OFF | ON, OFF | Enable Python bindings |

## Troubleshooting

Expand All @@ -107,7 +107,7 @@ cmake -DCMAKE_BUILD_TYPE=Release ..
cmake -LA .

# View only HDMapping variables
cmake -LA . | grep -E "(HD_|BUILD_WITH_|PYBIND)"
cmake -LA . | grep -E "(HD_|BUILD_WITH_|BUILD_WITH_PYBIND)"
```

### Build Errors
Expand Down
11 changes: 11 additions & 0 deletions external/WGS84toCartesian/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 4.0.0)

project(WGS84toCartesian)

set(WGS84TOCARTESIAN_INCLUDE_DIRECTORIES ${EXTERNAL_LIBRARIES_DIRECTORY}/WGS84toCartesian/include)

add_library(WGS84toCartesian STATIC
src/WGS84toCartesian.cpp
${WGS84TOCARTESIAN_INCLUDE_DIRECTORIES}/WGS84toCartesian/WGS84toCartesian.hpp)

target_include_directories(WGS84toCartesian PUBLIC ${WGS84TOCARTESIAN_INCLUDE_DIRECTORIES})
1 change: 1 addition & 0 deletions external/WGS84toCartesian/src/WGS84toCartesian.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <WGS84toCartesian/WGS84toCartesian.hpp>
Loading
Loading