Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
gnss
Commits
feb38043
Commit
feb38043
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
added function getREnuMap() and reorganized .h
parent
00aeed38
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/gnss/sensor/sensor_gnss.h
+17
-15
17 additions, 15 deletions
include/gnss/sensor/sensor_gnss.h
src/sensor/sensor_gnss.cpp
+7
-0
7 additions, 0 deletions
src/sensor/sensor_gnss.cpp
with
24 additions
and
15 deletions
include/gnss/sensor/sensor_gnss.h
+
17
−
15
View file @
feb38043
...
@@ -55,32 +55,34 @@ class SensorGnss : public SensorBase
...
@@ -55,32 +55,34 @@ class SensorGnss : public SensorBase
virtual
~
SensorGnss
();
virtual
~
SensorGnss
();
// ENU
// Gets
void
computeEnuEcef
(
const
Eigen
::
Vector3s
&
_t_ECEF_ENU
,
Eigen
::
Matrix3s
&
R_ENU_ECEF
,
Eigen
::
Vector3s
&
t_ENU_ECEF
)
const
;
void
setEcefEnu
(
const
Eigen
::
Vector3s
&
_t_ECEF_ENU
);
void
setEnuEcef
(
const
Eigen
::
Matrix3s
&
_R_ENU_ECEF
,
const
Eigen
::
Vector3s
&
_t_ENU_ECEF
);
bool
isEnuDefined
()
const
;
bool
isEnuMapInitialized
()
const
;
// ENU_MAP
StateBlockPtr
getEnuMapTranslation
()
const
;
StateBlockPtr
getEnuMapTranslation
()
const
;
StateBlockPtr
getEnuMapRoll
()
const
;
StateBlockPtr
getEnuMapRoll
()
const
;
StateBlockPtr
getEnuMapPitch
()
const
;
StateBlockPtr
getEnuMapPitch
()
const
;
StateBlockPtr
getEnuMapYaw
()
const
;
StateBlockPtr
getEnuMapYaw
()
const
;
void
initializeEnuMap
(
const
Eigen
::
VectorXs
&
_pose_MAP_frameENU
,
const
Eigen
::
Vector3s
&
_t_ECEF_antenaENU
,
const
Eigen
::
Matrix3s
&
getREnuEcef
()
const
;
const
Eigen
::
VectorXs
&
_pose_MAP_frame2
,
const
Eigen
::
Vector3s
&
_t_ECEF_antena2
);
const
Eigen
::
Vector3s
&
gettEnuEcef
()
const
;
void
initializeEnuMapYaw
(
const
Eigen
::
VectorXs
&
_pose_MAP_frame1
,
const
Eigen
::
VectorXs
&
_pose_MAP_frame2
,
Eigen
::
Matrix3s
getREnuMap
()
const
;
const
Eigen
::
Vector3s
&
_v_ECEF_antena1_antena2
);
Eigen
::
Vector3s
gettEnuMap
()
const
;
bool
isEnuDefined
()
const
;
bool
isEnuMapInitialized
()
const
;
// Sets
void
setEnuMapTranslationState
(
const
Eigen
::
Vector3s
&
t_ENU_MAP
);
void
setEnuMapTranslationState
(
const
Eigen
::
Vector3s
&
t_ENU_MAP
);
void
setEnuMapRollState
(
const
Scalar
&
roll_ENU_MAP
);
void
setEnuMapRollState
(
const
Scalar
&
roll_ENU_MAP
);
void
setEnuMapPitchState
(
const
Scalar
&
pitch_ENU_MAP
);
void
setEnuMapPitchState
(
const
Scalar
&
pitch_ENU_MAP
);
void
setEnuMapYawState
(
const
Scalar
&
yaw_ENU_MAP
);
void
setEnuMapYawState
(
const
Scalar
&
yaw_ENU_MAP
);
void
setEcefEnu
(
const
Eigen
::
Vector3s
&
_t_ECEF_ENU
);
void
setEnuEcef
(
const
Eigen
::
Matrix3s
&
_R_ENU_ECEF
,
const
Eigen
::
Vector3s
&
_t_ENU_ECEF
);
// Gets
// compute
const
Eigen
::
Matrix3s
&
getREnuEcef
()
const
;
const
Eigen
::
Vector3s
&
gettEnuEcef
()
const
;
template
<
typename
T
>
template
<
typename
T
>
Eigen
::
Matrix
<
T
,
3
,
3
>
computeREnuMap
(
const
T
&
_r
,
const
T
&
_p
,
const
T
&
_y
)
const
;
Eigen
::
Matrix
<
T
,
3
,
3
>
computeREnuMap
(
const
T
&
_r
,
const
T
&
_p
,
const
T
&
_y
)
const
;
void
computeEnuEcef
(
const
Eigen
::
Vector3s
&
_t_ECEF_ENU
,
Eigen
::
Matrix3s
&
R_ENU_ECEF
,
Eigen
::
Vector3s
&
t_ENU_ECEF
)
const
;
void
initializeEnuMap
(
const
Eigen
::
VectorXs
&
_pose_MAP_frameENU
,
const
Eigen
::
Vector3s
&
_t_ECEF_antenaENU
,
const
Eigen
::
VectorXs
&
_pose_MAP_frame2
,
const
Eigen
::
Vector3s
&
_t_ECEF_antena2
);
void
initializeEnuMapYaw
(
const
Eigen
::
VectorXs
&
_pose_MAP_frame1
,
const
Eigen
::
VectorXs
&
_pose_MAP_frame2
,
const
Eigen
::
Vector3s
&
_v_ECEF_antena1_antena2
);
public:
public:
static
SensorBasePtr
create
(
const
std
::
string
&
_unique_name
,
const
Eigen
::
VectorXs
&
_extrinsics_p
,
const
IntrinsicsBasePtr
_intrinsics
);
static
SensorBasePtr
create
(
const
std
::
string
&
_unique_name
,
const
Eigen
::
VectorXs
&
_extrinsics_p
,
const
IntrinsicsBasePtr
_intrinsics
);
...
...
This diff is collapsed.
Click to expand it.
src/sensor/sensor_gnss.cpp
+
7
−
0
View file @
feb38043
...
@@ -233,6 +233,13 @@ void SensorGnss::setEnuMapYawState(const Scalar& yaw_ENU_MAP)
...
@@ -233,6 +233,13 @@ void SensorGnss::setEnuMapYawState(const Scalar& yaw_ENU_MAP)
ENU_MAP_initialized_
=
true
;
ENU_MAP_initialized_
=
true
;
}
}
Eigen
::
Matrix3s
SensorGnss
::
getREnuMap
()
const
{
return
Eigen
::
Matrix3s
(
Eigen
::
AngleAxis
<
Scalar
>
(
getEnuMapRoll
()
->
getState
()(
0
),
Eigen
::
Vector3s
::
UnitX
())
*
Eigen
::
AngleAxis
<
Scalar
>
(
getEnuMapPitch
()
->
getState
()(
0
),
Eigen
::
Vector3s
::
UnitY
())
*
Eigen
::
AngleAxis
<
Scalar
>
(
getEnuMapYaw
()
->
getState
()(
0
),
Eigen
::
Vector3s
::
UnitZ
()));
}
// Define the factory method
// Define the factory method
SensorBasePtr
SensorGnss
::
create
(
const
std
::
string
&
_unique_name
,
const
Eigen
::
VectorXs
&
_extrinsics
,
SensorBasePtr
SensorGnss
::
create
(
const
std
::
string
&
_unique_name
,
const
Eigen
::
VectorXs
&
_extrinsics
,
const
IntrinsicsBasePtr
_intrinsics
)
const
IntrinsicsBasePtr
_intrinsics
)
...
...
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