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
e325ba60
Commit
e325ba60
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
small bug fixed
parent
ce1b8f56
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_gnss_fix.cpp
+5
-10
5 additions, 10 deletions
src/processor/processor_gnss_fix.cpp
with
5 additions
and
10 deletions
src/processor/processor_gnss_fix.cpp
+
5
−
10
View file @
e325ba60
...
@@ -24,15 +24,9 @@ ProcessorGnssFix::~ProcessorGnssFix()
...
@@ -24,15 +24,9 @@ ProcessorGnssFix::~ProcessorGnssFix()
void
ProcessorGnssFix
::
processCapture
(
CaptureBasePtr
_capture_ptr
)
void
ProcessorGnssFix
::
processCapture
(
CaptureBasePtr
_capture_ptr
)
{
{
// TODO: keep captures in a buffer and deal with KFpacks
// TODO: keep captures in a buffer and deal with KFpacks
//WOLF_DEBUG("ProcessorGnssFix::process()");
//WOLF_DEBUG("ProcessorGnssFix::process()");
last_capture_ptr_
=
std
::
static_pointer_cast
<
CaptureGnssFix
>
(
_capture_ptr
);
last_capture_ptr_
=
std
::
static_pointer_cast
<
CaptureGnssFix
>
(
_capture_ptr
);
// DEBUGGING ENU_ECEF
//Eigen::Vector3s p = last_capture_ptr_->getData();
//Eigen::Vector3s p_enu = sensor_gnss_ptr_->getREnuEcef()*p + sensor_gnss_ptr_->gettEnuEcef();
//std::cout << "WOLF: gnss fix in ENU coordinates: " << p_enu.transpose() << std::endl;
FrameBasePtr
new_frame_ptr
=
nullptr
;
FrameBasePtr
new_frame_ptr
=
nullptr
;
FactorBasePtr
new_fac
=
nullptr
;
FactorBasePtr
new_fac
=
nullptr
;
...
@@ -58,7 +52,7 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
...
@@ -58,7 +52,7 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
_capture_ptr
->
link
(
new_frame_ptr
);
// Add incoming Capture to the new Frame
_capture_ptr
->
link
(
new_frame_ptr
);
// Add incoming Capture to the new Frame
// EMPLACE FEATURES
// EMPLACE FEATURES
//
WOLF_DEBUG( "PR ", getName()," - emplacing the feature...");
WOLF_DEBUG
(
"PR "
,
getName
(),
" - emplacing the feature..."
);
auto
ftr_ptr
=
FeatureBase
::
emplace
<
FeatureGnssFix
>
(
last_capture_ptr_
,
last_capture_ptr_
->
getData
(),
last_capture_ptr_
->
getDataCovariance
());
auto
ftr_ptr
=
FeatureBase
::
emplace
<
FeatureGnssFix
>
(
last_capture_ptr_
,
last_capture_ptr_
->
getData
(),
last_capture_ptr_
->
getDataCovariance
());
// EMPLACE FACTOR
// EMPLACE FACTOR
...
@@ -74,11 +68,12 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
...
@@ -74,11 +68,12 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
last_gnss_fix_KF_
=
new_frame_ptr
;
last_gnss_fix_KF_
=
new_frame_ptr
;
}
}
//
INITIALIZE
ENU IF:
//
SET ECEF_
ENU IF:
// 1 - not initialized
// 1 - not initialized
// 2 - factor established
// 2 - factor established
if
(
!
sensor_gnss_ptr_
->
isEnuDefined
()
&&
new_fac
!=
nullptr
)
if
(
!
sensor_gnss_ptr_
->
isEnuDefined
()
&&
new_fac
!=
nullptr
)
{
{
WOLF_DEBUG
(
"setting ecef enu"
);
sensor_gnss_ptr_
->
setEcefEnu
(
last_capture_ptr_
->
getData
());
sensor_gnss_ptr_
->
setEcefEnu
(
last_capture_ptr_
->
getData
());
// Store the first capture that established a factor
// Store the first capture that established a factor
...
@@ -93,10 +88,10 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
...
@@ -93,10 +88,10 @@ void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
if
(
sensor_gnss_ptr_
->
isEnuDefined
()
&&
if
(
sensor_gnss_ptr_
->
isEnuDefined
()
&&
!
sensor_gnss_ptr_
->
isEnuMapInitialized
()
&&
!
sensor_gnss_ptr_
->
isEnuMapInitialized
()
&&
new_fac
!=
nullptr
&&
new_fac
!=
nullptr
&&
first_capture_ptr_
->
getFrame
()
!=
nullptr
&&
last_capture_ptr_
->
getFrame
()
!=
nullptr
&&
first_capture_ptr_
!=
nullptr
&&
first_capture_ptr_
->
getFrame
()
!=
nullptr
&&
last_capture_ptr_
->
getFrame
()
!=
nullptr
&&
(
first_capture_ptr_
->
getFrame
()
->
getState
()
-
last_capture_ptr_
->
getFrame
()
->
getState
()).
norm
()
>
params_gnss_
->
enu_map_init_dist_min
)
(
first_capture_ptr_
->
getFrame
()
->
getState
()
-
last_capture_ptr_
->
getFrame
()
->
getState
()).
norm
()
>
params_gnss_
->
enu_map_init_dist_min
)
{
{
std
::
cout
<<
"initializing enu map
\n
"
;
WOLF_DEBUG
(
"initializing enu map"
)
;
sensor_gnss_ptr_
->
initializeEnuMap
(
first_capture_ptr_
->
getFrame
()
->
getState
(),
first_capture_ptr_
->
getData
(),
sensor_gnss_ptr_
->
initializeEnuMap
(
first_capture_ptr_
->
getFrame
()
->
getState
(),
first_capture_ptr_
->
getData
(),
last_capture_ptr_
->
getFrame
()
->
getState
(),
last_capture_ptr_
->
getData
());
last_capture_ptr_
->
getFrame
()
->
getState
(),
last_capture_ptr_
->
getData
());
}
}
...
...
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