Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
wolf
Commits
232d361e
Commit
232d361e
authored
2 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
taking only needed measure and covariance
parent
a508947c
No related branches found
No related tags found
1 merge request
!466
devel->main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_tracker_feature_landmark_external.cpp
+22
-2
22 additions, 2 deletions
...processor/processor_tracker_feature_landmark_external.cpp
with
22 additions
and
2 deletions
src/processor/processor_tracker_feature_landmark_external.cpp
+
22
−
2
View file @
232d361e
...
@@ -43,6 +43,7 @@ void ProcessorTrackerFeatureLandmarkExternal::preProcess()
...
@@ -43,6 +43,7 @@ void ProcessorTrackerFeatureLandmarkExternal::preProcess()
{
{
assert
(
unmatched_detections_incoming_
.
empty
());
assert
(
unmatched_detections_incoming_
.
empty
());
auto
dim
=
getProblem
()
->
getDim
();
auto
cap_landmarks
=
std
::
dynamic_pointer_cast
<
CaptureLandmarksExternal
>
(
incoming_ptr_
);
auto
cap_landmarks
=
std
::
dynamic_pointer_cast
<
CaptureLandmarksExternal
>
(
incoming_ptr_
);
if
(
not
cap_landmarks
)
if
(
not
cap_landmarks
)
throw
std
::
runtime_error
(
"ProcessorTrackerFeatureLandmarkExternal::preProcess incoming_ptr_ should be of type 'CaptureLandmarksExternal'"
);
throw
std
::
runtime_error
(
"ProcessorTrackerFeatureLandmarkExternal::preProcess incoming_ptr_ should be of type 'CaptureLandmarksExternal'"
);
...
@@ -57,10 +58,29 @@ void ProcessorTrackerFeatureLandmarkExternal::preProcess()
...
@@ -57,10 +58,29 @@ void ProcessorTrackerFeatureLandmarkExternal::preProcess()
or
ids
.
count
(
detection
.
id
))
or
ids
.
count
(
detection
.
id
))
continue
;
continue
;
Eigen
::
VectorXd
meas
;
Eigen
::
MatrixXd
cov
;
if
(
not
params_tfle_
->
use_orientation
)
{
assert
(
detection
.
measure
.
size
()
>=
dim
);
assert
(
detection
.
covariance
.
rows
()
>=
dim
and
detection
.
covariance
.
rows
()
==
detection
.
covariance
.
cols
());
meas
=
detection
.
measure
.
head
(
dim
);
cov
=
detection
.
covariance
.
topLeftCorner
(
dim
,
dim
);
}
else
{
assert
(
detection
.
measure
.
size
()
==
(
dim
==
2
?
3
:
7
));
assert
(
detection
.
covariance
.
rows
()
==
(
dim
==
2
?
3
:
6
)
and
detection
.
covariance
.
rows
()
==
detection
.
covariance
.
cols
());
meas
=
detection
.
measure
;
cov
=
detection
.
covariance
;
}
FeatureBasePtr
ftr
=
FeatureBase
::
emplace
<
FeatureBase
>
(
cap_landmarks
,
FeatureBasePtr
ftr
=
FeatureBase
::
emplace
<
FeatureBase
>
(
cap_landmarks
,
"FeatureLandmarkExternal"
,
"FeatureLandmarkExternal"
,
detection
.
meas
ure
,
meas
,
detection
.
covariance
);
cov
);
ftr
->
setLandmarkId
(
detection
.
id
);
ftr
->
setLandmarkId
(
detection
.
id
);
if
(
detection
.
id
!=
-
1
and
detection
.
id
!=
0
)
if
(
detection
.
id
!=
-
1
and
detection
.
id
!=
0
)
...
...
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