gtsam_unstable now builds and tests pass
parent
b0d71aa58c
commit
9ce892ce65
|
@ -41,6 +41,7 @@ endif()
|
|||
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
||||
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON)
|
||||
option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" ON)
|
||||
option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON)
|
||||
option(GTSAM_BUILD_WRAP "Enable/Disable building of matlab wrap utility (necessary for matlab interface)" ON)
|
||||
option(GTSAM_BUILD_SHARED_LIBRARY "Enable/Disable building of a shared version of gtsam" ON)
|
||||
option(GTSAM_BUILD_STATIC_LIBRARY "Enable/Disable building of a static version of gtsam" ON)
|
||||
|
@ -113,6 +114,11 @@ if (GTSAM_BUILD_EXAMPLES)
|
|||
add_subdirectory(examples)
|
||||
endif(GTSAM_BUILD_EXAMPLES)
|
||||
|
||||
# Build gtsam_unstable
|
||||
if (GTSAM_BUILD_UNSTABLE)
|
||||
add_subdirectory(gtsam_unstable)
|
||||
endif(GTSAM_BUILD_UNSTABLE)
|
||||
|
||||
# Set up CPack
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM")
|
||||
set(CPACK_PACKAGE_VENDOR "Frank Dellaert, Georgia Institute of Technology")
|
||||
|
@ -143,6 +149,7 @@ print_config_flag(${GTSAM_BUILD_WRAP} "Build Wrap
|
|||
print_config_flag(${GTSAM_BUILD_SHARED_LIBRARY} "Build shared GTSAM Library ")
|
||||
print_config_flag(${GTSAM_BUILD_STATIC_LIBRARY} "Build static GTSAM Library ")
|
||||
print_config_flag(${GTSAM_BUILD_CONVENIENCE_LIBRARIES} "Build Convenience Libraries ")
|
||||
print_config_flag(${GTSAM_BUILD_UNSTABLE} "Build libgtsam_unstable ")
|
||||
print_config_flag(${GTSAM_ENABLE_INSTALL_TEST_FIX} "Tests excluded from all target ")
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_toupper)
|
||||
message(STATUS " Build type : ${CMAKE_BUILD_TYPE}")
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
# Build full gtsam2 library as a single library
|
||||
# and also build tests
|
||||
set (gtsam2_subdirs
|
||||
base
|
||||
dynamics
|
||||
geometry
|
||||
slam
|
||||
)
|
||||
|
||||
# assemble core libaries
|
||||
foreach(subdir ${gtsam2_subdirs})
|
||||
# Build convenience libraries
|
||||
file(GLOB subdir_srcs "${subdir}/*.cpp")
|
||||
set(${subdir}_srcs ${subdir_srcs})
|
||||
if (GTSAM2_BUILD_CONVENIENCE_LIBRARIES)
|
||||
message(STATUS "Building Convenience Library: ${subdir}")
|
||||
add_library(${subdir} STATIC ${subdir_srcs})
|
||||
endif()
|
||||
|
||||
# Build local library and tests
|
||||
message(STATUS "Building ${subdir}")
|
||||
add_subdirectory(${subdir})
|
||||
endforeach(subdir)
|
||||
|
||||
# assemble gtsam2 components
|
||||
set(gtsam2_srcs
|
||||
${base_srcs}
|
||||
${discrete_srcs}
|
||||
${dynamics_srcs}
|
||||
${geometry_srcs}
|
||||
${slam_srcs}
|
||||
)
|
||||
|
||||
option (GTSAM2_BUILD_SHARED_LIBRARY "Enable/Disable building of a shared version of gtsam2" ON)
|
||||
|
||||
# Versions
|
||||
set(gtsam2_version ${GTSAM2_VERSION_MAJOR}.${GTSAM2_VERSION_MINOR}.${GTSAM2_VERSION_PATCH})
|
||||
set(gtsam2_soversion ${GTSAM2_VERSION_MAJOR})
|
||||
message(STATUS "GTSAM2 Version: ${gtsam2_version}")
|
||||
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# build shared and static versions of the library
|
||||
message(STATUS "Building GTSAM2 - static")
|
||||
add_library(gtsam2-static STATIC ${gtsam2_srcs})
|
||||
set_target_properties(gtsam2-static PROPERTIES
|
||||
OUTPUT_NAME gtsam2
|
||||
CLEAN_DIRECT_OUTPUT 1
|
||||
VERSION ${gtsam2_version}
|
||||
SOVERSION ${gtsam2_soversion})
|
||||
install(TARGETS gtsam2-static ARCHIVE DESTINATION lib)
|
||||
|
||||
if (GTSAM2_BUILD_SHARED_LIBRARY)
|
||||
message(STATUS "Building GTSAM2 - shared")
|
||||
add_library(gtsam2-shared SHARED ${gtsam2_srcs})
|
||||
set_target_properties(gtsam2-shared PROPERTIES
|
||||
OUTPUT_NAME gtsam2
|
||||
CLEAN_DIRECT_OUTPUT 1
|
||||
VERSION ${gtsam2_version}
|
||||
SOVERSION ${gtsam2_soversion})
|
||||
install(TARGETS gtsam2-shared LIBRARY DESTINATION lib )
|
||||
endif(GTSAM2_BUILD_SHARED_LIBRARY)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Install headers
|
||||
file(GLOB base_headers "*.h")
|
||||
install(FILES ${base_headers} DESTINATION include/gtsam2/base)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(base_local_libs
|
||||
base)
|
||||
|
||||
set (base_full_libs
|
||||
gtsam2-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (base_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(base "${base_local_libs}" "${base_full_libs}" "${base_excluded_tests}")
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Install headers
|
||||
file(GLOB dynamics_headers "*.h")
|
||||
install(FILES ${dynamics_headers} DESTINATION include/gtsam2/dynamics)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(dynamics_local_libs
|
||||
dynamics)
|
||||
|
||||
set (dynamics_full_libs
|
||||
gtsam2-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (dynamics_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(dynamics "${dynamics_local_libs}" "${dynamics_full_libs}" "${dynamics_excluded_tests}")
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Install headers
|
||||
file(GLOB geometry_headers "*.h")
|
||||
install(FILES ${geometry_headers} DESTINATION include/gtsam2/geometry)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(geometry_local_libs
|
||||
geometry)
|
||||
|
||||
set (geometry_full_libs
|
||||
gtsam2-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (geometry_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(geometry "${geometry_local_libs}" "${geometry_full_libs}" "${geometry_excluded_tests}")
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Install headers
|
||||
file(GLOB slam_headers "*.h")
|
||||
install(FILES ${slam_headers} DESTINATION include/gtsam2/slam)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(slam_local_libs
|
||||
slam)
|
||||
|
||||
set (slam_full_libs
|
||||
gtsam2-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (slam_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(slam "${slam_local_libs}" "${slam_full_libs}" "${slam_excluded_tests}")
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
# Find wrap
|
||||
find_package(Wrap REQUIRED)
|
||||
|
||||
# Set up codegen
|
||||
include(GtsamMatlabWrap)
|
||||
|
||||
# Wrap codegen
|
||||
#usage: wrap mexExtension interfacePath moduleName toolboxPath
|
||||
# mexExtension : OS/CPU-dependent extension for MEX binaries
|
||||
# interfacePath : *absolute* path to directory of module interface file
|
||||
# moduleName : the name of the module, interface file must be called moduleName.h
|
||||
# toolboxPath : the directory in which to generate the wrappers
|
||||
# [mexFlags] : extra flags for the mex command
|
||||
|
||||
# TODO: generate these includes programmatically
|
||||
set(mexFlags "-I${Boost_INCLUDE_DIR} -I${Wrap_INCLUDE_DIR} -I${CMAKE_INSTALL_PREFIX}/include/gtsam2 -I${CMAKE_INSTALL_PREFIX}/include/gtsam2/dynamics -I${CMAKE_INSTALL_PREFIX}/include/gtsam2/discrete -L${CMAKE_INSTALL_PREFIX}/lib -lgtsam -lgtsam2")
|
||||
set(toolbox_path ${CMAKE_BINARY_DIR}/wrap/gtsam2)
|
||||
set(moduleName gtsam2)
|
||||
|
||||
find_mexextension()
|
||||
|
||||
# Code generation command
|
||||
add_custom_target(wrap_gtsam2 ALL COMMAND
|
||||
${Wrap_CMD} ${GTSAM_MEX_BIN_EXTENSION} ${CMAKE_CURRENT_SOURCE_DIR}/../ ${moduleName} ${toolbox_path} "${mexFlags}")
|
||||
|
||||
option(GTSAM2_INSTALL_MATLAB_TOOLBOX "Enable/Disable installation of matlab toolbox" ON)
|
||||
option(GTSAM2_INSTALL_MATLAB_EXAMPLES "Enable/Disable installation of matlab examples" ON)
|
||||
option(GTSAM2_INSTALL_MATLAB_TESTS "Enable/Disable installation of matlab tests" ON)
|
||||
|
||||
set(GTSAM2_TOOLBOX_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/borg/toolbox CACHE DOCSTRING "Path to install matlab toolbox")
|
||||
|
||||
if (GTSAM2_INSTALL_MATLAB_TOOLBOX)
|
||||
# Primary toolbox files
|
||||
message(STATUS "Installing Matlab Toolbox to ${GTSAM2_TOOLBOX_INSTALL_PATH}")
|
||||
install(DIRECTORY DESTINATION ${GTSAM2_TOOLBOX_INSTALL_PATH}) # make an empty folder
|
||||
# exploit need for trailing slash to specify a full folder, rather than just its contents to copy
|
||||
install(DIRECTORY ${toolbox_path} DESTINATION ${GTSAM2_TOOLBOX_INSTALL_PATH})
|
||||
|
||||
# Examples
|
||||
if (GTSAM2_INSTALL_MATLAB_EXAMPLES)
|
||||
message(STATUS "Installing Matlab Toolbox Examples")
|
||||
file(GLOB matlab_examples "${CMAKE_SOURCE_DIR}/examples/matlab/*.m")
|
||||
install(FILES ${matlab_examples} DESTINATION ${GTSAM2_TOOLBOX_INSTALL_PATH}/gtsam2/examples)
|
||||
endif (GTSAM2_INSTALL_MATLAB_EXAMPLES)
|
||||
|
||||
# Tests
|
||||
if (GTSAM2_INSTALL_MATLAB_TESTS)
|
||||
message(STATUS "Installing Matlab Toolbox Tests")
|
||||
file(GLOB matlab_tests "${CMAKE_SOURCE_DIR}/tests/matlab/*.m")
|
||||
install(FILES ${matlab_tests} DESTINATION ${GTSAM2_TOOLBOX_INSTALL_PATH}/gtsam2/tests)
|
||||
endif (GTSAM2_INSTALL_MATLAB_TESTS)
|
||||
endif (GTSAM2_INSTALL_MATLAB_TOOLBOX)
|
|
@ -0,0 +1,62 @@
|
|||
# Build full gtsam_unstable library as a single library
|
||||
# and also build tests
|
||||
set (gtsam_unstable_subdirs
|
||||
base
|
||||
dynamics
|
||||
geometry
|
||||
slam
|
||||
)
|
||||
|
||||
# assemble core libaries
|
||||
foreach(subdir ${gtsam_unstable_subdirs})
|
||||
# Build convenience libraries
|
||||
file(GLOB subdir_srcs "${subdir}/*.cpp")
|
||||
set(${subdir}_srcs ${subdir_srcs})
|
||||
if (GTSAM_BUILD_CONVENIENCE_LIBRARIES)
|
||||
message(STATUS "Building Convenience Library: ${subdir}_unstable")
|
||||
add_library("${subdir}_unstable" STATIC ${subdir_srcs})
|
||||
endif()
|
||||
|
||||
# Build local library and tests
|
||||
message(STATUS "Building ${subdir}_unstable")
|
||||
add_subdirectory(${subdir})
|
||||
endforeach(subdir)
|
||||
|
||||
# assemble gtsam_unstable components
|
||||
set(gtsam_unstable_srcs
|
||||
${base_srcs}
|
||||
${discrete_srcs}
|
||||
${dynamics_srcs}
|
||||
${geometry_srcs}
|
||||
${slam_srcs}
|
||||
)
|
||||
|
||||
option (GTSAM_UNSTABLE_BUILD_SHARED_LIBRARY "Enable/Disable building of a shared version of gtsam_unstable" ON)
|
||||
|
||||
# Versions - same as core gtsam library
|
||||
set(gtsam_unstable_version ${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH})
|
||||
set(gtsam_unstable_soversion ${GTSAM_VERSION_MAJOR})
|
||||
message(STATUS "GTSAM_UNSTABLE Version: ${gtsam_unstable_version}")
|
||||
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# build shared and static versions of the library
|
||||
message(STATUS "Building GTSAM_UNSTABLE - static")
|
||||
add_library(gtsam_unstable-static STATIC ${gtsam_unstable_srcs})
|
||||
set_target_properties(gtsam_unstable-static PROPERTIES
|
||||
OUTPUT_NAME gtsam_unstable
|
||||
CLEAN_DIRECT_OUTPUT 1
|
||||
VERSION ${gtsam_unstable_version}
|
||||
SOVERSION ${gtsam_unstable_soversion})
|
||||
install(TARGETS gtsam_unstable-static ARCHIVE DESTINATION lib)
|
||||
|
||||
if (GTSAM_UNSTABLE_BUILD_SHARED_LIBRARY)
|
||||
message(STATUS "Building GTSAM_UNSTABLE - shared")
|
||||
add_library(gtsam_unstable-shared SHARED ${gtsam_unstable_srcs})
|
||||
set_target_properties(gtsam_unstable-shared PROPERTIES
|
||||
OUTPUT_NAME gtsam_unstable
|
||||
CLEAN_DIRECT_OUTPUT 1
|
||||
VERSION ${gtsam_unstable_version}
|
||||
SOVERSION ${gtsam_unstable_soversion})
|
||||
install(TARGETS gtsam_unstable-shared LIBRARY DESTINATION lib )
|
||||
endif(GTSAM_UNSTABLE_BUILD_SHARED_LIBRARY)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Install headers
|
||||
file(GLOB base_headers "*.h")
|
||||
install(FILES ${base_headers} DESTINATION include/gtsam_unstable/base)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(base_local_libs
|
||||
base
|
||||
base_unstable)
|
||||
|
||||
set (base_full_libs
|
||||
gtsam-static
|
||||
gtsam_unstable-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (base_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(base_unstable "${base_local_libs}" "${base_full_libs}" "${base_excluded_tests}")
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include <set>
|
||||
#include <map>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <gtsam2/base/BTree.h>
|
||||
#include <gtsam_unstable/base/BTree.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <gtsam2/base/DSFVector.h>
|
||||
#include <gtsam_unstable/base/DSFVector.h>
|
||||
|
||||
using namespace std;
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
using namespace boost::assign;
|
||||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
#include <gtsam2/base/BTree.h>
|
||||
#include <gtsam_unstable/base/BTree.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
|
@ -22,7 +22,7 @@
|
|||
using namespace boost::assign;
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/base/DSF.h>
|
||||
#include <gtsam_unstable/base/DSF.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
|
@ -24,7 +24,7 @@
|
|||
using namespace boost::assign;
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/base/DSFVector.h>
|
||||
#include <gtsam_unstable/base/DSFVector.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/base/FixedVector.h>
|
||||
#include <gtsam_unstable/base/FixedVector.h>
|
||||
|
||||
using namespace gtsam;
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Install headers
|
||||
file(GLOB dynamics_headers "*.h")
|
||||
install(FILES ${dynamics_headers} DESTINATION include/gtsam_unstable/dynamics)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(dynamics_local_libs
|
||||
dynamics_unstable
|
||||
slam
|
||||
nonlinear
|
||||
linear
|
||||
inference
|
||||
geometry
|
||||
base
|
||||
ccolamd
|
||||
)
|
||||
|
||||
set (dynamics_full_libs
|
||||
gtsam-static
|
||||
gtsam_unstable-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (dynamics_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(dynamics_unstable "${dynamics_local_libs}" "${dynamics_full_libs}" "${dynamics_excluded_tests}")
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <gtsam/slam/PartialPriorFactor.h>
|
||||
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#include <gtsam/base/numericalDerivative.h>
|
||||
#include <gtsam/base/LieVector.h>
|
||||
#include <gtsam/nonlinear/NonlinearFactor.h>
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#include <gtsam/base/numericalDerivative.h>
|
||||
#include <gtsam/base/LieVector.h>
|
||||
#include <gtsam/nonlinear/NonlinearFactor.h>
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
#include <gtsam/base/Lie-inl.h>
|
||||
#include <gtsam/geometry/Pose2.h>
|
||||
|
||||
#include <gtsam2/dynamics/inertialUtils.h>
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/inertialUtils.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <gtsam/base/numericalDerivative.h>
|
||||
#include <gtsam/nonlinear/NonlinearFactor.h>
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* @author Alex Cunningham
|
||||
*/
|
||||
|
||||
#include <gtsam2/dynamics/imuSystem.h>
|
||||
#include <gtsam_unstable/dynamics/imuSystem.h>
|
||||
|
||||
#include <gtsam/nonlinear/NonlinearOptimization.h>
|
||||
|
|
@ -18,11 +18,11 @@
|
|||
#include <gtsam/nonlinear/NonlinearEquality.h>
|
||||
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
|
||||
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam2/dynamics/IMUFactor.h>
|
||||
#include <gtsam2/dynamics/FullIMUFactor.h>
|
||||
#include <gtsam2/dynamics/VelocityConstraint.h>
|
||||
#include <gtsam2/dynamics/DynamicsPriors.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/IMUFactor.h>
|
||||
#include <gtsam_unstable/dynamics/FullIMUFactor.h>
|
||||
#include <gtsam_unstable/dynamics/VelocityConstraint.h>
|
||||
#include <gtsam_unstable/dynamics/DynamicsPriors.h>
|
||||
|
||||
/**
|
||||
* This domain focuses on a single class of variables: PoseRTV, which
|
|
@ -7,7 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtsam/base/Vector.h>
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
|
||||
namespace gtsam {
|
||||
namespace examples {
|
|
@ -5,7 +5,7 @@
|
|||
* @author Alex Cunningham
|
||||
*/
|
||||
|
||||
#include <gtsam2/dynamics/inertialUtils.h>
|
||||
#include <gtsam_unstable/dynamics/inertialUtils.h>
|
||||
|
||||
namespace gtsam {
|
||||
namespace dynamics {
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/dynamics/imuSystem.h>
|
||||
#include <gtsam2/dynamics/imu_examples.h>
|
||||
#include <gtsam_unstable/dynamics/imuSystem.h>
|
||||
#include <gtsam_unstable/dynamics/imu_examples.h>
|
||||
|
||||
using namespace gtsam;
|
||||
using namespace imu;
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/dynamics/inertialUtils.h>
|
||||
#include <gtsam_unstable/dynamics/inertialUtils.h>
|
||||
|
||||
using namespace gtsam;
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
#include <gtsam/base/TestableAssertions.h>
|
||||
#include <gtsam/base/numericalDerivative.h>
|
||||
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam2/dynamics/imu_examples.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/imu_examples.h>
|
||||
|
||||
using namespace gtsam;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
#include <gtsam2/dynamics/imuSystem.h>
|
||||
#include <gtsam_unstable/dynamics/imuSystem.h>
|
||||
|
||||
using namespace gtsam;
|
||||
using namespace imu;
|
|
@ -0,0 +1,20 @@
|
|||
# Install headers
|
||||
file(GLOB geometry_headers "*.h")
|
||||
install(FILES ${geometry_headers} DESTINATION include/gtsam_unstable/geometry)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(geometry_local_libs
|
||||
base
|
||||
geometry
|
||||
geometry_unstable)
|
||||
|
||||
set (geometry_full_libs
|
||||
gtsam-static
|
||||
gtsam_unstable-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (geometry_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(geometry_unstable "${geometry_local_libs}" "${geometry_full_libs}" "${geometry_excluded_tests}")
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace tensors {
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
#include <boost/foreach.hpp>
|
||||
#include <gtsam/base/Matrix.h>
|
||||
|
||||
#include <gtsam2/geometry/tensorInterface.h>
|
||||
#include <gtsam2/geometry/projectiveGeometry.h>
|
||||
#include <gtsam_unstable/geometry/tensorInterface.h>
|
||||
#include <gtsam_unstable/geometry/projectiveGeometry.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
#include <gtsam/base/Matrix.h>
|
||||
|
||||
namespace gtsam {
|
|
@ -29,17 +29,17 @@ namespace tensors {
|
|||
} // namespace tensors
|
||||
|
||||
// Expression templates
|
||||
#include <gtsam2/geometry/Tensor1Expression.h>
|
||||
#include <gtsam2/geometry/Tensor2Expression.h>
|
||||
#include <gtsam2/geometry/Tensor3Expression.h>
|
||||
#include <gtsam_unstable/geometry/Tensor1Expression.h>
|
||||
#include <gtsam_unstable/geometry/Tensor2Expression.h>
|
||||
#include <gtsam_unstable/geometry/Tensor3Expression.h>
|
||||
// Tensor4 not needed so far
|
||||
#include <gtsam2/geometry/Tensor5Expression.h>
|
||||
#include <gtsam_unstable/geometry/Tensor5Expression.h>
|
||||
|
||||
// Actual tensor classes
|
||||
#include <gtsam2/geometry/Tensor1.h>
|
||||
#include <gtsam2/geometry/Tensor2.h>
|
||||
#include <gtsam2/geometry/Tensor3.h>
|
||||
#include <gtsam2/geometry/Tensor4.h>
|
||||
#include <gtsam2/geometry/Tensor5.h>
|
||||
#include <gtsam_unstable/geometry/Tensor1.h>
|
||||
#include <gtsam_unstable/geometry/Tensor2.h>
|
||||
#include <gtsam_unstable/geometry/Tensor3.h>
|
||||
#include <gtsam_unstable/geometry/Tensor4.h>
|
||||
#include <gtsam_unstable/geometry/Tensor5.h>
|
||||
|
||||
|
|
@ -23,9 +23,9 @@ using namespace boost::assign;
|
|||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam2/geometry/tensorInterface.h>
|
||||
#include <gtsam2/geometry/projectiveGeometry.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensorInterface.h>
|
||||
#include <gtsam_unstable/geometry/projectiveGeometry.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
|
@ -24,9 +24,9 @@ using namespace boost::assign;
|
|||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam/base/Testable.h>
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam2/geometry/tensorInterface.h>
|
||||
#include <gtsam2/geometry/projectiveGeometry.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensorInterface.h>
|
||||
#include <gtsam_unstable/geometry/projectiveGeometry.h>
|
||||
#include <gtsam/geometry/Pose3.h>
|
||||
|
||||
using namespace std;
|
|
@ -23,9 +23,9 @@ using namespace boost::assign;
|
|||
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
|
||||
#include <gtsam2/geometry/tensors.h>
|
||||
#include <gtsam2/geometry/tensorInterface.h>
|
||||
#include <gtsam2/geometry/projectiveGeometry.h>
|
||||
#include <gtsam_unstable/geometry/tensors.h>
|
||||
#include <gtsam_unstable/geometry/tensorInterface.h>
|
||||
#include <gtsam_unstable/geometry/projectiveGeometry.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
|
@ -4,16 +4,16 @@ namespace gtsam {
|
|||
|
||||
/**
|
||||
|
||||
\mainpage GTSAM2
|
||||
\mainpage GTSAM_UNSTABLE
|
||||
|
||||
\section gtsam2_overview GTSAM2 Overview
|
||||
\section gtsam_unstable_overview GTSAM_UNSTABLE Overview
|
||||
|
||||
GTSAM2 is a set of experimental additions to GTSAM that are not fully ready to be
|
||||
GTSAM_UNSTABLE is a set of experimental additions to GTSAM that are not fully ready to be
|
||||
integrated into the rest of the library. This library is actively maintained,
|
||||
and should follow the same design procedures as GTSAM.
|
||||
|
||||
Because parts of this library are supposed to be a part of GTSAM, all code should
|
||||
be in the gtsam namespace, rather than a gtsam2 namespace.
|
||||
be in the gtsam namespace, rather than a gtsam_unstable namespace.
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Install headers
|
||||
file(GLOB slam_headers "*.h")
|
||||
install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
set(slam_local_libs
|
||||
slam_unstable
|
||||
slam
|
||||
nonlinear
|
||||
linear
|
||||
inference
|
||||
geometry
|
||||
base
|
||||
ccolamd
|
||||
)
|
||||
|
||||
set (slam_full_libs
|
||||
gtsam-static
|
||||
gtsam_unstable-static)
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (slam_excluded_tests "")
|
||||
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(slam_unstable "${slam_local_libs}" "${slam_full_libs}" "${slam_excluded_tests}")
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* @author Alex Cunningham
|
||||
**/
|
||||
|
||||
#include <gtsam2/slam/simulated3D.h>
|
||||
#include <gtsam_unstable/slam/simulated3D.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
#include <gtsam/base/Testable.h>
|
||||
#include <gtsam/base/numericalDerivative.h>
|
||||
#include <gtsam/geometry/Pose3.h>
|
||||
#include <gtsam2/slam/simulated3D.h>
|
||||
#include <gtsam_unstable/slam/simulated3D.h>
|
||||
|
||||
using namespace gtsam;
|
||||
using namespace simulated3D;
|
|
@ -0,0 +1,52 @@
|
|||
# Find wrap
|
||||
find_package(Wrap REQUIRED)
|
||||
|
||||
# Set up codegen
|
||||
include(GtsamMatlabWrap)
|
||||
|
||||
# Wrap codegen
|
||||
#usage: wrap mexExtension interfacePath moduleName toolboxPath
|
||||
# mexExtension : OS/CPU-dependent extension for MEX binaries
|
||||
# interfacePath : *absolute* path to directory of module interface file
|
||||
# moduleName : the name of the module, interface file must be called moduleName.h
|
||||
# toolboxPath : the directory in which to generate the wrappers
|
||||
# [mexFlags] : extra flags for the mex command
|
||||
|
||||
# TODO: generate these includes programmatically
|
||||
set(mexFlags "-I${Boost_INCLUDE_DIR} -I${Wrap_INCLUDE_DIR} -I${CMAKE_INSTALL_PREFIX}/include/gtsam_unstable -I${CMAKE_INSTALL_PREFIX}/include/gtsam_unstable/dynamics -I${CMAKE_INSTALL_PREFIX}/include/gtsam_unstable/discrete -L${CMAKE_INSTALL_PREFIX}/lib -lgtsam -lgtsam_unstable")
|
||||
set(toolbox_path ${CMAKE_BINARY_DIR}/wrap/gtsam_unstable)
|
||||
set(moduleName gtsam_unstable)
|
||||
|
||||
find_mexextension()
|
||||
|
||||
# Code generation command
|
||||
add_custom_target(wrap_gtsam_unstable ALL COMMAND
|
||||
${Wrap_CMD} ${GTSAM_MEX_BIN_EXTENSION} ${CMAKE_CURRENT_SOURCE_DIR}/../ ${moduleName} ${toolbox_path} "${mexFlags}")
|
||||
|
||||
option(gtsam_unstable_INSTALL_MATLAB_TOOLBOX "Enable/Disable installation of matlab toolbox" ON)
|
||||
option(gtsam_unstable_INSTALL_MATLAB_EXAMPLES "Enable/Disable installation of matlab examples" ON)
|
||||
option(gtsam_unstable_INSTALL_MATLAB_TESTS "Enable/Disable installation of matlab tests" ON)
|
||||
|
||||
set(gtsam_unstable_TOOLBOX_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/borg/toolbox CACHE DOCSTRING "Path to install matlab toolbox")
|
||||
|
||||
if (gtsam_unstable_INSTALL_MATLAB_TOOLBOX)
|
||||
# Primary toolbox files
|
||||
message(STATUS "Installing Matlab Toolbox to ${gtsam_unstable_TOOLBOX_INSTALL_PATH}")
|
||||
install(DIRECTORY DESTINATION ${gtsam_unstable_TOOLBOX_INSTALL_PATH}) # make an empty folder
|
||||
# exploit need for trailing slash to specify a full folder, rather than just its contents to copy
|
||||
install(DIRECTORY ${toolbox_path} DESTINATION ${gtsam_unstable_TOOLBOX_INSTALL_PATH})
|
||||
|
||||
# Examples
|
||||
if (gtsam_unstable_INSTALL_MATLAB_EXAMPLES)
|
||||
message(STATUS "Installing Matlab Toolbox Examples")
|
||||
file(GLOB matlab_examples "${CMAKE_SOURCE_DIR}/examples/matlab/*.m")
|
||||
install(FILES ${matlab_examples} DESTINATION ${gtsam_unstable_TOOLBOX_INSTALL_PATH}/gtsam_unstable/examples)
|
||||
endif (gtsam_unstable_INSTALL_MATLAB_EXAMPLES)
|
||||
|
||||
# Tests
|
||||
if (gtsam_unstable_INSTALL_MATLAB_TESTS)
|
||||
message(STATUS "Installing Matlab Toolbox Tests")
|
||||
file(GLOB matlab_tests "${CMAKE_SOURCE_DIR}/tests/matlab/*.m")
|
||||
install(FILES ${matlab_tests} DESTINATION ${gtsam_unstable_TOOLBOX_INSTALL_PATH}/gtsam_unstable/tests)
|
||||
endif (gtsam_unstable_INSTALL_MATLAB_TESTS)
|
||||
endif (gtsam_unstable_INSTALL_MATLAB_TOOLBOX)
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Matlab toolbox interface definition for GTSAM2
|
||||
* Matlab toolbox interface definition for gtsam_unstable
|
||||
*/
|
||||
|
||||
// Most things are in the gtsam namespace
|
||||
|
@ -11,7 +11,7 @@ class gtsam::Rot3;
|
|||
class gtsam::Pose3;
|
||||
class gtsam::SharedNoiseModel;
|
||||
|
||||
#include <gtsam2/dynamics/PoseRTV.h>
|
||||
#include <gtsam_unstable/dynamics/PoseRTV.h>
|
||||
class PoseRTV {
|
||||
PoseRTV();
|
||||
PoseRTV(Vector rtv);
|
||||
|
@ -60,7 +60,7 @@ class PoseRTV {
|
|||
Vector translationIntegrationVec(const PoseRTV& x2, double dt) const;
|
||||
};
|
||||
|
||||
#include <gtsam2/dynamics/imuSystem.h>
|
||||
#include <gtsam_unstable/dynamics/imuSystem.h>
|
||||
namespace imu {
|
||||
|
||||
class Values {
|
Loading…
Reference in New Issue