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
8107c98b
Commit
8107c98b
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
WIP
parent
7c05241f
No related branches found
No related tags found
1 merge request
!400
Draft: Resolve "Calibration drift factor creation in processorMotion"
Pipeline
#8615
failed
3 years ago
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/sensor/sensor_base.h
+26
-5
26 additions, 5 deletions
include/core/sensor/sensor_base.h
src/processor/processor_motion.cpp
+2
-1
2 additions, 1 deletion
src/processor/processor_motion.cpp
with
28 additions
and
6 deletions
include/core/sensor/sensor_base.h
+
26
−
5
View file @
8107c98b
...
@@ -64,9 +64,6 @@ SensorBasePtr create(const std::string& _unique_name, const Eigen::VectorXd& _ex
...
@@ -64,9 +64,6 @@ SensorBasePtr create(const std::string& _unique_name, const Eigen::VectorXd& _ex
return sensor; \
return sensor; \
} \
} \
/** \brief base struct for intrinsic sensor parameters
/** \brief base struct for intrinsic sensor parameters
*
*
* Derive from this struct to create structs of sensor intrinsic parameters.
* Derive from this struct to create structs of sensor intrinsic parameters.
...
@@ -74,11 +71,30 @@ SensorBasePtr create(const std::string& _unique_name, const Eigen::VectorXd& _ex
...
@@ -74,11 +71,30 @@ SensorBasePtr create(const std::string& _unique_name, const Eigen::VectorXd& _ex
struct
ParamsSensorBase
:
public
ParamsBase
struct
ParamsSensorBase
:
public
ParamsBase
{
{
std
::
string
prefix
=
"sensor/"
;
std
::
string
prefix
=
"sensor/"
;
// Intrinsic dynamic and drift
bool
intrinsic_dynamic
;
bool
intrinsic_drift
;
Eigen
::
MatrixXd
intrinsic_drift_cov
;
ParamsSensorBase
(
std
::
string
_unique_name
,
const
wolf
::
ParamsServer
&
_server
)
:
ParamsBase
(
_unique_name
,
_server
)
{
// Intrinsics dynamic
intrinsic_dynamic
=
_server
.
getParam
<
bool
>
(
prefix
+
_unique_name
+
"/intrinsic_dynamic"
);
intrinsic_drift
=
_server
.
getParam
<
bool
>
(
prefix
+
_unique_name
+
"/intrinsic_drift"
);
if
(
intrinsic_drift
)
intrinsic_drift_cov
=
_server
.
getParam
<
Eigen
::
VectorXd
>
(
prefix
+
_unique_name
+
"/intrinsic_drift_sigma"
).
square
().
asDiagonal
();
}
~
ParamsSensorBase
()
override
=
default
;
~
ParamsSensorBase
()
override
=
default
;
using
ParamsBase
::
ParamsBase
;
std
::
string
print
()
const
std
::
string
print
()
const
{
{
return
""
;
return
"
\n
"
+
ParamsBase
::
print
()
+
"
\n
"
+
"intrinsic_dynamic: "
+
std
::
to_string
(
intrinsic_dynamic
)
+
"
\n
"
+
"intrinsic_drift: "
+
std
::
to_string
(
intrinsic_drift
)
+
"
\n
"
+
(
intrinsic_drift
?
"intrinsic_drift_cov: "
+
std
::
to_string
(
intrinsic_drift_cov
)
:
""
);
}
}
};
};
...
@@ -195,6 +211,11 @@ class SensorBase : public NodeBase, public HasStateBlocks, public std::enable_sh
...
@@ -195,6 +211,11 @@ class SensorBase : public NodeBase, public HasStateBlocks, public std::enable_sh
StateBlockPtr
getO
()
const
;
StateBlockPtr
getO
()
const
;
StateBlockPtr
getIntrinsic
()
const
;
StateBlockPtr
getIntrinsic
()
const
;
virtual
const
MatrixXd
&
getIntrinsicDriftCov
()
const
final
{
return
params_
->
intrinsic_drift_cov
;
}
protected
:
protected
:
void
removeStateBlocks
();
void
removeStateBlocks
();
virtual
void
registerNewStateBlocks
()
const
;
virtual
void
registerNewStateBlocks
()
const
;
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_motion.cpp
+
2
−
1
View file @
8107c98b
...
@@ -962,7 +962,8 @@ PackKeyFramePtr ProcessorMotion::computeProcessingStep()
...
@@ -962,7 +962,8 @@ PackKeyFramePtr ProcessorMotion::computeProcessingStep()
return
nullptr
;
return
nullptr
;
}
}
void
ProcessorMotion
::
emplaceCalibrationDriftFactor
(
CaptureMotionPtr
_cap_motion
){
void
ProcessorMotion
::
emplaceCalibrationDriftFactor
(
CaptureMotionPtr
_cap_motion
)
{
MatrixXd
cov_continuous
=
getSensor
()
->
getCalibrationDriftCov
();
MatrixXd
cov_continuous
=
getSensor
()
->
getCalibrationDriftCov
();
if
(
cov_continuous
.
size
()
==
0
){
if
(
cov_continuous
.
size
()
==
0
){
WOLF_TRACE
(
"SensorBase calib_drift_cov_ not initialized"
)
WOLF_TRACE
(
"SensorBase calib_drift_cov_ not initialized"
)
...
...
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