Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
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
gnss
Commits
ea1f4fed
Commit
ea1f4fed
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
more changes in sd
parent
6a36f645
No related branches found
No related tags found
3 merge requests
!28
release after RAL
,
!27
After 2nd RAL submission
,
!10
Resolve "GAUSS Project"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_gnss_single_diff.cpp
+15
-10
15 additions, 10 deletions
src/processor/processor_gnss_single_diff.cpp
with
15 additions
and
10 deletions
src/processor/processor_gnss_single_diff.cpp
+
15
−
10
View file @
ea1f4fed
...
...
@@ -22,8 +22,7 @@ ProcessorGnssSingleDiff::~ProcessorGnssSingleDiff()
void
ProcessorGnssSingleDiff
::
processCapture
(
CaptureBasePtr
_capture
)
{
// TODO: keep captures in a buffer and deal with KFpacks
WOLF_INFO
(
"ProcessorGnssSingleDiff::process()"
);
WOLF_DEBUG
(
"ProcessorGnssSingleDiff::process()"
);
incoming_capture_
=
std
::
static_pointer_cast
<
CaptureGnssSingleDiff
>
(
_capture
);
// discard capture with null or non-key origin frame
...
...
@@ -33,7 +32,7 @@ void ProcessorGnssSingleDiff::processCapture(CaptureBasePtr _capture)
return
;
}
if
(
last_KF_
==
nullptr
)
if
(
last_KF_
==
nullptr
&&
incoming_capture_
->
getOriginFrame
()
!=
nullptr
&&
incoming_capture_
->
getOriginFrame
()
->
isKey
()
)
last_KF_
=
incoming_capture_
->
getOriginFrame
();
// NEW KF? ------------------------------------------------
...
...
@@ -81,7 +80,7 @@ void ProcessorGnssSingleDiff::processCapture(CaptureBasePtr _capture)
incoming_capture_
->
getFrame
()
!=
nullptr
&&
incoming_capture_
->
getFrame
()
->
isKey
()
&&
incoming_capture_
->
getData
().
norm
()
>
params_gnss_
->
enu_map_init_dist_min
)
{
WOLF_
DEBUG
(
"initializing enu map"
);
WOLF_
INFO
(
"initializing enu map"
);
sensor_gnss_
->
initializeEnuMapYaw
(
incoming_capture_
->
getOriginFrame
()
->
getState
(),
incoming_capture_
->
getFrame
()
->
getState
(),
incoming_capture_
->
getData
());
...
...
@@ -111,17 +110,23 @@ bool ProcessorGnssSingleDiff::voteForKeyFrame()
// Elapsed time criterion: From the last KF with gnssfix capture
if
((
incoming_capture_
->
getTimeStamp
()
-
last_KF_
->
getTimeStamp
())
>
params_gnss_
->
time_th
)
return
true
;
{
WOLF_DEBUG
(
"voting for KF: elapsed time criterion"
);
return
true
;
}
// Distance criterion: From the last KF with gnssfix capture
Eigen
::
Vector2s
v_origin_current
=
(
sensor_gnss_
->
getREnuMap
().
transpose
()
*
sensor_gnss_
->
getREnuEcef
()
*
incoming_capture_
->
getData
()).
head
<
2
>
();
Eigen
::
Vector2s
v_lastKF_origin
=
incoming_capture_
->
getOriginFrame
()
->
getP
()
->
getState
()
-
last_KF_
->
getP
()
->
getState
();
//std::cout << "params_gnss_->dist_traveled" << params_gnss_->dist_traveled << std::endl;
//std::cout << "v_origin_current: " << v_origin_current.transpose() << std::endl;
//std::cout << "v_lastKF_origin: " << v_lastKF_origin.transpose() << std::endl;
//std::cout << "v_lastKF_origin + v_origin_current: " << (v_lastKF_origin + v_origin_current).transpose() << std::endl;
//std::cout << "params_gnss_->dist_traveled" << params_gnss_->dist_traveled << std::endl;
//std::cout << "v_origin_current: " << v_origin_current.transpose() << std::endl;
//std::cout << "v_lastKF_origin: " << v_lastKF_origin.transpose() << std::endl;
//std::cout << "v_lastKF_origin + v_origin_current: " << (v_lastKF_origin + v_origin_current).transpose() << std::endl;
if
((
v_lastKF_origin
+
v_origin_current
).
norm
()
>
params_gnss_
->
dist_traveled
)
return
true
;
{
WOLF_DEBUG
(
"voting for KF: distance criterion"
);
return
true
;
}
// TODO: more alternatives?
...
...
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