diff --git a/src/logging.h b/src/logging.h index ea437b0942df836954adcfe68fe2b54017c3e04f..03d21c002bb74fadb1b684c63f5ca45372f4589f 100644 --- a/src/logging.h +++ b/src/logging.h @@ -9,6 +9,8 @@ #define WOLF_LOGGING_H_ // third_party include +#include <map> + // spdlog include #include "spdlog/spdlog.h" // enable the use of ostream operator<< diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 579035b175fb36109b234201ac747351831313c5..738bccd2056638606f1d1a69a94e6978f49f4756 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -72,6 +72,10 @@ target_link_libraries(gtest_local_param ${PROJECT_NAME}) wolf_add_gtest(gtest_motion_buffer gtest_motion_buffer.cpp) target_link_libraries(gtest_motion_buffer ${PROJECT_NAME}) +# Problem class test +wolf_add_gtest(gtest_problem gtest_problem.cpp) +target_link_libraries(gtest_problem ${PROJECT_NAME}) + # ProcessorMotion class test wolf_add_gtest(gtest_processor_motion gtest_processor_motion.cpp) target_link_libraries(gtest_processor_motion ${PROJECT_NAME}) @@ -144,10 +148,6 @@ target_link_libraries(gtest_constraint_autodiff ${PROJECT_NAME}) # ROI test IF(OpenCV_FOUND) - # Problem class test - wolf_add_gtest(gtest_problem gtest_problem.cpp) - target_link_libraries(gtest_problem ${PROJECT_NAME}) - wolf_add_gtest(gtest_roi_ORB gtest_roi_ORB.cpp) target_link_libraries(gtest_roi_ORB ${PROJECT_NAME}) ENDIF(OpenCV_FOUND) diff --git a/src/test/gtest_problem.cpp b/src/test/gtest_problem.cpp index 10780e2db11d1c08d0f77d05f383bc396e39c2b4..d2b0ef0152083a7fac41377d376e502745fd5451 100644 --- a/src/test/gtest_problem.cpp +++ b/src/test/gtest_problem.cpp @@ -12,6 +12,7 @@ #include "../sensor_base.h" #include "../sensor_odom_3D.h" #include "../processor_odom_3D.h" +#include "../processor_tracker_feature_dummy.h" #include <iostream> @@ -78,7 +79,9 @@ TEST(Problem, Installers) SensorBasePtr S = P->installSensor ("ODOM 3D", "odometer", xs, wolf_root + "/src/examples/sensor_odom_3D.yaml"); // install processor tracker (dummy installation under an Odometry sensor -- it's OK for this test) - ProcessorBasePtr pt = P->installProcessor("IMAGE LANDMARK", "ORB landmark tracker", "odometer", wolf_root + "/src/examples/processor_image_ORB.yaml"); + ProcessorBasePtr pt = std::make_shared<ProcessorTrackerFeatureDummy>(ProcessorTrackerFeatureDummy(5, 10)); + S->addProcessor(pt); + // check motion processor IS NOT set ASSERT_FALSE(P->getProcessorMotionPtr()); @@ -215,7 +218,8 @@ TEST(Problem, StateBlocks) ASSERT_EQ(P->getStateBlockList().size(), 2 + 3); ASSERT_EQ(P->getStateBlockNotificationList().size(), 2 + 3); - ProcessorBasePtr pt = P->installProcessor("IMAGE LANDMARK", "ORB landmark tracker", "camera", wolf_root + "/src/examples/processor_image_ORB.yaml"); + ProcessorBasePtr pt = std::make_shared<ProcessorTrackerFeatureDummy>(ProcessorTrackerFeatureDummy(5, 10)); + St->addProcessor(pt); ProcessorBasePtr pm = P->installProcessor("ODOM 3D", "odom integrator", "odometer", wolf_root + "/src/examples/processor_odom_3D.yaml"); // 2 state blocks, estimated @@ -243,7 +247,8 @@ TEST(Problem, Covariances) SensorBasePtr Sm = P->installSensor ("ODOM 3D", "odometer",xs, wolf_root + "/src/examples/sensor_odom_3D.yaml"); SensorBasePtr St = P->installSensor ("CAMERA", "camera", xs, wolf_root + "/src/examples/camera_params_ueye_sim.yaml"); - ProcessorBasePtr pt = P->installProcessor("IMAGE LANDMARK", "ORB landmark tracker", "camera", wolf_root + "/src/examples/processor_image_ORB.yaml"); + ProcessorBasePtr pt = std::make_shared<ProcessorTrackerFeatureDummy>(ProcessorTrackerFeatureDummy(5, 10)); + St->addProcessor(pt); ProcessorBasePtr pm = P->installProcessor("ODOM 3D", "odom integrator", "odometer", wolf_root + "/src/examples/processor_odom_3D.yaml"); // 4 state blocks, estimated