Skip to content
Snippets Groups Projects
Commit b24a8cdd authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

Merge branch '490-processorlandmarkexternal-add-class-and-id-not-mandatory-2' into 'devel'

Resolve "ProcessorLandmarkExternal add class and id not mandatory"

Closes #490

See merge request !470
parents 57b8c0fc e0698f82
No related branches found
No related tags found
4 merge requests!476spdlog version upgrade,!473Rerefactor,!472Merge ProcessorLandmarkExternal,!470Resolve "ProcessorLandmarkExternal add class and id not mandatory"
Pipeline #17542 passed
...@@ -23,6 +23,7 @@ stages: ...@@ -23,6 +23,7 @@ stages:
- fi - fi
- export WOLF_CORE_BRANCH=$CI_COMMIT_BRANCH - export WOLF_CORE_BRANCH=$CI_COMMIT_BRANCH
# Print variables # Print variables
- echo $CI_COMMIT_REF_NAME
- echo $CI_COMMIT_BRANCH - echo $CI_COMMIT_BRANCH
- echo $WOLF_IMU_BRANCH - echo $WOLF_IMU_BRANCH
- echo $WOLF_GNSS_BRANCH - echo $WOLF_GNSS_BRANCH
......
...@@ -36,32 +36,40 @@ WOLF_STRUCT_PTR_TYPEDEFS(ParamsProcessorLandmarkExternal); ...@@ -36,32 +36,40 @@ WOLF_STRUCT_PTR_TYPEDEFS(ParamsProcessorLandmarkExternal);
struct ParamsProcessorLandmarkExternal : public ParamsProcessorTracker struct ParamsProcessorLandmarkExternal : public ParamsProcessorTracker
{ {
bool use_orientation; ///< use orientation measure or not when emplacing factors bool use_orientation; ///< use orientation measure or not when emplacing factors
double match_dist_th; ///< for considering tracked detection: distance threshold to previous detection
unsigned int new_features_for_keyframe; ///< for keyframe voting: amount of new features with respect to origin unsigned int new_features_for_keyframe; ///< for keyframe voting: amount of new features with respect to origin
///< (sufficient condition if more than min_features_for_keyframe) ///< (sufficient condition if more than min_features_for_keyframe)
double filter_quality_th; ///< min quality to consider the detection double time_span; ///< for keyframe voting: time span since last frame (sufficient condition if more than
unsigned int filter_track_length_th; ///< length of the track necessary to consider the detection ///< min_features_for_keyframe)
double time_span; ///< for keyframe voting: time span since last frame (sufficient condition if more than
///< min_features_for_keyframe) double quality_th; ///< min quality to consider the detection
bool check_dist_when_ids_match; ///< check the match_dist_th also in detections with matching external ID
bool close_loop_when_id_match; ///< emplace loop closure factors if external ID matches // Matching distance threshold to previous detection considering motion (necessary condition)
bool close_loop_when_type_match; ///< emplace loop closure factors if external TYPE matches (and match_dist_th holds) double match_dist_th_id; ///< Match by ID
double match_dist_th_type; ///< Match by TYPE
double match_dist_th_unknown; ///< No ID/TYPE information
unsigned int track_length_th; ///< Track length threshold to emplace factors (necessary condition)
bool close_loops_by_id; ///< Close loop if ID matches (ID unchanged guaranteed)
bool close_loops_by_type; ///< Close loop if TYPE matches (also distance check)
ParamsProcessorLandmarkExternal() = default; ParamsProcessorLandmarkExternal() = default;
ParamsProcessorLandmarkExternal(std::string _unique_name, const wolf::ParamsServer& _server) ParamsProcessorLandmarkExternal(std::string _unique_name, const wolf::ParamsServer& _server)
: ParamsProcessorTracker(_unique_name, _server) : ParamsProcessorTracker(_unique_name, _server)
{ {
use_orientation = _server.getParam<bool>(prefix + _unique_name + "/use_orientation"); use_orientation = _server.getParam<bool>(prefix + _unique_name + "/use_orientation");
filter_quality_th = _server.getParam<double>(prefix + _unique_name + "/filter/quality_th");
filter_track_length_th = _server.getParam<unsigned int>(prefix + _unique_name + "/filter/track_length_th");
match_dist_th = _server.getParam<double>(prefix + _unique_name + "/match_dist_th");
time_span = _server.getParam<double>(prefix + _unique_name + "/keyframe_vote/time_span");
new_features_for_keyframe = new_features_for_keyframe =
_server.getParam<unsigned int>(prefix + _unique_name + "/keyframe_vote/new_features_for_keyframe"); _server.getParam<unsigned int>(prefix + _unique_name + "/keyframe_vote/new_features_for_keyframe");
check_dist_when_ids_match = _server.getParam<bool>(prefix + _unique_name + "/check_dist_when_ids_match"); time_span = _server.getParam<double>(prefix + _unique_name + "/keyframe_vote/time_span");
close_loop_when_id_match = _server.getParam<bool>(prefix + _unique_name + "/close_loop_when_id_match"); quality_th = _server.getParam<double>(prefix + _unique_name + "/quality_th");
close_loop_when_type_match = _server.getParam<bool>(prefix + _unique_name + "/close_loop_when_type_match"); match_dist_th_id = _server.getParam<double>(prefix + _unique_name + "/match_dist_th_id");
match_dist_th_type = _server.getParam<double>(prefix + _unique_name + "/match_dist_th_type");
match_dist_th_unknown = _server.getParam<double>(prefix + _unique_name + "/match_dist_th_unknown");
track_length_th = _server.getParam<unsigned int>(prefix + _unique_name + "/track_length_th");
close_loops_by_id = _server.getParam<bool>(prefix + _unique_name + "/close_loops_by_id");
close_loops_by_type = _server.getParam<bool>(prefix + _unique_name + "/close_loops_by_type");
} }
}; };
...@@ -82,7 +90,7 @@ class ProcessorLandmarkExternal : public ProcessorTracker ...@@ -82,7 +90,7 @@ class ProcessorLandmarkExternal : public ProcessorTracker
protected: protected:
ParamsProcessorLandmarkExternalPtr params_tfle_; ParamsProcessorLandmarkExternalPtr params_tfle_;
TrackMatrix track_matrix_; TrackMatrix track_matrix_;
std::set<SizeStd> lmks_ids_origin_; // std::set<SizeStd> lmks_ids_origin_;
/** Pre-process incoming Capture /** Pre-process incoming Capture
* *
...@@ -154,16 +162,19 @@ class ProcessorLandmarkExternal : public ProcessorTracker ...@@ -154,16 +162,19 @@ class ProcessorLandmarkExternal : public ProcessorTracker
const VectorComposite& _pose1, const VectorComposite& _pose1,
const VectorComposite& _pose2, const VectorComposite& _pose2,
const VectorComposite& _pose_sen) const; const VectorComposite& _pose_sen) const;
double detectionDistance(FeatureBasePtr _ftr,
LandmarkBasePtr _lmk,
const VectorComposite& _pose_frm,
const VectorComposite& _pose_sen) const;
}; };
inline ProcessorLandmarkExternal::ProcessorLandmarkExternal(ParamsProcessorLandmarkExternalPtr _params_tfle) inline ProcessorLandmarkExternal::ProcessorLandmarkExternal(ParamsProcessorLandmarkExternalPtr _params_tfle)
: ProcessorTracker("ProcessorLandmarkExternal", "PO", 0, _params_tfle), : ProcessorTracker("ProcessorLandmarkExternal", "PO", 0, _params_tfle),
params_tfle_(_params_tfle), params_tfle_(_params_tfle)//,lmks_ids_origin_()
lmks_ids_origin_()
{ {
// //
} }
} // namespace wolf } // namespace wolf
#endif #endif
\ No newline at end of file
This diff is collapsed.
...@@ -204,7 +204,7 @@ wolf_add_gtest(gtest_processor_fixed_wing_model gtest_processor_fixed_wing_model ...@@ -204,7 +204,7 @@ wolf_add_gtest(gtest_processor_fixed_wing_model gtest_processor_fixed_wing_model
wolf_add_gtest(gtest_processor_diff_drive gtest_processor_diff_drive.cpp) wolf_add_gtest(gtest_processor_diff_drive gtest_processor_diff_drive.cpp)
# ProcessorLandmarkExternal class test # ProcessorLandmarkExternal class test
# wolf_add_gtest(gtest_processor_landmark_external gtest_processor_landmark_external.cpp) wolf_add_gtest(gtest_processor_landmark_external gtest_processor_landmark_external.cpp)
# ProcessorLoopClosure class test # ProcessorLoopClosure class test
wolf_add_gtest(gtest_processor_loop_closure gtest_processor_loop_closure.cpp) wolf_add_gtest(gtest_processor_loop_closure gtest_processor_loop_closure.cpp)
......
This diff is collapsed.
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