Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vision
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
vision
Commits
f1f49804
Commit
f1f49804
authored
1 year ago
by
Jongwon Lee
Browse files
Options
Downloads
Patches
Plain Diff
make changes compatible with new wolfcore for enabling multiple processors per capture
parent
356531e2
No related branches found
No related tags found
2 merge requests
!44
Devel
,
!43
Resolve "multiple processors per sensor"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_visual_odometry.cpp
+11
-9
11 additions, 9 deletions
src/processor/processor_visual_odometry.cpp
with
11 additions
and
9 deletions
src/processor/processor_visual_odometry.cpp
+
11
−
9
View file @
f1f49804
...
@@ -434,7 +434,7 @@ void ProcessorVisualOdometry::establishFactors()
...
@@ -434,7 +434,7 @@ void ProcessorVisualOdometry::establishFactors()
LandmarkBasePtr
associated_lmk
=
nullptr
;
LandmarkBasePtr
associated_lmk
=
nullptr
;
for
(
auto
lmk
:
getProblem
()
->
getMap
()
->
getLandmarkList
())
for
(
auto
lmk
:
getProblem
()
->
getMap
()
->
getLandmarkList
())
{
{
if
(
lmk
->
i
d
()
==
feat_pi
->
trackId
()){
if
(
lmk
->
trackI
d
()
==
feat_pi
->
trackId
()){
associated_lmk
=
lmk
;
associated_lmk
=
lmk
;
}
}
}
}
...
@@ -444,11 +444,14 @@ void ProcessorVisualOdometry::establishFactors()
...
@@ -444,11 +444,14 @@ void ProcessorVisualOdometry::establishFactors()
if
(
associated_lmk
)
if
(
associated_lmk
)
{
{
LandmarkHpPtr
associated_lmk_hp
=
std
::
dynamic_pointer_cast
<
LandmarkHp
>
(
associated_lmk
);
LandmarkHpPtr
associated_lmk_hp
=
std
::
dynamic_pointer_cast
<
LandmarkHp
>
(
associated_lmk
);
FactorBase
::
emplace
<
FactorPixelHp
>
(
feat_pi
,
feat_pi
,
if
(
associated_lmk_hp
)
{
associated_lmk_hp
,
FactorBase
::
emplace
<
FactorPixelHp
>
(
feat_pi
,
shared_from_this
(),
feat_pi
,
params_visual_odometry_
->
apply_loss_function
);
associated_lmk_hp
,
shared_from_this
(),
params_visual_odometry_
->
apply_loss_function
);
}
}
}
// 2) create landmark if track is not associated with one and has enough length
// 2) create landmark if track is not associated with one and has enough length
...
@@ -456,7 +459,6 @@ void ProcessorVisualOdometry::establishFactors()
...
@@ -456,7 +459,6 @@ void ProcessorVisualOdometry::establishFactors()
{
{
// std::cout << "NEW valid track \\o/" << std::endl;
// std::cout << "NEW valid track \\o/" << std::endl;
LandmarkBasePtr
lmk
=
emplaceLandmark
(
feat_pi
);
LandmarkBasePtr
lmk
=
emplaceLandmark
(
feat_pi
);
lmk
->
setId
(
feat_pi
->
trackId
());
// Add factors from all KFs of this track to the new lmk
// Add factors from all KFs of this track to the new lmk
Track
track_kf
=
track_matrix_
.
trackAtKeyframes
(
feat
->
trackId
());
Track
track_kf
=
track_matrix_
.
trackAtKeyframes
(
feat
->
trackId
());
...
@@ -513,8 +515,8 @@ LandmarkBasePtr ProcessorVisualOdometry::emplaceLandmark(FeatureBasePtr _feat)
...
@@ -513,8 +515,8 @@ LandmarkBasePtr ProcessorVisualOdometry::emplaceLandmark(FeatureBasePtr _feat)
// Set all IDs equal to track ID
// Set all IDs equal to track ID
size_t
track_id
=
_feat
->
trackId
();
size_t
track_id
=
_feat
->
trackId
();
lmk_hp_ptr
->
setId
(
track_id
);
lmk_hp_ptr
->
set
Track
Id
(
track_id
);
_feat
->
setLandmarkId
(
track_id
);
_feat
->
setLandmarkId
(
lmk_hp_ptr
->
id
()
);
return
lmk_hp_ptr
;
return
lmk_hp_ptr
;
}
}
...
...
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