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
5af8c397
Commit
5af8c397
authored
1 year ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
capture_landmark_external added field type
parent
e1960086
No related branches found
No related tags found
3 merge requests
!476
spdlog version upgrade
,
!473
Rerefactor
,
!472
Merge ProcessorLandmarkExternal
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/capture/capture_landmarks_external.h
+27
-18
27 additions, 18 deletions
include/core/capture/capture_landmarks_external.h
src/capture/capture_landmarks_external.cpp
+4
-3
4 additions, 3 deletions
src/capture/capture_landmarks_external.cpp
with
31 additions
and
21 deletions
include/core/capture/capture_landmarks_external.h
+
27
−
18
View file @
5af8c397
...
@@ -21,41 +21,50 @@
...
@@ -21,41 +21,50 @@
//--------LICENSE_END--------
//--------LICENSE_END--------
#pragma once
#pragma once
//Wolf includes
//
Wolf includes
#include
"core/capture/capture_base.h"
#include
"core/capture/capture_base.h"
namespace
wolf
{
namespace
wolf
{
struct
LandmarkDetection
struct
LandmarkDetection
{
{
int
id
;
// id of landmark
int
id
;
// id of landmark
int
type
;
// type of landmark
Eigen
::
VectorXd
measure
;
// either pose or position
Eigen
::
VectorXd
measure
;
// either pose or position
Eigen
::
MatrixXd
covariance
;
// covariance of the measure
Eigen
::
MatrixXd
covariance
;
// covariance of the measure
double
quality
;
// [0, 1] quality of the detection
double
quality
;
// [0, 1] quality of the detection
};
};
WOLF_PTR_TYPEDEFS
(
CaptureLandmarksExternal
);
WOLF_PTR_TYPEDEFS
(
CaptureLandmarksExternal
);
//class CaptureLandmarksExternal
//
class CaptureLandmarksExternal
class
CaptureLandmarksExternal
:
public
CaptureBase
class
CaptureLandmarksExternal
:
public
CaptureBase
{
{
protected:
protected:
std
::
vector
<
LandmarkDetection
>
detections_
;
std
::
vector
<
LandmarkDetection
>
detections_
;
public:
CaptureLandmarksExternal
(
const
TimeStamp
&
_ts
,
public:
SensorBasePtr
_sensor_ptr
,
CaptureLandmarksExternal
(
const
TimeStamp
&
_ts
,
const
std
::
vector
<
int
>&
_ids
=
{},
SensorBasePtr
_sensor_ptr
,
const
std
::
vector
<
Eigen
::
VectorXd
>&
_detections
=
{},
const
std
::
vector
<
int
>&
_ids
=
{},
const
std
::
vector
<
Eigen
::
MatrixXd
>&
_covs
=
{},
const
std
::
vector
<
int
>&
_types
=
{},
const
std
::
vector
<
double
>&
_qualities
=
{});
const
std
::
vector
<
Eigen
::
VectorXd
>&
_detections
=
{},
const
std
::
vector
<
Eigen
::
MatrixXd
>&
_covs
=
{},
const
std
::
vector
<
double
>&
_qualities
=
{});
~
CaptureLandmarksExternal
()
override
;
~
CaptureLandmarksExternal
()
override
;
std
::
vector
<
LandmarkDetection
>
getDetections
()
const
{
return
detections_
;};
std
::
vector
<
LandmarkDetection
>
getDetections
()
const
{
return
detections_
;
};
void
addDetection
(
const
int
&
_id
,
const
Eigen
::
VectorXd
&
_detection
,
const
Eigen
::
MatrixXd
&
_cov
,
const
double
&
quality
);
void
addDetection
(
const
int
&
_id
,
const
int
&
_type
,
const
Eigen
::
VectorXd
&
_detection
,
const
Eigen
::
MatrixXd
&
_cov
,
const
double
&
quality
);
};
};
}
//namespace wolf
}
//
namespace wolf
This diff is collapsed.
Click to expand it.
src/capture/capture_landmarks_external.cpp
+
4
−
3
View file @
5af8c397
...
@@ -26,6 +26,7 @@ namespace wolf{
...
@@ -26,6 +26,7 @@ namespace wolf{
CaptureLandmarksExternal
::
CaptureLandmarksExternal
(
const
TimeStamp
&
_ts
,
CaptureLandmarksExternal
::
CaptureLandmarksExternal
(
const
TimeStamp
&
_ts
,
SensorBasePtr
_sensor_ptr
,
SensorBasePtr
_sensor_ptr
,
const
std
::
vector
<
int
>&
_ids
,
const
std
::
vector
<
int
>&
_ids
,
const
std
::
vector
<
int
>&
_types
,
const
std
::
vector
<
Eigen
::
VectorXd
>&
_detections
,
const
std
::
vector
<
Eigen
::
VectorXd
>&
_detections
,
const
std
::
vector
<
Eigen
::
MatrixXd
>&
_covs
,
const
std
::
vector
<
Eigen
::
MatrixXd
>&
_covs
,
const
std
::
vector
<
double
>&
_qualities
)
:
const
std
::
vector
<
double
>&
_qualities
)
:
...
@@ -37,7 +38,7 @@ CaptureLandmarksExternal::CaptureLandmarksExternal(const TimeStamp& _ts,
...
@@ -37,7 +38,7 @@ CaptureLandmarksExternal::CaptureLandmarksExternal(const TimeStamp& _ts,
throw
std
::
runtime_error
(
"CaptureLandmarksExternal constructor: '_ids', '_detections', '_covs', '_qualities' should have the same size."
);
throw
std
::
runtime_error
(
"CaptureLandmarksExternal constructor: '_ids', '_detections', '_covs', '_qualities' should have the same size."
);
for
(
auto
i
=
0
;
i
<
_detections
.
size
();
i
++
)
for
(
auto
i
=
0
;
i
<
_detections
.
size
();
i
++
)
addDetection
(
_ids
.
at
(
i
),
_detections
.
at
(
i
),
_covs
.
at
(
i
),
_qualities
.
at
(
i
));
addDetection
(
_ids
.
at
(
i
),
_types
.
at
(
i
),
_detections
.
at
(
i
),
_covs
.
at
(
i
),
_qualities
.
at
(
i
));
}
}
CaptureLandmarksExternal
::~
CaptureLandmarksExternal
()
CaptureLandmarksExternal
::~
CaptureLandmarksExternal
()
...
@@ -45,9 +46,9 @@ CaptureLandmarksExternal::~CaptureLandmarksExternal()
...
@@ -45,9 +46,9 @@ CaptureLandmarksExternal::~CaptureLandmarksExternal()
//
//
}
}
void
CaptureLandmarksExternal
::
addDetection
(
const
int
&
_id
,
const
Eigen
::
VectorXd
&
_detection
,
const
Eigen
::
MatrixXd
&
_cov
,
const
double
&
_quality
)
void
CaptureLandmarksExternal
::
addDetection
(
const
int
&
_id
,
const
int
&
_type
,
const
Eigen
::
VectorXd
&
_detection
,
const
Eigen
::
MatrixXd
&
_cov
,
const
double
&
_quality
)
{
{
detections_
.
push_back
(
LandmarkDetection
{
_id
,
_detection
,
_cov
,
_quality
});
detections_
.
push_back
(
LandmarkDetection
{
_id
,
_type
,
_detection
,
_cov
,
_quality
});
}
}
}
// namespace wolf
}
// namespace wolf
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