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
baa63c20
Commit
baa63c20
authored
2 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
checking natsatfix status and cov_min diag values
parent
2e9c860e
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/subscriber_gnss_fix.h
+1
-0
1 addition, 0 deletions
include/subscriber_gnss_fix.h
src/subscriber_gnss_fix.cpp
+9
-1
9 additions, 1 deletion
src/subscriber_gnss_fix.cpp
with
10 additions
and
1 deletion
include/subscriber_gnss_fix.h
+
1
−
0
View file @
baa63c20
...
...
@@ -61,6 +61,7 @@ class SubscriberGnssFix : public Subscriber
{
std
::
string
cov_mode_
;
double
cov_factor_
;
double
cov_min_
;
Eigen
::
Matrix3d
cov_
;
public:
...
...
This diff is collapsed.
Click to expand it.
src/subscriber_gnss_fix.cpp
+
9
−
1
View file @
baa63c20
...
...
@@ -20,6 +20,7 @@
//
//--------LICENSE_END--------
#include
"../include/subscriber_gnss_fix.h"
// #include <sensor_msgs/NavSatStatus.h>
namespace
wolf
{
...
...
@@ -32,7 +33,8 @@ SubscriberGnssFix::SubscriberGnssFix(const std::string& _unique_name,
,
cov_factor_
(
1
)
{
cov_mode_
=
_server
.
getParam
<
std
::
string
>
(
prefix_
+
"/cov_mode"
);
cov_mode_
=
_server
.
getParam
<
std
::
string
>
(
prefix_
+
"/cov_mode"
);
cov_min_
=
getParamWithDefault
<
double
>
(
_server
,
prefix_
+
"/cov_min"
,
1e-6
);
//if (cov_mode_ == "msg") //nothing to be done
if
(
cov_mode_
==
"manual"
)
...
...
@@ -51,9 +53,15 @@ void SubscriberGnssFix::callback(const sensor_msgs::NavSatFix::ConstPtr& msg)
{
updateLastHeader
(
msg
->
header
);
if
(
msg
->
status
.
status
==
sensor_msgs
::
NavSatStatus
::
STATUS_NO_FIX
)
return
;
if
(
cov_mode_
==
"msg"
or
cov_mode_
==
"factor"
)
cov_
=
cov_factor_
*
Eigen
::
Map
<
const
Eigen
::
Matrix3d
>
(
msg
->
position_covariance
.
data
());
// min cov diagonal values
cov_
.
diagonal
()
=
cov_
.
diagonal
().
cwiseMax
(
cov_min_
);
// Cov fix has the 4th element being clock bias (no information about this)
Matrix4d
cov_fix
=
Matrix4d
::
Identity
()
*
0.1
;
cov_fix
.
topLeftCorner
<
3
,
3
>
()
=
cov_
;
...
...
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