Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
objectslam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
plugins
objectslam
Commits
2f4b1db2
Commit
2f4b1db2
authored
2 years ago
by
ydepledt
Browse files
Options
Downloads
Patches
Plain Diff
Code refactored
parent
29afdd27
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/objectslam/processor/processor_tracker_landmark_object.h
+0
-6
0 additions, 6 deletions
.../objectslam/processor/processor_tracker_landmark_object.h
src/processor/processor_tracker_landmark_object.cpp
+7
-26
7 additions, 26 deletions
src/processor/processor_tracker_landmark_object.cpp
with
7 additions
and
32 deletions
include/objectslam/processor/processor_tracker_landmark_object.h
+
0
−
6
View file @
2f4b1db2
...
...
@@ -110,13 +110,7 @@ class ProcessorTrackerLandmarkObject : public ProcessorTrackerLandmark
std
::
pair
<
double
,
double
>
errorsComputations
(
Eigen
::
Isometry3d
_w_M_f
,
std
::
shared_ptr
<
wolf
::
LandmarkObject
>
_lmk_obj
);
Eigen
::
Isometry3d
getw_M_r
();
Eigen
::
Isometry3d
getr_M_c
();
Eigen
::
Isometry3d
getc_M_f
(
FeatureBasePtr
_feat
);
unsigned
int
multiviewTypeMatching
(
const
CaptureBasePtr
&
_capture
,
FeatureBasePtrList
&
_features_out_last
,
FeatureBasePtrList
&
_features_out_incoming
);
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_tracker_landmark_object.cpp
+
7
−
26
View file @
2f4b1db2
...
...
@@ -225,16 +225,18 @@ unsigned int ProcessorTrackerLandmarkObject::firstLmkMatching(const LandmarkBase
}
// world to rob
Eigen
::
Isometry3d
w_M_r
=
posevec_to_isometry
(
getLast
()
->
getFrame
()
->
getStateVector
());
Eigen
::
Isometry3d
w_M_r
=
posevec_to_isometry
(
getLast
()
->
getFrame
()
->
getStateVector
(
"PO"
));
// rob to sensor
Eigen
::
Isometry3d
r_M_c
=
posevec_to_isometry
(
getSensor
()
->
getStateVector
());
Eigen
::
Isometry3d
r_M_c
=
posevec_to_isometry
(
getSensor
()
->
getStateVector
(
"PO"
));
for
(
auto
feat
:
detections_incoming_
)
{
std
::
string
object_type
=
std
::
static_pointer_cast
<
FeatureObject
>
(
feat
)
->
getObjectType
();
// camera to feat
Eigen
::
Isometry3d
c_M_f
=
getc_M_f
(
feat
);
Eigen
::
Isometry3d
c_M_f
=
posevec_to_isometry
(
feat
->
getMeasurement
()
);
if
(
feat
->
getCapture
()
!=
nullptr
){
break
;
...
...
@@ -265,27 +267,6 @@ unsigned int ProcessorTrackerLandmarkObject::firstLmkMatching(const LandmarkBase
return
_features_out
.
size
();
}
Eigen
::
Isometry3d
ProcessorTrackerLandmarkObject
::
getw_M_r
()
{
Vector3d
pos_rob
=
getLast
()
->
getFrame
()
->
getP
()
->
getState
();
Quaterniond
quat_rob
(
getLast
()
->
getFrame
()
->
getO
()
->
getState
().
data
());
return
Eigen
::
Translation
<
double
,
3
>
(
pos_rob
.
head
(
3
))
*
quat_rob
;
}
Eigen
::
Isometry3d
ProcessorTrackerLandmarkObject
::
getr_M_c
()
{
Vector3d
pos_sen
=
getSensor
()
->
getP
()
->
getState
();
Quaterniond
quat_sen
(
getSensor
()
->
getO
()
->
getState
().
data
());
return
Eigen
::
Translation
<
double
,
3
>
(
pos_sen
.
head
(
3
))
*
quat_sen
;
}
Eigen
::
Isometry3d
ProcessorTrackerLandmarkObject
::
getc_M_f
(
FeatureBasePtr
_feat
)
{
Vector3d
pos_obj
=
_feat
->
getMeasurement
().
head
(
3
);
Quaterniond
quat_obj
(
_feat
->
getMeasurement
().
tail
(
4
).
data
());
return
Eigen
::
Translation
<
double
,
3
>
(
pos_obj
)
*
quat_obj
;
}
std
::
pair
<
double
,
double
>
ProcessorTrackerLandmarkObject
::
errorsComputations
(
Eigen
::
Isometry3d
_w_M_f
,
std
::
shared_ptr
<
wolf
::
LandmarkObject
>
_lmk_obj
)
{
Quaterniond
quat_feat
;
...
...
@@ -315,9 +296,9 @@ unsigned int ProcessorTrackerLandmarkObject::bestLmkMatching(const LandmarkBaseP
}
// world to rob
Eigen
::
Isometry3d
w_M_r
=
posevec_to_isometry
(
getLast
()
->
getFrame
()
->
getStateVector
());
Eigen
::
Isometry3d
w_M_r
=
posevec_to_isometry
(
getLast
()
->
getFrame
()
->
getStateVector
(
"PO"
));
// rob to sensor
Eigen
::
Isometry3d
r_M_c
=
posevec_to_isometry
(
getSensor
()
->
getStateVector
());
Eigen
::
Isometry3d
r_M_c
=
posevec_to_isometry
(
getSensor
()
->
getStateVector
(
"PO"
));
if
(
_landmarks_in
.
size
()
==
0
)
return
_features_out
.
size
();
...
...
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