diff --git a/.gitignore b/.gitignore index 94d4918bdec0d0d02df589c529d938e6c87d72d4..ea3b11ae3f1e21c872d7f069c6d6b56ca83c2a54 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,4 @@ src/examples/map_apriltag_save.yaml \.vscode/ build_release/ .clangd -wolf.found +wolfcore.found diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e7ee166720a726fc6c9178acc4119e0c4286e9..b84a4aa218a28e25b767d517f055f0c901bf8e8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,8 @@ SET(CMAKE_MACOSX_RPATH 1) # The project name -PROJECT(wolf) +PROJECT(core) +set(PLUGIN_NAME "wolf${PROJECT_NAME}") #string(COMPARE EQUAL "${CMAKE_BINARY_DIR}" "" result) #IF(result) @@ -421,7 +422,7 @@ IF (Suitesparse_FOUND) ENDIF(Suitesparse_FOUND) # create the shared library -ADD_LIBRARY(${PROJECT_NAME} +ADD_LIBRARY(${PLUGIN_NAME} SHARED ${SRCS} ${SRCS_BASE} @@ -450,24 +451,24 @@ ADD_LIBRARY(${PROJECT_NAME} # ==================== if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") message(STATUS "Using C++ compiler clang") - target_compile_options(${PROJECT_NAME} PRIVATE -Winconsistent-missing-override) + target_compile_options(${PLUGIN_NAME} PRIVATE -Winconsistent-missing-override) # using Clang elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") message(STATUS "Using C++ compiler gnu") - target_compile_options(${PROJECT_NAME} PRIVATE -Wsuggest-override) + target_compile_options(${PLUGIN_NAME} PRIVATE -Wsuggest-override) # using GCC endif() #Link the created libraries #============================================================= -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} dl) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${YAMLCPP_LIBRARY}) +TARGET_LINK_LIBRARIES(${PLUGIN_NAME} ${CMAKE_THREAD_LIBS_INIT} dl) +TARGET_LINK_LIBRARIES(${PLUGIN_NAME} ${YAMLCPP_LIBRARY}) IF (Ceres_FOUND) - TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CERES_LIBRARIES}) + TARGET_LINK_LIBRARIES(${PLUGIN_NAME} ${CERES_LIBRARIES}) ENDIF(Ceres_FOUND) # IF (GLOG_FOUND) -# TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${GLOG_LIBRARY}) +# TARGET_LINK_LIBRARIES(${PLUGIN_NAME} ${GLOG_LIBRARY}) # ENDIF (GLOG_FOUND) #check if this is done correctly @@ -486,12 +487,12 @@ ENDIF(BUILD_DEMOS) #install library #============================================================= -INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets +INSTALL(TARGETS ${PLUGIN_NAME} EXPORT ${PLUGIN_NAME}Targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib/iri-algorithms ARCHIVE DESTINATION lib/iri-algorithms) -install(EXPORT ${PROJECT_NAME}Targets DESTINATION lib/cmake/${PROJECT_NAME}) +install(EXPORT ${PLUGIN_NAME}Targets DESTINATION lib/cmake/${PLUGIN_NAME}) #install headers INSTALL(FILES ${HDRS_CAPTURE} DESTINATION include/iri-algorithms/wolf/plugin_core/core/capture) @@ -536,13 +537,13 @@ INSTALL(FILES ${HDRS_WRAPPER} INSTALL(FILES ${HDRS_YAML} DESTINATION include/iri-algorithms/wolf/plugin_core/core/yaml) -FILE(WRITE ${PROJECT_NAME}.found "") -INSTALL(FILES ${PROJECT_NAME}.found +FILE(WRITE ${PLUGIN_NAME}.found "") +INSTALL(FILES ${PLUGIN_NAME}.found DESTINATION include/iri-algorithms/wolf/plugin_core) #install Find*.cmake -configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/wolfConfig.cmake" - "${CMAKE_BINARY_DIR}/wolfConfig.cmake" @ONLY) +configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/${PLUGIN_NAME}Config.cmake" + "${CMAKE_BINARY_DIR}/${PLUGIN_NAME}Config.cmake" @ONLY) configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/FindYamlCpp.cmake" "${CMAKE_BINARY_DIR}/FindYamlCpp.cmake" @ONLY) @@ -550,12 +551,12 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/FindYamlCpp.cmake" INSTALL(FILES "${WOLF_CONFIG_DIR}/config.h" DESTINATION include/iri-algorithms/wolf/plugin_core/core/internal) -INSTALL(FILES "${CMAKE_BINARY_DIR}/wolfConfig.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}") -INSTALL(FILES "${CMAKE_BINARY_DIR}/FindYamlCpp.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}") +INSTALL(FILES "${CMAKE_BINARY_DIR}/${PLUGIN_NAME}Config.cmake" DESTINATION "lib/cmake/${PLUGIN_NAME}") +INSTALL(FILES "${CMAKE_BINARY_DIR}/FindYamlCpp.cmake" DESTINATION "lib/cmake/${PLUGIN_NAME}") INSTALL(DIRECTORY ${SPDLOG_INCLUDE_DIRS} DESTINATION "include/iri-algorithms/") -export(PACKAGE ${PROJECT_NAME}) +export(PACKAGE ${PLUGIN_NAME}) #-END_SRC -------------------------------------------------------------------------------------------------------------------------------- FIND_PACKAGE(Doxygen) @@ -601,8 +602,8 @@ ELSE(UNIX) ENDIF(UNIX) IF (UNIX) - SET(CPACK_PACKAGE_FILE_NAME "iri-${PROJECT_NAME}-dev-${CPACK_PACKAGE_VERSION}${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") - SET(CPACK_PACKAGE_NAME "iri-${PROJECT_NAME}-dev") + SET(CPACK_PACKAGE_FILE_NAME "iri-${PLUGIN_NAME}-dev-${CPACK_PACKAGE_VERSION}${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") + SET(CPACK_PACKAGE_NAME "iri-${PLUGIN_NAME}-dev") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "...Enter something here...") SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) SET(CPACK_GENERATOR "DEB") diff --git a/cmake_modules/wolfConfig.cmake b/cmake_modules/wolfConfig.cmake deleted file mode 100644 index 74ede89df7d20ffdfe00d7cd669bce317fc501a9..0000000000000000000000000000000000000000 --- a/cmake_modules/wolfConfig.cmake +++ /dev/null @@ -1,99 +0,0 @@ -#edit the following line to add the librarie's header files -FIND_PATH( - wolf_INCLUDE_DIRS - NAMES wolf.found - PATHS /usr/local/include/iri-algorithms/wolf/plugin_core) -IF(wolf_INCLUDE_DIRS) - MESSAGE("Found wolf include dirs: ${wolf_INCLUDE_DIRS}") -ELSE(wolf_INCLUDE_DIRS) - MESSAGE("Couldn't find wolf include dirs") -ENDIF(wolf_INCLUDE_DIRS) - -FIND_LIBRARY( - wolf_LIBRARIES - NAMES libwolf.so libwolf.dylib - PATHS /usr/local/lib/iri-algorithms) -IF(wolf_LIBRARIES) - MESSAGE("Found wolf lib: ${wolf_LIBRARIES}") -ELSE(wolf_LIBRARIES) - MESSAGE("Couldn't find wolf lib") -ENDIF(wolf_LIBRARIES) - -IF (wolf_INCLUDE_DIRS AND wolf_LIBRARIES) - SET(wolf_FOUND TRUE) - ELSE(wolf_INCLUDE_DIRS AND wolf_LIBRARIES) - set(wolf_FOUND FALSE) -ENDIF (wolf_INCLUDE_DIRS AND wolf_LIBRARIES) - -IF (wolf_FOUND) - IF (NOT wolf_FIND_QUIETLY) - MESSAGE(STATUS "Found wolf: ${wolf_LIBRARIES}") - ENDIF (NOT wolf_FIND_QUIETLY) -ELSE (wolf_FOUND) - IF (wolf_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find wolf") - ENDIF (wolf_FIND_REQUIRED) -ENDIF (wolf_FOUND) - - -macro(wolf_report_not_found REASON_MSG) - set(wolf_FOUND FALSE) - unset(wolf_INCLUDE_DIRS) - unset(wolf_LIBRARIES) - - # Reset the CMake module path to its state when this script was called. - set(CMAKE_MODULE_PATH ${CALLERS_CMAKE_MODULE_PATH}) - - # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by - # FindPackage() use the camelcase library name, not uppercase. - if (wolf_FIND_QUIETLY) - message(STATUS "Failed to find wolf- " ${REASON_MSG} ${ARGN}) - else (wolf_FIND_REQUIRED) - message(FATAL_ERROR "Failed to find wolf - " ${REASON_MSG} ${ARGN}) - else() - # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error - # that prevents generation, but continues configuration. - message(SEND_ERROR "Failed to find wolf - " ${REASON_MSG} ${ARGN}) - endif () - return() -endmacro(wolf_report_not_found) - -if(NOT wolf_FOUND) - wolf_report_not_found("Something went wrong while setting up wolf.") -endif(NOT wolf_FOUND) -# Set the include directories for wolf (itself). -set(wolf_FOUND TRUE) - -# Now we gather all the required dependencies for Wolf - -get_filename_component(WOLF_CURRENT_CONFIG_DIR - "${CMAKE_CURRENT_LIST_FILE}" PATH) - -SET(BACKUP_MODULE_PATH ${CMAKE_MODULE_PATH}) -LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${WOLF_CURRENT_CONFIG_DIR}) - -FIND_PACKAGE(Threads REQUIRED) -list(APPEND wolf_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) - -FIND_PACKAGE(Ceres REQUIRED) -list(APPEND wolf_INCLUDE_DIRS ${CERES_INCLUDE_DIRS}) -list(APPEND wolf_LIBRARIES ${CERES_LIBRARIES}) - -# YAML with yaml-cpp -FIND_PACKAGE(YamlCpp REQUIRED) -list(APPEND wolf_INCLUDE_DIRS ${YAMLCPP_INCLUDE_DIRS}) -list(APPEND wolf_LIBRARIES ${YAMLCPP_LIBRARY}) - -#Eigen -# FIND_PACKAGE(Eigen3 REQUIRED) -# list(APPEND wolf_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS}) - -if(NOT Eigen3_FOUND) - FIND_PACKAGE(Eigen3 REQUIRED) -endif() -if(${EIGEN3_VERSION_STRING} VERSION_LESS 3.3) - message(FATAL_ERROR "Found Eigen ${EIGEN3_VERSION_STRING}. The minimum version required is Eigen 3.3") -endif() -list(APPEND wolf_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS}) - -SET(CMAKE_MODULE_PATH ${BACKUP_MODULE_PATH}) diff --git a/cmake_modules/wolfcoreConfig.cmake b/cmake_modules/wolfcoreConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..b4df7e15bab20bc8d1090ffbd5428ac7a3ab5cd6 --- /dev/null +++ b/cmake_modules/wolfcoreConfig.cmake @@ -0,0 +1,99 @@ +#edit the following line to add the librarie's header files +FIND_PATH( + wolfcore_INCLUDE_DIRS + NAMES wolfcore.found + PATHS /usr/local/include/iri-algorithms/wolf/plugin_core) +IF(wolfcore_INCLUDE_DIRS) + MESSAGE("Found wolf core include dirs: ${wolfcore_INCLUDE_DIRS}") +ELSE(wolfcore_INCLUDE_DIRS) + MESSAGE("Couldn't find wolf core include dirs") +ENDIF(wolfcore_INCLUDE_DIRS) + +FIND_LIBRARY( + wolfcore_LIBRARIES + NAMES libwolfcore.so libwolfcore.dylib + PATHS /usr/local/lib/iri-algorithms) +IF(wolfcore_LIBRARIES) + MESSAGE("Found wolf core lib: ${wolfcore_LIBRARIES}") +ELSE(wolfcore_LIBRARIES) + MESSAGE("Couldn't find wolf core lib") +ENDIF(wolfcore_LIBRARIES) + +IF (wolfcore_INCLUDE_DIRS AND wolfcore_LIBRARIES) + SET(wolfcore_FOUND TRUE) + ELSE(wolfcore_INCLUDE_DIRS AND wolfcore_LIBRARIES) + set(wolfcore_FOUND FALSE) +ENDIF (wolfcore_INCLUDE_DIRS AND wolfcore_LIBRARIES) + +IF (wolfcore_FOUND) + IF (NOT wolfcore_FIND_QUIETLY) + MESSAGE(STATUS "Found wolf core: ${wolfcore_LIBRARIES}") + ENDIF (NOT wolfcore_FIND_QUIETLY) +ELSE (wolfcore_FOUND) + IF (wolfcore_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find wolf core") + ENDIF (wolfcore_FIND_REQUIRED) +ENDIF (wolfcore_FOUND) + + +macro(wolfcore_report_not_found REASON_MSG) + set(wolfcore_FOUND FALSE) + unset(wolfcore_INCLUDE_DIRS) + unset(wolfcore_LIBRARIES) + + # Reset the CMake module path to its state when this script was called. + set(CMAKE_MODULE_PATH ${CALLERS_CMAKE_MODULE_PATH}) + + # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by + # FindPackage() use the camelcase library name, not uppercase. + if (wolfcore_FIND_QUIETLY) + message(STATUS "Failed to find wolf core - " ${REASON_MSG} ${ARGN}) + elseif (wolfcore_FIND_REQUIRED) + message(FATAL_ERROR "Failed to find wolf core - " ${REASON_MSG} ${ARGN}) + else() + # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error + # that prevents generation, but continues configuration. + message(SEND_ERROR "Failed to find wolf core - " ${REASON_MSG} ${ARGN}) + endif () + return() +endmacro(wolfcore_report_not_found) + +if(NOT wolfcore_FOUND) + wolfcore_report_not_found("Something went wrong while setting up wolf.") +else (NOT wolfcore_FOUND) + # Set the include directories for wolf core (itself). + set(wolfcore_FOUND TRUE) + + # Now we gather all the required dependencies for Wolf + + get_filename_component(WOLFCORE_CURRENT_CONFIG_DIR + "${CMAKE_CURRENT_LIST_FILE}" PATH) + + SET(BACKUP_MODULE_PATH ${CMAKE_MODULE_PATH}) + LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${WOLFCORE_CURRENT_CONFIG_DIR}) + + FIND_PACKAGE(Threads REQUIRED) + list(APPEND wolfcore_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + + FIND_PACKAGE(Ceres REQUIRED) + list(APPEND wolfcore_INCLUDE_DIRS ${CERES_INCLUDE_DIRS}) + list(APPEND wolfcore_LIBRARIES ${CERES_LIBRARIES}) + + # YAML with yaml-cpp + FIND_PACKAGE(YamlCpp REQUIRED) + list(APPEND wolfcore_INCLUDE_DIRS ${YAMLCPP_INCLUDE_DIRS}) + list(APPEND wolfcore_LIBRARIES ${YAMLCPP_LIBRARY}) + + #Eigen + # FIND_PACKAGE(Eigen3 REQUIRED) + # list(APPEND wolfcore_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS}) + + if(NOT Eigen3_FOUND) + FIND_PACKAGE(Eigen3 REQUIRED) + endif() + if(${EIGEN3_VERSION_STRING} VERSION_LESS 3.3) + message(FATAL_ERROR "Found Eigen ${EIGEN3_VERSION_STRING}. The minimum version required is Eigen 3.3") + endif() + list(APPEND wolfcore_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS}) +endif(NOT wolfcore_FOUND) +SET(CMAKE_MODULE_PATH ${BACKUP_MODULE_PATH}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 96656415449da2d8b229f67d11e76529c34764d3..88bcfc88a48286994ec38aee96c3cb44eb25a200 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -28,7 +28,7 @@ include_directories(${GTEST_INCLUDE_DIRS}) # # # Create a specific test executable for gtest_example # wolf_add_gtest(gtest_example gtest_example.cpp) # -target_link_libraries(gtest_example ${PROJECT_NAME}) # +target_link_libraries(gtest_example ${PLUGIN_NAME}) # # # ########################################################### set(SRC_DUMMY @@ -36,7 +36,7 @@ set(SRC_DUMMY dummy/processor_tracker_landmark_dummy.cpp ) add_library(dummy SHARED ${SRC_DUMMY}) -target_link_libraries(dummy ${PROJECT_NAME}) +target_link_libraries(dummy ${PLUGIN_NAME}) ################# ADD YOUR TESTS BELOW #################### # # # ==== IN ALPHABETICAL ORDER! ==== # @@ -46,221 +46,219 @@ target_link_libraries(dummy ${PROJECT_NAME}) # CaptureBase class test wolf_add_gtest(gtest_capture_base gtest_capture_base.cpp) -target_link_libraries(gtest_capture_base ${PROJECT_NAME}) +target_link_libraries(gtest_capture_base ${PLUGIN_NAME}) # Converter from String to various types used by the parameters server wolf_add_gtest(gtest_converter gtest_converter.cpp) -target_link_libraries(gtest_converter ${PROJECT_NAME}) +target_link_libraries(gtest_converter ${PLUGIN_NAME}) # FactorBase class test wolf_add_gtest(gtest_factor_base gtest_factor_base.cpp) -target_link_libraries(gtest_factor_base ${PROJECT_NAME}) +target_link_libraries(gtest_factor_base ${PLUGIN_NAME}) # FactorAutodiff class test wolf_add_gtest(gtest_factor_autodiff gtest_factor_autodiff.cpp) -target_link_libraries(gtest_factor_autodiff ${PROJECT_NAME}) +target_link_libraries(gtest_factor_autodiff ${PLUGIN_NAME}) # FactoryStateBlock factory test wolf_add_gtest(gtest_factory_state_block gtest_factory_state_block.cpp) -target_link_libraries(gtest_factory_state_block ${PROJECT_NAME}) +target_link_libraries(gtest_factory_state_block ${PLUGIN_NAME}) # FeatureBase classes test wolf_add_gtest(gtest_eigen_predicates gtest_eigen_predicates.cpp) -target_link_libraries(gtest_eigen_predicates ${PROJECT_NAME}) +target_link_libraries(gtest_eigen_predicates ${PLUGIN_NAME}) # Node Emplace test wolf_add_gtest(gtest_emplace gtest_emplace.cpp) -target_link_libraries(gtest_emplace ${PROJECT_NAME} dummy) +target_link_libraries(gtest_emplace ${PLUGIN_NAME} dummy) # FeatureBase classes test wolf_add_gtest(gtest_feature_base gtest_feature_base.cpp) -target_link_libraries(gtest_feature_base ${PROJECT_NAME}) +target_link_libraries(gtest_feature_base ${PLUGIN_NAME}) # FrameBase classes test wolf_add_gtest(gtest_frame_base gtest_frame_base.cpp) -target_link_libraries(gtest_frame_base ${PROJECT_NAME}) +target_link_libraries(gtest_frame_base ${PLUGIN_NAME}) # HasStateBlocks classes test wolf_add_gtest(gtest_has_state_blocks gtest_has_state_blocks.cpp) -target_link_libraries(gtest_has_state_blocks ${PROJECT_NAME}) +target_link_libraries(gtest_has_state_blocks ${PLUGIN_NAME}) # LocalParametrizationXxx classes test wolf_add_gtest(gtest_local_param gtest_local_param.cpp) -target_link_libraries(gtest_local_param ${PROJECT_NAME}) +target_link_libraries(gtest_local_param ${PLUGIN_NAME}) # Logging test wolf_add_gtest(gtest_logging gtest_logging.cpp) -target_link_libraries(gtest_logging ${PROJECT_NAME}) +target_link_libraries(gtest_logging ${PLUGIN_NAME}) # MotionBuffer class test wolf_add_gtest(gtest_motion_buffer gtest_motion_buffer.cpp) -target_link_libraries(gtest_motion_buffer ${PROJECT_NAME}) +target_link_libraries(gtest_motion_buffer ${PLUGIN_NAME}) # PackKFBuffer wolf_add_gtest(gtest_pack_KF_buffer gtest_pack_KF_buffer.cpp) -target_link_libraries(gtest_pack_KF_buffer ${PROJECT_NAME} dummy) +target_link_libraries(gtest_pack_KF_buffer ${PLUGIN_NAME} dummy) # Parameters server wolf_add_gtest(gtest_param_server gtest_param_server.cpp ${CMAKE_CURRENT_LIST_DIR}) -target_link_libraries(gtest_param_server ${PROJECT_NAME}) +target_link_libraries(gtest_param_server ${PLUGIN_NAME}) # YAML parser wolf_add_gtest(gtest_parser_yaml gtest_parser_yaml.cpp) -target_link_libraries(gtest_parser_yaml ${PROJECT_NAME}) +target_link_libraries(gtest_parser_yaml ${PLUGIN_NAME}) # Problem class test wolf_add_gtest(gtest_problem gtest_problem.cpp) -target_link_libraries(gtest_problem ${PROJECT_NAME} dummy) +target_link_libraries(gtest_problem ${PLUGIN_NAME} dummy) # ProcessorBase class test wolf_add_gtest(gtest_processor_base gtest_processor_base.cpp) -target_link_libraries(gtest_processor_base ${PROJECT_NAME} dummy) +target_link_libraries(gtest_processor_base ${PLUGIN_NAME} dummy) # ProcessorMotion class test wolf_add_gtest(gtest_processor_motion gtest_processor_motion.cpp) -target_link_libraries(gtest_processor_motion ${PROJECT_NAME}) +target_link_libraries(gtest_processor_motion ${PLUGIN_NAME}) # Rotation test wolf_add_gtest(gtest_rotation gtest_rotation.cpp) # SE3 test wolf_add_gtest(gtest_SE3 gtest_SE3.cpp) -target_link_libraries(gtest_SE3 ${PROJECT_NAME}) +target_link_libraries(gtest_SE3 ${PLUGIN_NAME}) # SensorBase test wolf_add_gtest(gtest_sensor_base gtest_sensor_base.cpp) -target_link_libraries(gtest_sensor_base ${PROJECT_NAME}) +target_link_libraries(gtest_sensor_base ${PLUGIN_NAME}) # shared_from_this test wolf_add_gtest(gtest_shared_from_this gtest_shared_from_this.cpp) -target_link_libraries(gtest_shared_from_this ${PROJECT_NAME}) +target_link_libraries(gtest_shared_from_this ${PLUGIN_NAME}) # SolverManager test wolf_add_gtest(gtest_solver_manager gtest_solver_manager.cpp) -target_link_libraries(gtest_solver_manager ${PROJECT_NAME}) +target_link_libraries(gtest_solver_manager ${PLUGIN_NAME}) # StateBlock class test wolf_add_gtest(gtest_state_block gtest_state_block.cpp) -target_link_libraries(gtest_state_block ${PROJECT_NAME}) +target_link_libraries(gtest_state_block ${PLUGIN_NAME}) # StateBlock class test wolf_add_gtest(gtest_state_composite gtest_state_composite.cpp) -target_link_libraries(gtest_state_composite ${PROJECT_NAME}) +target_link_libraries(gtest_state_composite ${PLUGIN_NAME}) # TimeStamp class test wolf_add_gtest(gtest_time_stamp gtest_time_stamp.cpp) -target_link_libraries(gtest_time_stamp ${PROJECT_NAME}) +target_link_libraries(gtest_time_stamp ${PLUGIN_NAME}) # TrackMatrix class test wolf_add_gtest(gtest_track_matrix gtest_track_matrix.cpp) -target_link_libraries(gtest_track_matrix ${PROJECT_NAME}) +target_link_libraries(gtest_track_matrix ${PLUGIN_NAME}) # TrajectoryBase class test wolf_add_gtest(gtest_trajectory gtest_trajectory.cpp) -target_link_libraries(gtest_trajectory ${PROJECT_NAME}) +target_link_libraries(gtest_trajectory ${PLUGIN_NAME}) # TreeManager class test wolf_add_gtest(gtest_tree_manager gtest_tree_manager.cpp) -target_link_libraries(gtest_tree_manager ${PROJECT_NAME}) +target_link_libraries(gtest_tree_manager ${PLUGIN_NAME}) # ------- Now Derived classes ---------- # FactorAbs(P/O/V) classes test wolf_add_gtest(gtest_factor_absolute gtest_factor_absolute.cpp) -target_link_libraries(gtest_factor_absolute ${PROJECT_NAME}) +target_link_libraries(gtest_factor_absolute ${PLUGIN_NAME}) # FactorAutodiffDistance3d test wolf_add_gtest(gtest_factor_autodiff_distance_3d gtest_factor_autodiff_distance_3d.cpp) -target_link_libraries(gtest_factor_autodiff_distance_3d ${PROJECT_NAME}) +target_link_libraries(gtest_factor_autodiff_distance_3d ${PLUGIN_NAME}) # FactorBlockDifference class test wolf_add_gtest(gtest_factor_block_difference gtest_factor_block_difference.cpp) -target_link_libraries(gtest_factor_block_difference ${PROJECT_NAME}) +target_link_libraries(gtest_factor_block_difference ${PLUGIN_NAME}) # FactorOdom3d class test wolf_add_gtest(gtest_factor_diff_drive gtest_factor_diff_drive.cpp) -target_link_libraries(gtest_factor_diff_drive ${PROJECT_NAME}) +target_link_libraries(gtest_factor_diff_drive ${PLUGIN_NAME}) # FactorOdom2d class test wolf_add_gtest(gtest_factor_odom_2d gtest_factor_odom_2d.cpp) -target_link_libraries(gtest_factor_odom_2d ${PROJECT_NAME}) +target_link_libraries(gtest_factor_odom_2d ${PLUGIN_NAME}) # FactorOdom3d class test wolf_add_gtest(gtest_factor_odom_3d gtest_factor_odom_3d.cpp) -target_link_libraries(gtest_factor_odom_3d ${PROJECT_NAME}) +target_link_libraries(gtest_factor_odom_3d ${PLUGIN_NAME}) # FactorPose2d class test wolf_add_gtest(gtest_factor_pose_2d gtest_factor_pose_2d.cpp) -target_link_libraries(gtest_factor_pose_2d ${PROJECT_NAME}) +target_link_libraries(gtest_factor_pose_2d ${PLUGIN_NAME}) # FactorPose3d class test wolf_add_gtest(gtest_factor_pose_3d gtest_factor_pose_3d.cpp) -target_link_libraries(gtest_factor_pose_3d ${PROJECT_NAME}) +target_link_libraries(gtest_factor_pose_3d ${PLUGIN_NAME}) # FactorRelativePose2dWithExtrinsics class test wolf_add_gtest(gtest_factor_relative_pose_2d_with_extrinsics gtest_factor_relative_pose_2d_with_extrinsics.cpp) -target_link_libraries(gtest_factor_relative_pose_2d_with_extrinsics ${PROJECT_NAME}) +target_link_libraries(gtest_factor_relative_pose_2d_with_extrinsics ${PLUGIN_NAME}) # FactorRelative2dAnalytic class test wolf_add_gtest(gtest_factor_relative_2d_analytic gtest_factor_relative_2d_analytic.cpp) -target_link_libraries(gtest_factor_relative_2d_analytic ${PROJECT_NAME}) +target_link_libraries(gtest_factor_relative_2d_analytic ${PLUGIN_NAME}) # MakePosDef function test wolf_add_gtest(gtest_make_posdef gtest_make_posdef.cpp) -target_link_libraries(gtest_make_posdef ${PROJECT_NAME}) +target_link_libraries(gtest_make_posdef ${PLUGIN_NAME}) # Map yaml save/load test wolf_add_gtest(gtest_map_yaml gtest_map_yaml.cpp) -target_link_libraries(gtest_map_yaml ${PROJECT_NAME}) +target_link_libraries(gtest_map_yaml ${PLUGIN_NAME}) # Parameter prior test wolf_add_gtest(gtest_param_prior gtest_param_prior.cpp) -target_link_libraries(gtest_param_prior ${PROJECT_NAME}) +target_link_libraries(gtest_param_prior ${PLUGIN_NAME}) # ProcessorDiffDriveSelfcalib class test wolf_add_gtest(gtest_processor_diff_drive gtest_processor_diff_drive.cpp) -target_link_libraries(gtest_processor_diff_drive ${PROJECT_NAME}) +target_link_libraries(gtest_processor_diff_drive ${PLUGIN_NAME}) # ProcessorLoopClosureBase class test wolf_add_gtest(gtest_processor_loopclosure gtest_processor_loopclosure.cpp) -target_link_libraries(gtest_processor_loopclosure ${PROJECT_NAME}) +target_link_libraries(gtest_processor_loopclosure ${PLUGIN_NAME}) # ProcessorFrameNearestNeighborFilter class test # wolf_add_gtest(gtest_processor_frame_nearest_neighbor_filter_2d gtest_processor_frame_nearest_neighbor_filter_2d.cpp) -# target_link_libraries(gtest_processor_frame_nearest_neighbor_filter_2d ${PROJECT_NAME}) +# target_link_libraries(gtest_processor_frame_nearest_neighbor_filter_2d ${PLUGIN_NAME}) # ProcessorMotion in 2d wolf_add_gtest(gtest_odom_2d gtest_odom_2d.cpp) -target_link_libraries(gtest_odom_2d ${PROJECT_NAME}) +target_link_libraries(gtest_odom_2d ${PLUGIN_NAME}) # ProcessorOdom3d class test wolf_add_gtest(gtest_processor_odom_3d gtest_processor_odom_3d.cpp) -target_link_libraries(gtest_processor_odom_3d ${PROJECT_NAME}) +target_link_libraries(gtest_processor_odom_3d ${PLUGIN_NAME}) # ProcessorTrackerFeatureDummy class test wolf_add_gtest(gtest_processor_tracker_feature_dummy gtest_processor_tracker_feature_dummy.cpp) -target_link_libraries(gtest_processor_tracker_feature_dummy ${PROJECT_NAME} dummy) +target_link_libraries(gtest_processor_tracker_feature_dummy ${PLUGIN_NAME} dummy) # ProcessorTrackerLandmarkDummy class test wolf_add_gtest(gtest_processor_tracker_landmark_dummy gtest_processor_tracker_landmark_dummy.cpp) -target_link_libraries(gtest_processor_tracker_landmark_dummy ${PROJECT_NAME} dummy) +target_link_libraries(gtest_processor_tracker_landmark_dummy ${PLUGIN_NAME} dummy) # SensorDiffDriveSelfcalib class test wolf_add_gtest(gtest_sensor_diff_drive gtest_sensor_diff_drive.cpp) -target_link_libraries(gtest_sensor_diff_drive ${PROJECT_NAME}) +target_link_libraries(gtest_sensor_diff_drive ${PLUGIN_NAME}) IF (Ceres_FOUND) # SolverCeres test wolf_add_gtest(gtest_solver_ceres gtest_solver_ceres.cpp) -target_link_libraries(gtest_solver_ceres ${PROJECT_NAME}) +target_link_libraries(gtest_solver_ceres ${PLUGIN_NAME}) ENDIF(Ceres_FOUND) # TreeManagerSlidingWindow class test wolf_add_gtest(gtest_tree_manager_sliding_window gtest_tree_manager_sliding_window.cpp) -target_link_libraries(gtest_tree_manager_sliding_window ${PROJECT_NAME}) +target_link_libraries(gtest_tree_manager_sliding_window ${PLUGIN_NAME}) # yaml conversions wolf_add_gtest(gtest_yaml_conversions gtest_yaml_conversions.cpp) -target_link_libraries(gtest_yaml_conversions ${PROJECT_NAME}) - - +target_link_libraries(gtest_yaml_conversions ${PLUGIN_NAME}) diff --git a/wolf_scripts/wolf_uninstall.sh b/wolf_scripts/wolf_uninstall.sh index b381616ecf9c37423d5cd11e18bb3f5502cec641..ff022e0b25ebc31bc0d7d0e50124569896c8f6ba 100755 --- a/wolf_scripts/wolf_uninstall.sh +++ b/wolf_scripts/wolf_uninstall.sh @@ -1,20 +1,42 @@ #!/bin/bash -echo “=†-echo “====================== UNINSTALLING WOLF ======================†-echo “=†+if [ -z "$1" ] +then + echo “=†+ echo “====================== UNINSTALLING WOLF ======================†+ echo “=†-echo "cd /usr/local/include/iri-algorithms/" -cd /usr/local/include/iri-algorithms/ -echo "sudo rm -rf wolf" -sudo rm -rf wolf + echo "cd /usr/local/include/iri-algorithms/" + cd /usr/local/include/iri-algorithms/ + echo "sudo rm -rf wolf" + sudo rm -rf wolf -echo "cd /usr/local/lib/iri-algorithms/" -echo "sudo rm libwolf*.*" -cd /usr/local/lib/iri-algorithms/ -sudo rm libwolf*.* + echo "cd /usr/local/lib/iri-algorithms/" + echo "sudo rm libwolf*.*" + cd /usr/local/lib/iri-algorithms/ + sudo rm libwolf*.* -echo "cd /usr/local/lib/cmake/" -echo "sudo rm -rf wolf*" -cd /usr/local/lib/cmake/ -sudo rm -rf wolf* \ No newline at end of file + echo "cd /usr/local/lib/cmake/" + echo "sudo rm -rf wolf*" + cd /usr/local/lib/cmake/ + sudo rm -rf wolf* +else + echo “=†+ echo “====================== UNINSTALLING PLUGIN $1 ======================†+ echo “=†+ + echo "cd /usr/local/include/iri-algorithms/wolf" + cd /usr/local/include/iri-algorithms/wolf/ + echo "sudo rm -rf plugin_$1" + sudo rm -rf plugin_$1 + + echo "cd /usr/local/lib/iri-algorithms/" + echo "sudo rm libwolf$1.*" + cd /usr/local/lib/iri-algorithms/ + sudo rm libwolf$1.* + + echo "cd /usr/local/lib/cmake/" + echo "sudo rm -rf wolf$1" + cd /usr/local/lib/cmake/ + sudo rm -rf wolf$1 +fi