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
816da2c4
Commit
816da2c4
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
c85900ae
No related branches found
No related tags found
1 merge request
!411
Draft: Resolve "SensorBase: extrinsic and intrinsic initialization and prior"
Pipeline
#8612
failed
3 years ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/core/sensor/sensor_base.h
+22
-0
22 additions, 0 deletions
include/core/sensor/sensor_base.h
with
22 additions
and
0 deletions
include/core/sensor/sensor_base.h
+
22
−
0
View file @
816da2c4
...
@@ -155,6 +155,28 @@ struct ParamsSensorBase: public ParamsBase
...
@@ -155,6 +155,28 @@ struct ParamsSensorBase: public ParamsBase
~
ParamsSensorBase
()
override
=
default
;
~
ParamsSensorBase
()
override
=
default
;
void
getStateBlockPrior
(
const
ParamsServer
&
_server
,
const
std
::
string
&
_unique_name
,
const
char
_key
,
bool
_mandatory
=
false
)
{
try
{
state_blocks
.
emplace
(
_key
,
ParamsStateBlock
());
state_blocks
[
_key
].
state
=
_server
.
getParam
<
Eigen
::
VectorXd
>
(
prefix
+
_unique_name
+
"/"
+
std
::
to_string
(
_key
)
+
"/state"
);
state_blocks
[
_key
].
prior_mode
=
_server
.
getParam
<
std
::
string
>
(
prefix
+
_unique_name
+
"/"
+
std
::
to_string
(
_key
)
+
"/prior_mode"
);
state_blocks
[
_key
].
dynamic
=
_server
.
getParam
<
bool
>
(
prefix
+
_unique_name
+
"/"
+
std
::
to_string
(
_key
)
+
"/is_dynamic"
);
if
(
state_blocks
[
_key
].
prior_mode
==
"factor"
)
state_blocks
[
_key
].
sigma
=
_server
.
getParam
<
Eigen
::
VectorXd
>
(
prefix
+
_unique_name
+
"/"
+
std
::
to_string
(
_key
)
+
"/sigma"
);
assert
((
state_blocks
[
_key
].
prior_mode
==
"initial_guess"
or
state_blocks
[
_key
].
prior_mode
==
"fix"
or
state_blocks
[
_key
].
prior_mode
==
"factor"
)
and
"wrong prior_mode value, it should be: 'initial_guess', 'fix' or 'factor'"
);
}
catch
(...)
{
if
(
_mandatory
)
throw
std
::
runtime_error
(
"Prior for state block "
+
std
::
to_string
(
_key
)
+
" not found"
);
}
}
std
::
string
print
()
const
override
std
::
string
print
()
const
override
{
{
return
""
;
return
""
;
...
...
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