-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from ethz-asl/devel/improving_externals
Improving external feature interface and documentation
- Loading branch information
Showing
32 changed files
with
472 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,3 @@ | |
[submodule "dependencies/3rdparty/libpointmatcher"] | ||
path = dependencies/3rdparty/libpointmatcher | ||
url = [email protected]:ANYbotics/libpointmatcher.git | ||
[submodule "dependencies/internal/maplab_features"] | ||
path = dependencies/internal/maplab_features | ||
url = [email protected]:ethz-asl/maplab_features.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
algorithms/feature-tracking/include/feature-tracking/vo-outlier-rejection-pipeline.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#ifndef FEATURE_TRACKING_VO_OUTLIER_REJECTION_PIPELINE_H_ | ||
#define FEATURE_TRACKING_VO_OUTLIER_REJECTION_PIPELINE_H_ | ||
|
||
#include <sensors/external-features.h> | ||
#include <unordered_set> | ||
|
||
#include "feature-tracking/feature-tracking-pipeline.h" | ||
#include "feature-tracking/feature-tracking-types.h" | ||
|
||
namespace feature_tracking { | ||
|
||
class VOOutlierRejectionPipeline : public FeatureTrackingPipeline { | ||
public: | ||
MAPLAB_POINTER_TYPEDEFS(VOOutlierRejectionPipeline); | ||
MAPLAB_DISALLOW_EVIL_CONSTRUCTORS(VOOutlierRejectionPipeline); | ||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
VOOutlierRejectionPipeline( | ||
const aslam::Camera::ConstPtr& camera, const int cam_idx, | ||
const aslam::Quaternion& q_C_B, const vi_map::FeatureType feature_type, | ||
const FeatureTrackingOutlierSettings& outlier_settings); | ||
virtual ~VOOutlierRejectionPipeline(); | ||
|
||
void rejectMatchesFrame( | ||
const aslam::Quaternion& q_Bkp1_Bk, aslam::VisualFrame* frame_kp1, | ||
aslam::VisualFrame* frame_k); | ||
|
||
void reset(); | ||
|
||
private: | ||
aslam::Camera::ConstPtr camera_; | ||
const int cam_idx_; | ||
const aslam::Quaternion q_C_B_; | ||
const int feature_type_; | ||
const std::string feature_type_string_; | ||
|
||
// Used to check that the frames being given are connected, otherwise | ||
// we have to reset the outlier and inlier information we maintain. | ||
bool initialized_; | ||
int64_t k_frame_timestamp_; | ||
|
||
// We remember which tracks were marked as outliers in the previous frame | ||
// so we can continue eliminating them. This is necessary because we can't | ||
// communicate with the external feature tracker on what was discarded. | ||
// If a track stops appearing in a frame we no longer need to remember it | ||
// as an outlier, since it means the tracker has stopped tracking it. This | ||
// assumes matches are always only between two consecutive frames, but saves | ||
// a lot of memory and computation at runtime. | ||
std::unordered_set<int> k_outlier_track_ids; | ||
|
||
// We remember which tracks were valid in the previous frame. This is so | ||
// that if we remove a current outlier match, we know if the observation | ||
// in the previous frame has a track length of one and can be deleted. | ||
std::unordered_set<int> k_valid_track_ids_; | ||
|
||
const FeatureTrackingOutlierSettings outlier_settings_; | ||
}; | ||
|
||
} // namespace feature_tracking | ||
|
||
#endif // FEATURE_TRACKING_VO_OUTLIER_REJECTION_PIPELINE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.