Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_ros_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_ros
wolf_ros_gnss
Commits
2e9c860e
Commit
2e9c860e
authored
2 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
changed R to q for rotations in GNSS
parent
d9780b05
No related branches found
No related tags found
1 merge request
!7
changed R to q for rotations in GNSS
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/publisher_gnss_tf.cpp
+10
-7
10 additions, 7 deletions
src/publisher_gnss_tf.cpp
with
10 additions
and
7 deletions
src/publisher_gnss_tf.cpp
+
10
−
7
View file @
2e9c860e
...
@@ -66,11 +66,12 @@ void PublisherGnssTf::publishDerived()
...
@@ -66,11 +66,12 @@ void PublisherGnssTf::publishDerived()
// ENU-MAP
// ENU-MAP
tf
::
Vector3
tf_t_enu_map
;
tf
::
Vector3
tf_t_enu_map
;
tf
::
Matrix3x3
tf_
R
_enu_map
;
tf
::
Quaternion
tf_
q
_enu_map
;
tf
::
matrix
EigenToTF
(
sensor_gnss_
->
get
R
EnuMap
(),
tf_
R
_enu_map
);
tf
::
quaternion
EigenToTF
(
sensor_gnss_
->
get
Q
EnuMap
(),
tf_
q
_enu_map
);
tf
::
vectorEigenToTF
(
sensor_gnss_
->
gettEnuMap
(),
tf_t_enu_map
);
tf
::
vectorEigenToTF
(
sensor_gnss_
->
gettEnuMap
(),
tf_t_enu_map
);
T_enu_map_
.
setData
(
tf
::
Transform
(
tf_R_enu_map
,
tf_t_enu_map
));
T_enu_map_
.
setData
(
tf
::
Transform
(
tf_q_enu_map
,
tf_t_enu_map
));
T_enu_map_
.
stamp_
=
ros
::
Time
::
now
();
T_enu_map_
.
stamp_
=
ros
::
Time
::
now
();
tfb_
.
sendTransform
(
T_enu_map_
);
tfb_
.
sendTransform
(
T_enu_map_
);
...
@@ -79,11 +80,13 @@ void PublisherGnssTf::publishDerived()
...
@@ -79,11 +80,13 @@ void PublisherGnssTf::publishDerived()
if
(
publish_ecef_
)
if
(
publish_ecef_
)
{
{
tf
::
Vector3
tf_t_enu_ecef
;
tf
::
Vector3
tf_t_enu_ecef
;
tf
::
Matrix3x3
tf_R_enu_ecef
;
tf
::
Quaternion
tf_q_enu_ecef
;
T_ecef_enu_
.
setData
(
tf
::
Transform
(
tf_R_enu_ecef
,
tf_t_enu_ecef
).
inverse
());
T_ecef_enu_
.
stamp_
=
ros
::
Time
::
now
();
tf
::
quaternionEigenToTF
(
sensor_gnss_
->
getQEnuEcef
(),
tf_q_enu_ecef
);
tf
::
matrixEigenToTF
(
sensor_gnss_
->
getREnuEcef
(),
tf_R_enu_ecef
);
tf
::
vectorEigenToTF
(
sensor_gnss_
->
gettEnuEcef
(),
tf_t_enu_ecef
);
tf
::
vectorEigenToTF
(
sensor_gnss_
->
gettEnuEcef
(),
tf_t_enu_ecef
);
T_ecef_enu_
.
setData
(
tf
::
Transform
(
tf_q_enu_ecef
,
tf_t_enu_ecef
).
inverse
());
T_ecef_enu_
.
stamp_
=
ros
::
Time
::
now
();
tfb_
.
sendTransform
(
T_ecef_enu_
);
tfb_
.
sendTransform
(
T_ecef_enu_
);
}
}
...
...
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