Cleanup: moving old serialization function to gtsam_unstable, renaming matlab serializaion test
parent
45b5389f8a
commit
456d1b5cf7
45
gtsam.h
45
gtsam.h
|
@ -2229,51 +2229,6 @@ pair<gtsam::NonlinearFactorGraph*, gtsam::Values*> load2D(string filename,
|
|||
pair<gtsam::NonlinearFactorGraph*, gtsam::Values*> load2D_robust(string filename,
|
||||
gtsam::noiseModel::Base* model);
|
||||
|
||||
//*************************************************************************
|
||||
// Serialization
|
||||
//*************************************************************************
|
||||
//#include <gtsam/slam/serialization.h>
|
||||
//
|
||||
//// Serialize/Deserialize a NonlinearFactorGraph
|
||||
//string serializeGraph(const gtsam::NonlinearFactorGraph& graph);
|
||||
//
|
||||
//gtsam::NonlinearFactorGraph* deserializeGraph(string serialized_graph);
|
||||
//
|
||||
//string serializeGraphXML(const gtsam::NonlinearFactorGraph& graph);
|
||||
//string serializeGraphXML(const gtsam::NonlinearFactorGraph& graph, string name);
|
||||
//
|
||||
//gtsam::NonlinearFactorGraph* deserializeGraphXML(string serialized_graph);
|
||||
//gtsam::NonlinearFactorGraph* deserializeGraphXML(string serialized_graph, string name);
|
||||
//
|
||||
//// Serialize/Deserialize a Values
|
||||
//string serializeValues(const gtsam::Values& values);
|
||||
//
|
||||
//gtsam::Values* deserializeValues(string serialized_values);
|
||||
//
|
||||
//string serializeValuesXML(const gtsam::Values& values);
|
||||
//string serializeValuesXML(const gtsam::Values& values, string name);
|
||||
//
|
||||
//gtsam::Values* deserializeValuesXML(string serialized_values);
|
||||
//gtsam::Values* deserializeValuesXML(string serialized_values, string name);
|
||||
//
|
||||
//// Serialize
|
||||
//bool serializeGraphToFile(const gtsam::NonlinearFactorGraph& graph, string fname);
|
||||
//bool serializeGraphToXMLFile(const gtsam::NonlinearFactorGraph& graph, string fname);
|
||||
//bool serializeGraphToXMLFile(const gtsam::NonlinearFactorGraph& graph, string fname, string name);
|
||||
//
|
||||
//bool serializeValuesToFile(const gtsam::Values& values, string fname);
|
||||
//bool serializeValuesToXMLFile(const gtsam::Values& values, string fname);
|
||||
//bool serializeValuesToXMLFile(const gtsam::Values& values, string fname, string name);
|
||||
//
|
||||
//// Deserialize
|
||||
//gtsam::NonlinearFactorGraph* deserializeGraphFromFile(string fname);
|
||||
//gtsam::NonlinearFactorGraph* deserializeGraphFromXMLFile(string fname);
|
||||
//gtsam::NonlinearFactorGraph* deserializeGraphFromXMLFile(string fname, string name);
|
||||
//
|
||||
//gtsam::Values* deserializeValuesFromFile(string fname);
|
||||
//gtsam::Values* deserializeValuesFromXMLFile(string fname);
|
||||
//gtsam::Values* deserializeValuesFromXMLFile(string fname, string name);
|
||||
|
||||
//*************************************************************************
|
||||
// Utilities
|
||||
//*************************************************************************
|
||||
|
|
|
@ -34,15 +34,10 @@ endif()
|
|||
# Sources to remove from builds
|
||||
set (excluded_sources #"")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.cpp"
|
||||
# "${CMAKE_CURRENT_SOURCE_DIR}/discrete/TypedDiscreteFactor.cpp"
|
||||
# "${CMAKE_CURRENT_SOURCE_DIR}/discrete/TypedDiscreteFactorGraph.cpp"
|
||||
# "${CMAKE_CURRENT_SOURCE_DIR}/discrete/parseUAI.cpp"
|
||||
# "${CMAKE_CURRENT_SOURCE_DIR}/discrete/PotentialTable.cpp")
|
||||
)
|
||||
|
||||
set (excluded_headers #"")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.h"
|
||||
# "${CMAKE_CURRENT_SOURCE_DIR}/discrete/TypedDiscreteFactor.h
|
||||
)
|
||||
|
||||
if(GTSAM_USE_QUATERNIONS)
|
||||
|
@ -60,10 +55,10 @@ foreach(subdir ${gtsam_subdirs})
|
|||
# Build convenience libraries
|
||||
file(GLOB subdir_cpp_srcs "${subdir}/*.cpp")
|
||||
file(GLOB subdir_headers "${subdir}/*.h")
|
||||
list(REMOVE_ITEM subdir_cpp_srcs ${excluded_sources})
|
||||
list(REMOVE_ITEM subdir_headers ${excluded_headers})
|
||||
set(subdir_srcs ${subdir_cpp_srcs} ${subdir_headers}) # Include header files so they show up in Visual Studio
|
||||
gtsam_assign_source_folders("${subdir_srcs}") # Create MSVC structure
|
||||
list(REMOVE_ITEM subdir_srcs ${excluded_sources})
|
||||
list(REMOVE_ITEM subdir_srcs ${excluded_headers})
|
||||
set(${subdir}_srcs ${subdir_srcs})
|
||||
if (GTSAM_BUILD_CONVENIENCE_LIBRARIES AND (subdir_cpp_srcs)) # Only build convenience library if sources exist
|
||||
message(STATUS "Building Convenience Library: ${subdir}")
|
||||
|
|
|
@ -14,11 +14,24 @@ set(GTSAM_UNSTABLE_BOOST_LIBRARIES ${GTSAM_BOOST_LIBRARIES} ${Boost_THREAD_LIBRA
|
|||
|
||||
add_custom_target(check.unstable COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
||||
|
||||
# To exclude a source from the library build (in any subfolder)
|
||||
# Add the full name to this list, as in the following example
|
||||
# Sources to remove from builds
|
||||
set (excluded_sources # "")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.cpp"
|
||||
)
|
||||
|
||||
set (excluded_headers # "")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.h"
|
||||
)
|
||||
|
||||
# assemble core libaries
|
||||
foreach(subdir ${gtsam_unstable_subdirs})
|
||||
# Build convenience libraries
|
||||
file(GLOB subdir_srcs "${subdir}/*.cpp")
|
||||
file(GLOB subdir_headers "${subdir}/*.h")
|
||||
list(REMOVE_ITEM subdir_srcs ${excluded_sources})
|
||||
list(REMOVE_ITEM subdir_headers ${excluded_headers})
|
||||
set(${subdir}_srcs ${subdir_srcs} ${subdir_headers})
|
||||
gtsam_assign_source_folders("${${subdir}_srcs}") # Create MSVC structure
|
||||
if (subdir_srcs AND GTSAM_BUILD_CONVENIENCE_LIBRARIES)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
# Install headers
|
||||
set (slam_excluded_headers #"")
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/serialization.h"
|
||||
)
|
||||
|
||||
file(GLOB slam_headers "*.h")
|
||||
list(REMOVE_ITEM slam_headers ${slam_excluded_headers})
|
||||
install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam)
|
||||
|
||||
# Components to link tests in this subfolder against
|
||||
|
@ -19,8 +24,10 @@ set (slam_full_libs
|
|||
${gtsam_unstable-default})
|
||||
|
||||
# Exclude tests that don't work
|
||||
set (slam_excluded_tests "")
|
||||
|
||||
set (slam_excluded_tests
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tests/testSerialization.cpp"
|
||||
# "" # Add to this list, with full path, to exclude
|
||||
)
|
||||
# Add all tests
|
||||
gtsam_add_subdir_tests(slam_unstable "${slam_local_libs}" "${slam_full_libs}" "${slam_excluded_tests}")
|
||||
add_dependencies(check.unstable check.slam_unstable)
|
||||
|
|
|
@ -30,8 +30,8 @@ testStereoVOExample
|
|||
display 'Starting: testVisualISAMExample'
|
||||
testVisualISAMExample
|
||||
|
||||
display 'Starting: testGraphValuesSerialization'
|
||||
testVisualISAMExample
|
||||
display 'Starting: testSerialization'
|
||||
testSerialization
|
||||
|
||||
% end of tests
|
||||
display 'Tests complete!'
|
||||
|
|
Loading…
Reference in New Issue