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
791a4d79
Commit
791a4d79
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add intrinsic_dynamic flag
parent
6e0ad3f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!123
Calibration
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sensor_base.cpp
+16
-4
16 additions, 4 deletions
src/sensor_base.cpp
src/sensor_base.h
+16
-2
16 additions, 2 deletions
src/sensor_base.h
with
32 additions
and
6 deletions
src/sensor_base.cpp
+
16
−
4
View file @
791a4d79
...
@@ -6,14 +6,20 @@ namespace wolf {
...
@@ -6,14 +6,20 @@ namespace wolf {
unsigned
int
SensorBase
::
sensor_id_count_
=
0
;
unsigned
int
SensorBase
::
sensor_id_count_
=
0
;
SensorBase
::
SensorBase
(
const
std
::
string
&
_type
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
SensorBase
::
SensorBase
(
const
std
::
string
&
_type
,
const
unsigned
int
_noise_size
,
const
bool
_extr_dyn
)
:
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
const
unsigned
int
_noise_size
,
const
bool
_extr_dyn
,
const
bool
_intr_dyn
)
:
NodeBase
(
"SENSOR"
,
_type
),
NodeBase
(
"SENSOR"
,
_type
),
hardware_ptr_
(),
hardware_ptr_
(),
state_block_vec_
(
3
),
// allow for 3 state blocks by default. Resize in derived constructors if needed.
state_block_vec_
(
3
),
// allow for 3 state blocks by default. Resize in derived constructors if needed.
is_removing_
(
false
),
is_removing_
(
false
),
sensor_id_
(
++
sensor_id_count_
),
// simple ID factory
sensor_id_
(
++
sensor_id_count_
),
// simple ID factory
extrinsic_dynamic_
(
_extr_dyn
),
extrinsic_dynamic_
(
_extr_dyn
),
intrinsic_dynamic_
(
_intr_dyn
),
noise_std_
(
_noise_size
),
noise_std_
(
_noise_size
),
noise_cov_
(
_noise_size
,
_noise_size
)
noise_cov_
(
_noise_size
,
_noise_size
)
{
{
...
@@ -24,14 +30,20 @@ SensorBase::SensorBase(const std::string& _type, StateBlockPtr _p_ptr, StateBloc
...
@@ -24,14 +30,20 @@ SensorBase::SensorBase(const std::string& _type, StateBlockPtr _p_ptr, StateBloc
//
//
}
}
SensorBase
::
SensorBase
(
const
std
::
string
&
_type
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
SensorBase
::
SensorBase
(
const
std
::
string
&
_type
,
const
Eigen
::
VectorXs
&
_noise_std
,
const
bool
_extr_dyn
)
:
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
const
Eigen
::
VectorXs
&
_noise_std
,
const
bool
_extr_dyn
,
const
bool
_intr_dyn
)
:
NodeBase
(
"SENSOR"
,
_type
),
NodeBase
(
"SENSOR"
,
_type
),
hardware_ptr_
(),
hardware_ptr_
(),
state_block_vec_
(
6
),
// allow for 3 state blocks by default. Resize in derived constructors if needed.
state_block_vec_
(
6
),
// allow for 3 state blocks by default. Resize in derived constructors if needed.
is_removing_
(
false
),
is_removing_
(
false
),
sensor_id_
(
++
sensor_id_count_
),
// simple ID factory
sensor_id_
(
++
sensor_id_count_
),
// simple ID factory
extrinsic_dynamic_
(
_extr_dyn
),
extrinsic_dynamic_
(
_extr_dyn
),
intrinsic_dynamic_
(
_intr_dyn
),
noise_std_
(
_noise_std
),
noise_std_
(
_noise_std
),
noise_cov_
(
_noise_std
.
size
(),
_noise_std
.
size
())
noise_cov_
(
_noise_std
.
size
(),
_noise_std
.
size
())
{
{
...
...
This diff is collapsed.
Click to expand it.
src/sensor_base.h
+
16
−
2
View file @
791a4d79
...
@@ -41,6 +41,7 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
...
@@ -41,6 +41,7 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
unsigned
int
sensor_id_
;
// sensor ID
unsigned
int
sensor_id_
;
// sensor ID
bool
extrinsic_dynamic_
;
// extrinsic parameters vary with time? If so, they will be taken from the Capture nodes. TODO: Not Yet Implemented.
bool
extrinsic_dynamic_
;
// extrinsic parameters vary with time? If so, they will be taken from the Capture nodes. TODO: Not Yet Implemented.
bool
intrinsic_dynamic_
;
// intrinsic parameters vary with time? If so, they will be taken from the Capture nodes. TODO: Not Yet Implemented.
Eigen
::
VectorXs
noise_std_
;
// std of sensor noise
Eigen
::
VectorXs
noise_std_
;
// std of sensor noise
Eigen
::
MatrixXs
noise_cov_
;
// cov matrix of noise
Eigen
::
MatrixXs
noise_cov_
;
// cov matrix of noise
...
@@ -57,7 +58,13 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
...
@@ -57,7 +58,13 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
* \param _extr_dyn Flag indicating if extrinsics are dynamic (moving) or static (not moving)
* \param _extr_dyn Flag indicating if extrinsics are dynamic (moving) or static (not moving)
*
*
**/
**/
SensorBase
(
const
std
::
string
&
_type
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
const
unsigned
int
_noise_size
,
const
bool
_extr_dyn
=
false
);
SensorBase
(
const
std
::
string
&
_type
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
const
unsigned
int
_noise_size
,
const
bool
_extr_dyn
=
false
,
const
bool
_intr_dyn
=
false
);
/** \brief Constructor with noise std vector
/** \brief Constructor with noise std vector
*
*
...
@@ -70,7 +77,14 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
...
@@ -70,7 +77,14 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
* \param _extr_dyn Flag indicating if extrinsics are dynamic (moving) or static (not moving)
* \param _extr_dyn Flag indicating if extrinsics are dynamic (moving) or static (not moving)
*
*
**/
**/
SensorBase
(
const
std
::
string
&
_type
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
const
Eigen
::
VectorXs
&
_noise_std
,
const
bool
_extr_dyn
=
false
);
SensorBase
(
const
std
::
string
&
_type
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_intr_ptr
,
const
Eigen
::
VectorXs
&
_noise_std
,
const
bool
_extr_dyn
=
false
,
const
bool
_intr_dyn
=
false
);
virtual
~
SensorBase
();
virtual
~
SensorBase
();
void
remove
();
void
remove
();
...
...
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