Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mobile_robotics
ADC
ADC_2021
iri_adc_landmarks_slam_solver
Commits
e8959f56
Commit
e8959f56
authored
Nov 15, 2021
by
Alejandro Lopez Gestoso
Browse files
Now it removes also features when relocalization. Added clear of landmarks
parent
8fd6a0a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/adc_landmarks_slam_solver_alg.cpp
View file @
e8959f56
...
...
@@ -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
++
)
{
...
...
src/adc_landmarks_slam_solver_alg_node.cpp
View file @
e8959f56
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment