diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index be64828ccbcd7b061730ed1347c1ceb902f5cff3..aaee75976cfa352a8dcbc082bd17406db91f78c6 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -148,39 +148,39 @@ TARGET_LINK_LIBRARIES(test_processor_imu ${PROJECT_NAME}) # TARGET_LINK_LIBRARIES(test_capture_laser_2D ${PROJECT_NAME}) #ENDIF (laser_scan_utils_FOUND) -IF(faramotics_FOUND) - IF (laser_scan_utils_FOUND) - ADD_EXECUTABLE(test_ceres_2_lasers test_ceres_2_lasers.cpp) - TARGET_LINK_LIBRARIES(test_ceres_2_lasers - ${pose_state_time_LIBRARIES} - ${faramotics_LIBRARIES} - ${PROJECT_NAME}) - ADD_EXECUTABLE(test_ceres_2_lasers_polylines test_ceres_2_lasers_polylines.cpp) - TARGET_LINK_LIBRARIES(test_ceres_2_lasers_polylines - ${pose_state_time_LIBRARIES} - ${faramotics_LIBRARIES} - ${PROJECT_NAME}) - ADD_EXECUTABLE(test_2_lasers_offline test_2_lasers_offline.cpp) - TARGET_LINK_LIBRARIES(test_2_lasers_offline - ${pose_state_time_LIBRARIES} - ${faramotics_LIBRARIES} - ${PROJECT_NAME}) - ADD_EXECUTABLE(test_faramotics_simulation test_faramotics_simulation.cpp) - TARGET_LINK_LIBRARIES(test_faramotics_simulation - ${pose_state_time_LIBRARIES} - ${faramotics_LIBRARIES} - ${PROJECT_NAME}) -# ADD_EXECUTABLE(test_autodiff test_autodiff.cpp) -# TARGET_LINK_LIBRARIES(test_autodiff -# ${pose_state_time_LIBRARIES} -# ${faramotics_LIBRARIES} -# ${PROJECT_NAME}) -# IF(Suitesparse_FOUND) -# ADD_EXECUTABLE(test_iQR_wolf2 solver/test_iQR_wolf2.cpp) -# TARGET_LINK_LIBRARIES(test_iQR_wolf2 -# ${pose_state_time_LIBRARIES} -# ${faramotics_LIBRARIES} -# ${PROJECT_NAME}) -# ENDIF(Suitesparse_FOUND) - ENDIF (laser_scan_utils_FOUND) -ENDIF(faramotics_FOUND) +# IF(faramotics_FOUND) +# IF (laser_scan_utils_FOUND) +# ADD_EXECUTABLE(test_ceres_2_lasers test_ceres_2_lasers.cpp) +# TARGET_LINK_LIBRARIES(test_ceres_2_lasers +# ${pose_state_time_LIBRARIES} +# ${faramotics_LIBRARIES} +# ${PROJECT_NAME}) +# ADD_EXECUTABLE(test_ceres_2_lasers_polylines test_ceres_2_lasers_polylines.cpp) +# TARGET_LINK_LIBRARIES(test_ceres_2_lasers_polylines +# ${pose_state_time_LIBRARIES} +# ${faramotics_LIBRARIES} +# ${PROJECT_NAME}) +# ADD_EXECUTABLE(test_2_lasers_offline test_2_lasers_offline.cpp) +# TARGET_LINK_LIBRARIES(test_2_lasers_offline +# ${pose_state_time_LIBRARIES} +# ${faramotics_LIBRARIES} +# ${PROJECT_NAME}) +# ADD_EXECUTABLE(test_faramotics_simulation test_faramotics_simulation.cpp) +# TARGET_LINK_LIBRARIES(test_faramotics_simulation +# ${pose_state_time_LIBRARIES} +# ${faramotics_LIBRARIES} +# ${PROJECT_NAME}) +# # ADD_EXECUTABLE(test_autodiff test_autodiff.cpp) +# # TARGET_LINK_LIBRARIES(test_autodiff +# # ${pose_state_time_LIBRARIES} +# # ${faramotics_LIBRARIES} +# # ${PROJECT_NAME}) +# # IF(Suitesparse_FOUND) +# # ADD_EXECUTABLE(test_iQR_wolf2 solver/test_iQR_wolf2.cpp) +# # TARGET_LINK_LIBRARIES(test_iQR_wolf2 +# # ${pose_state_time_LIBRARIES} +# # ${faramotics_LIBRARIES} +# # ${PROJECT_NAME}) +# # ENDIF(Suitesparse_FOUND) +# # ENDIF (laser_scan_utils_FOUND) +# # ENDIF(faramotics_FOUND) diff --git a/src/landmark_match.h b/src/landmark_match.h new file mode 100644 index 0000000000000000000000000000000000000000..26b0b6f9206a1b479bd833a5a214b58bff4f0ab2 --- /dev/null +++ b/src/landmark_match.h @@ -0,0 +1,38 @@ +#ifndef LANDMARK_MATCH_H_ +#define LANDMARK_MATCH_H_ + +// Wolf includes +#include "wolf.h" + +//wolf nampseace +namespace wolf { + +/** \brief Match between a feature and a landmark + * + * Match between a feature and a landmark + * + **/ +struct LandmarkMatch +{ + LandmarkBasePtr landmark_ptr_; + Scalar normalized_score_; + + LandmarkMatch() : + landmark_ptr_(nullptr), normalized_score_(0) + { + + } + LandmarkMatch(LandmarkBasePtr _landmark_ptr, Scalar _normalized_score) : + landmark_ptr_(_landmark_ptr), normalized_score_(_normalized_score) + { + + } +}; + +// Map of Feature - Landmark matches +typedef std::shared_ptr<LandmarkMatch> LandmarkMatchPtr; +typedef std::map<FeatureBasePtr, LandmarkMatchPtr> LandmarkMatchMap; + +}//end namespace + +#endif diff --git a/src/processor_tracker_landmark.h b/src/processor_tracker_landmark.h index 96d7c2cbd9fefada97840dd8c1a010369e21260c..5e758c76d4dc1bb324ac600decf1aee696c54518 100644 --- a/src/processor_tracker_landmark.h +++ b/src/processor_tracker_landmark.h @@ -8,8 +8,10 @@ #ifndef PROCESSOR_TRACKER_LANDMARK_H_ #define PROCESSOR_TRACKER_LANDMARK_H_ +//wolf includes #include "processor_tracker.h" #include "capture_base.h" +#include "landmark_match.h" namespace wolf { diff --git a/src/wolf.h b/src/wolf.h index a700a7f90a873873bf8d1f2e4f4eabc37235ce02..a25a14955155a1e0745220f4b7ff0525b59ee470 100644 --- a/src/wolf.h +++ b/src/wolf.h @@ -377,28 +377,6 @@ typedef std::shared_ptr<StateQuaternion> StateQuaternionPtr; // - - Local Parametrization typedef std::shared_ptr<LocalParametrizationBase> LocalParametrizationBasePtr; -// - - Match Feature - Landmark -struct LandmarkMatch -{ - LandmarkBasePtr landmark_ptr_; - Scalar normalized_score_; - LandmarkMatch() : - landmark_ptr_(nullptr), normalized_score_(0) - { - - } - LandmarkMatch(LandmarkBasePtr _landmark_ptr, Scalar _normalized_score) : - landmark_ptr_(_landmark_ptr), normalized_score_(_normalized_score) - { - - } -}; - -// Match map Feature - Landmark -typedef std::shared_ptr<LandmarkMatch> LandmarkMatchPtr; -typedef std::map<FeatureBasePtr, LandmarkMatchPtr> LandmarkMatchMap; - - // Feature-Feature correspondence struct FeatureMatch {