Skip to content

Commit

Permalink
Due to the Ceres dependency, make trajectory estimation a plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chambbj committed Oct 29, 2020
1 parent 06c56c9 commit a1c0bd8
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 8 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ include(${PDAL_CMAKE_DIR}/dimension.cmake)
include(${PDAL_CMAKE_DIR}/arbiter.cmake)
include(${PDAL_CMAKE_DIR}/nlohmann.cmake)
include(${PDAL_CMAKE_DIR}/openssl.cmake) # Optional
include(${PDAL_CMAKE_DIR}/ceres.cmake) # Optional

#------------------------------------------------------------------------------
# generate the pdal_features.hpp header
Expand Down Expand Up @@ -275,7 +274,6 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
${NLOHMANN_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${LASZIP_INCLUDE_DIR}
${CERES_INCLUDE_DIRS}
)
target_link_libraries(${PDAL_BASE_LIB_NAME}
PRIVATE
Expand All @@ -292,7 +290,6 @@ target_link_libraries(${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${PDAL_ARBITER_LIB_NAME}
${PDAL_KAZHDAN_LIB_NAME}
${CERES_LIBRARIES}
INTERFACE
${PDAL_LIBDIR}
)
Expand Down
5 changes: 5 additions & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ option(BUILD_PLUGIN_TILEDB
add_feature_info("TileDB plugin" BUILD_PLUGIN_TILEDB
"read/write data from TileDB")

option(BUILD_PLUGIN_TRAJECTORY
"Choose if trajectory estimation support should be built" FALSE)
add_feature_info("Trajectory plugin" BUILD_PLUGIN_TRAJECTORY
"estimate trajectories")

option(BUILD_PLUGIN_E57
"Choose if e57 ui support should be built" FALSE)
add_feature_info("E57 plugin" BUILD_PLUGIN_E57
Expand Down
4 changes: 4 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ if(BUILD_PLUGIN_TILEDB)
add_subdirectory(tiledb)
endif()

if(BUILD_PLUGIN_TRAJECTORY)
add_subdirectory(trajectory)
endif()

if(BUILD_PLUGIN_E57)
add_subdirectory(e57)
endif()
27 changes: 27 additions & 0 deletions plugins/trajectory/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Trajectory plugin CMake configuration
#
include(${PDAL_CMAKE_DIR}/ceres.cmake)
if (NOT CERES_FOUND)
message(FATAL_ERROR "Can't find Ceres support required to build.")
endif()

#
# ScanAngleTrajectory Filter
#
PDAL_ADD_PLUGIN(filter_libname filter scanangletrajectory
FILES
filters/ScanAngleTrajectoryFilter.cpp
)

#
# ReturnInfoTrajectory Filter
#
PDAL_ADD_PLUGIN(filter_libname filter returninfotrajectory
FILES
filters/ReturnInfoTrajectoryFilter.cpp
LINK_WITH
${CERES_LIBRARIES}
INCLUDES
${CERES_INCLUDE_DIRS}
)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include "ReturnInfoTrajectoryFilter.hpp"

#include "private/trajectory/PulseCollection.hpp"
#include "PulseCollection.hpp"

#include <Eigen/Dense>

Expand All @@ -43,7 +43,7 @@ namespace pdal
using namespace Dimension;
using namespace Eigen;

static StaticPluginInfo const s_info{
static PluginInfo const s_info{
"filters.returninfotrajectory", "Return Info Trajectory estimation",
"htts://pdal.io/stages/filters.returninfotrajectory.html"};

Expand All @@ -62,7 +62,7 @@ struct PrivateArgs
double m_tout;
};

CREATE_STATIC_STAGE(ReturnInfoTrajectory, s_info)
CREATE_SHARED_STAGE(ReturnInfoTrajectory, s_info)

ReturnInfoTrajectory::ReturnInfoTrajectory() : Filter(), m_args(new PrivateArgs)
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ namespace pdal

using namespace Dimension;

static StaticPluginInfo const s_info{
static PluginInfo const s_info{
"filters.scanangletrajectory", "Scan-angle trajectory estimation filter",
"http://pdal.io/stages/filters.scanangletrajectory.html"};

CREATE_STATIC_STAGE(ScanAngleTrajectoryFilter, s_info)
CREATE_SHARED_STAGE(ScanAngleTrajectoryFilter, s_info)

ScanAngleTrajectoryFilter::ScanAngleTrajectoryFilter() {}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a1c0bd8

Please sign in to comment.