Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
laser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
laser
Commits
77709a08
Commit
77709a08
authored
4 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Remove isKey()
parent
463052c7
No related branches found
No related tags found
3 merge requests
!30
Release after RAL
,
!29
After 2nd RAL submission
,
!21
Resolve "follow core:#313"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/processor/processor_closeloop_icp.cpp
+6
-7
6 additions, 7 deletions
src/processor/processor_closeloop_icp.cpp
test/gtest_processor_odom_icp.cpp
+2
-8
2 additions, 8 deletions
test/gtest_processor_odom_icp.cpp
with
8 additions
and
15 deletions
src/processor/processor_closeloop_icp.cpp
+
6
−
7
View file @
77709a08
...
...
@@ -145,13 +145,12 @@ FrameBasePtrList ProcessorCloseloopIcp::selectCandidates(FrameBasePtr _keyframe_
//Consider only key_frames from 1 to n - match_past_key_frame_
// std::copy_if(frames.begin(), frames.end(), std::back_inserter(candidates), [&](FrameBasePtr _frame) { if(_frame->isKey()) {key_frames_counter++; return (key_frames_counter % match_past_key_frame_ == 0);
// }else{ return false;};});
for
(
auto
it
=
trajectory
->
rbegin
();
it
!=
trajectory
->
rend
();
it
++
){
if
((
*
it
)
->
isKey
()){
// WOLF_DEBUG("TIMESTAMP KEY FRAME ", (*it)->id(), " ", (*it)->getTimeStamp());
key_frames_counter
++
;
if
(
key_frames_counter
>
recent_key_frames_ignored_
and
(
_keyframe_ptr
->
getP
()
->
getState
()
-
(
*
it
)
->
getP
()
->
getState
()).
norm
()
<
laser_scan_params_
.
range_max_
)
candidates
.
push_back
(
*
it
);
}
for
(
auto
it
=
trajectory
->
rbegin
();
it
!=
trajectory
->
rend
();
it
++
)
{
// WOLF_DEBUG("TIMESTAMP KEY FRAME ", (*it)->id(), " ", (*it)->getTimeStamp());
key_frames_counter
++
;
if
(
key_frames_counter
>
recent_key_frames_ignored_
and
(
_keyframe_ptr
->
getP
()
->
getState
()
-
(
*
it
)
->
getP
()
->
getState
()).
norm
()
<
laser_scan_params_
.
range_max_
)
candidates
.
push_back
(
*
it
);
}
WOLF_DEBUG
(
"%%%%%%%%%%%%%%%%%% CANDIDATES SIZE "
,
candidates
.
size
());
return
candidates
;
...
...
This diff is collapsed.
Click to expand it.
test/gtest_processor_odom_icp.cpp
+
2
−
8
View file @
77709a08
...
...
@@ -160,20 +160,14 @@ TEST_F(ProcessorOdomIcp_Test, solve)
}
for
(
auto
F
:
*
problem
->
getTrajectory
())
{
if
(
F
->
isKey
())
F
->
perturb
(
0.5
);
}
F
->
perturb
(
0.5
);
std
::
string
report
=
solver
->
solve
(
SolverManager
::
ReportVerbosity
::
BRIEF
);
WOLF_TRACE
(
report
);
for
(
auto
F
:
*
problem
->
getTrajectory
())
{
if
(
F
->
isKey
())
{
ASSERT_MATRIX_APPROX
(
F
->
getState
().
vector
(
"PO"
)
,
x0
.
vector
(
"PO"
)
,
1e-6
);
}
ASSERT_MATRIX_APPROX
(
F
->
getState
().
vector
(
"PO"
)
,
x0
.
vector
(
"PO"
)
,
1e-6
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment