Commit e8959f56 authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Now it removes also features when relocalization. Added clear of landmarks

parent 8fd6a0a4
......@@ -64,6 +64,7 @@ bool AdcLandmarksSlamSolverAlgorithm::load_landmarks(const std::string& _landmar
if (!landmarks_file.good())
return false;
std::map<double, LandmarkInfo>().swap(this->landmarks_);
this->landmarks_.clear();
//Read the file
double id, l1, l2, l3;
int t;
......@@ -97,6 +98,7 @@ bool AdcLandmarksSlamSolverAlgorithm::load_from_xodr(const std::string& _landmar
road.set_min_road_length(0.01);
road.load(_landmarks_file);
std::map<double, LandmarkInfo>().swap(this->landmarks_);
this->landmarks_.clear();
for(unsigned int i=0;i<road.get_num_segments();i++)
{
......
......@@ -264,6 +264,12 @@ void AdcLandmarksSlamSolverAlgNode::mainNodeThread(void)
//Remove candidates
std::list<LandmarkCandidate>().swap(this->landmarks_candidates_);
this->landmarks_candidates_.clear();
std::vector<FeatureInfo>().swap(this->front_features_);
this->front_features_.clear();
std::vector<FeatureInfo>().swap(this->rear_features_);
this->rear_features_.clear();
std::vector<FeatureInfo>().swap(this->features_);
this->features_.clear();
this->new_initialpose_ = false;
this->new_estimated_pose_ = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment