Skip to content
Snippets Groups Projects
Commit d245a62d authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

HOTFIX: addFeatureList

parent 43857cae
No related branches found
No related tags found
No related merge requests found
...@@ -195,8 +195,6 @@ ENDIF (SPDLOG_INCLUDE_DIR) ...@@ -195,8 +195,6 @@ ENDIF (SPDLOG_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS})
include_directories("include") include_directories("include")
include_directories(.)
# include_directories("templinks")
IF(Ceres_FOUND) IF(Ceres_FOUND)
INCLUDE_DIRECTORIES(${CERES_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${CERES_INCLUDE_DIRS})
ENDIF(Ceres_FOUND) ENDIF(Ceres_FOUND)
...@@ -455,14 +453,14 @@ IF (Ceres_FOUND) ...@@ -455,14 +453,14 @@ IF (Ceres_FOUND)
include/core/ceres_wrapper/ceres_manager.h include/core/ceres_wrapper/ceres_manager.h
include/core/ceres_wrapper/cost_function_wrapper.h include/core/ceres_wrapper/cost_function_wrapper.h
include/core/ceres_wrapper/create_numeric_diff_cost_function.h include/core/ceres_wrapper/create_numeric_diff_cost_function.h
include/core/ceres_wrapper/local_parametrization_wrapper.h include/core/ceres_wrapper/local_parametrization_wrapper.h
include/core/solver/solver_manager.h include/core/solver/solver_manager.h
include/core/solver_suitesparse/sparse_utils.h include/core/solver_suitesparse/sparse_utils.h
) )
SET(SRCS_WRAPPER SET(SRCS_WRAPPER
#ceres_wrapper/qr_manager.cpp #ceres_wrapper/qr_manager.cpp
src/ceres_wrapper/ceres_manager.cpp src/ceres_wrapper/ceres_manager.cpp
src/ceres_wrapper/local_parametrization_wrapper.cpp src/ceres_wrapper/local_parametrization_wrapper.cpp
src/solver/solver_manager.cpp src/solver/solver_manager.cpp
) )
ELSE(Ceres_FOUND) ELSE(Ceres_FOUND)
...@@ -493,15 +491,15 @@ IF(YAMLCPP_FOUND) ...@@ -493,15 +491,15 @@ IF(YAMLCPP_FOUND)
src/yaml/sensor_odom_3D_yaml.cpp src/yaml/sensor_odom_3D_yaml.cpp
) )
ENDIF(YAMLCPP_FOUND) ENDIF(YAMLCPP_FOUND)
# create the shared library # create the shared library
ADD_LIBRARY(${PROJECT_NAME} ADD_LIBRARY(${PROJECT_NAME}
SHARED SHARED
${SRCS} ${SRCS}
${SRCS_BASE} ${SRCS_BASE}
${SRCS_CAPTURE} ${SRCS_CAPTURE}
${SRCS_COMMON} ${SRCS_COMMON}
${SRCS_DTASSC} ${SRCS_DTASSC}
${SRCS_FACTOR} ${SRCS_FACTOR}
${SRCS_FEATURE} ${SRCS_FEATURE}
${SRCS_FRAME} ${SRCS_FRAME}
......
...@@ -109,9 +109,9 @@ void CaptureBase::addFeatureList(FeatureBasePtrList& _new_ft_list) ...@@ -109,9 +109,9 @@ void CaptureBase::addFeatureList(FeatureBasePtrList& _new_ft_list)
feature_ptr->setCapture(shared_from_this()); feature_ptr->setCapture(shared_from_this());
if (getProblem() != nullptr) if (getProblem() != nullptr)
feature_ptr->setProblem(getProblem()); feature_ptr->setProblem(getProblem());
feature_list_.push_back(feature_ptr); // feature_list_.push_back(feature_ptr);
} }
// feature_list_.splice(feature_list_.end(), _new_ft_list); feature_list_.splice(feature_list_.end(), _new_ft_list);
} }
void CaptureBase::getFactorList(FactorBasePtrList& _fac_list) void CaptureBase::getFactorList(FactorBasePtrList& _fac_list)
......
...@@ -37,14 +37,16 @@ void MapBase::addLandmarkList(LandmarkBasePtrList& _landmark_list) ...@@ -37,14 +37,16 @@ void MapBase::addLandmarkList(LandmarkBasePtrList& _landmark_list)
{ {
for (auto lmk : _landmark_list) for (auto lmk : _landmark_list)
addLandmark(lmk); addLandmark(lmk);
// LandmarkBasePtrList lmk_list_copy = _landmark_list; //since _landmark_list will be empty after addDownNodeList()
// for (LandmarkBasePtr landmark_ptr : lmk_list_copy) //TEMPORARY FIX, should be made compliant with the new emplace methodology
// { LandmarkBasePtrList lmk_list_copy = _landmark_list; //since _landmark_list will be empty after addDownNodeList()
// landmark_ptr->setMapPtr(shared_from_this()); for (LandmarkBasePtr landmark_ptr : lmk_list_copy)
// landmark_ptr->setProblem(getProblem()); {
// landmark_ptr->registerNewStateBlocks(); landmark_ptr->setMap(shared_from_this());
// } landmark_ptr->setProblem(getProblem());
// landmark_list_.splice(landmark_list_.end(), _landmark_list); landmark_ptr->registerNewStateBlocks();
}
landmark_list_.splice(landmark_list_.end(), _landmark_list);
} }
void MapBase::load(const std::string& _map_file_dot_yaml) void MapBase::load(const std::string& _map_file_dot_yaml)
......
...@@ -99,7 +99,7 @@ TEST(CaptureBase, addFeatureList) ...@@ -99,7 +99,7 @@ TEST(CaptureBase, addFeatureList)
C->addFeatureList((fl)); C->addFeatureList((fl));
ASSERT_EQ(C->getFeatureList().size(), (unsigned int) 4); ASSERT_EQ(C->getFeatureList().size(), (unsigned int) 4);
// ASSERT_EQ(fl.size(), (unsigned int) 0); // features have been moved, not copied // EDIT 02-2019: features have been copied ASSERT_EQ(fl.size(), (unsigned int) 0); // features have been moved, not copied // EDIT 02-2019: features have been copied
ASSERT_EQ(C->getFeatureList().front(), f_first); ASSERT_EQ(C->getFeatureList().front(), f_first);
ASSERT_EQ(C->getFeatureList().back(), f_last); ASSERT_EQ(C->getFeatureList().back(), f_last);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment