typedefs.hpp
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // © Copyright 2020, Septentrio NV/SA.
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // 1. Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // 2. Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // 3. Neither the name of the copyright holder nor the names of its
14 // contributors may be used to endorse or promote products derived
15 // from this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 // POSSIBILITY OF SUCH DAMAGE.
28 //
29 // *****************************************************************************
30 
31 #pragma once
32 
33 // std includes
34 #include <numeric>
35 #include <unordered_map>
36 // ROS includes
37 #include <ros/ros.h>
38 // tf2 includes
39 #include <tf2_eigen/tf2_eigen.h>
43 // ROS msg includes
44 #include <diagnostic_msgs/DiagnosticArray.h>
45 #include <diagnostic_msgs/DiagnosticStatus.h>
46 #include <geometry_msgs/PoseWithCovarianceStamped.h>
47 #include <geometry_msgs/Quaternion.h>
48 #include <geometry_msgs/TwistWithCovarianceStamped.h>
49 #include <gps_common/GPSFix.h>
50 #include <nav_msgs/Odometry.h>
51 #include <sensor_msgs/Imu.h>
52 #include <sensor_msgs/NavSatFix.h>
53 #include <sensor_msgs/TimeReference.h>
54 // GNSS msg includes
55 #include <septentrio_gnss_driver/AIMPlusStatus.h>
56 #include <septentrio_gnss_driver/AttCovEuler.h>
57 #include <septentrio_gnss_driver/AttEuler.h>
58 #include <septentrio_gnss_driver/BaseVectorCart.h>
59 #include <septentrio_gnss_driver/BaseVectorGeod.h>
60 #include <septentrio_gnss_driver/BlockHeader.h>
61 #include <septentrio_gnss_driver/GALAuthStatus.h>
62 #include <septentrio_gnss_driver/MeasEpoch.h>
63 #include <septentrio_gnss_driver/MeasEpochChannelType1.h>
64 #include <septentrio_gnss_driver/MeasEpochChannelType2.h>
65 #include <septentrio_gnss_driver/PVTCartesian.h>
66 #include <septentrio_gnss_driver/PVTGeodetic.h>
67 #include <septentrio_gnss_driver/PosCovCartesian.h>
68 #include <septentrio_gnss_driver/PosCovGeodetic.h>
69 #include <septentrio_gnss_driver/RFBand.h>
70 #include <septentrio_gnss_driver/RFStatus.h>
71 #include <septentrio_gnss_driver/ReceiverTime.h>
72 #include <septentrio_gnss_driver/VectorInfoCart.h>
73 #include <septentrio_gnss_driver/VectorInfoGeod.h>
74 #include <septentrio_gnss_driver/VelCovCartesian.h>
75 #include <septentrio_gnss_driver/VelCovGeodetic.h>
76 // NMEA msg includes
77 #include <nmea_msgs/Gpgga.h>
78 #include <nmea_msgs/Gpgsa.h>
79 #include <nmea_msgs/Gpgsv.h>
80 #include <nmea_msgs/Gprmc.h>
81 // INS msg includes
82 #include <septentrio_gnss_driver/ExtSensorMeas.h>
83 #include <septentrio_gnss_driver/IMUSetup.h>
84 #include <septentrio_gnss_driver/INSNavCart.h>
85 #include <septentrio_gnss_driver/INSNavGeod.h>
86 #include <septentrio_gnss_driver/VelSensorSetup.h>
87 // Rosaic includes
90 
91 // Timestamp in nanoseconds (Unix epoch)
92 typedef uint64_t Timestamp;
93 // ROS timestamp
95 
96 // ROS messages
97 typedef diagnostic_msgs::DiagnosticArray DiagnosticArrayMsg;
98 typedef diagnostic_msgs::DiagnosticStatus DiagnosticStatusMsg;
99 typedef geometry_msgs::Quaternion QuaternionMsg;
100 typedef geometry_msgs::PoseWithCovarianceStamped PoseWithCovarianceStampedMsg;
101 typedef geometry_msgs::TwistWithCovarianceStamped TwistWithCovarianceStampedMsg;
102 typedef geometry_msgs::TransformStamped TransformStampedMsg;
103 typedef gps_common::GPSFix GpsFixMsg;
104 typedef gps_common::GPSStatus GpsStatusMsg;
105 typedef sensor_msgs::NavSatFix NavSatFixMsg;
106 typedef sensor_msgs::NavSatStatus NavSatStatusMsg;
107 typedef sensor_msgs::TimeReference TimeReferenceMsg;
108 typedef sensor_msgs::Imu ImuMsg;
109 typedef nav_msgs::Odometry LocalizationMsg;
110 
111 // Septentrio GNSS SBF messages
112 typedef septentrio_gnss_driver::AIMPlusStatus AimPlusStatusMsg;
113 typedef septentrio_gnss_driver::BaseVectorCart BaseVectorCartMsg;
114 typedef septentrio_gnss_driver::BaseVectorGeod BaseVectorGeodMsg;
115 typedef septentrio_gnss_driver::BlockHeader BlockHeaderMsg;
116 typedef septentrio_gnss_driver::GALAuthStatus GalAuthStatusMsg;
117 typedef septentrio_gnss_driver::RFStatus RfStatusMsg;
118 typedef septentrio_gnss_driver::RFBand RfBandMsg;
119 typedef septentrio_gnss_driver::MeasEpoch MeasEpochMsg;
120 typedef septentrio_gnss_driver::MeasEpochChannelType1 MeasEpochChannelType1Msg;
121 typedef septentrio_gnss_driver::MeasEpochChannelType2 MeasEpochChannelType2Msg;
122 typedef septentrio_gnss_driver::AttCovEuler AttCovEulerMsg;
123 typedef septentrio_gnss_driver::AttEuler AttEulerMsg;
124 typedef septentrio_gnss_driver::PVTCartesian PVTCartesianMsg;
125 typedef septentrio_gnss_driver::PVTGeodetic PVTGeodeticMsg;
126 typedef septentrio_gnss_driver::PosCovCartesian PosCovCartesianMsg;
127 typedef septentrio_gnss_driver::PosCovGeodetic PosCovGeodeticMsg;
128 typedef septentrio_gnss_driver::ReceiverTime ReceiverTimeMsg;
129 typedef septentrio_gnss_driver::VectorInfoCart VectorInfoCartMsg;
130 typedef septentrio_gnss_driver::VectorInfoGeod VectorInfoGeodMsg;
131 typedef septentrio_gnss_driver::VelCovCartesian VelCovCartesianMsg;
132 typedef septentrio_gnss_driver::VelCovGeodetic VelCovGeodeticMsg;
133 
134 // NMEA messages
135 typedef nmea_msgs::Gpgga GpggaMsg;
136 typedef nmea_msgs::Gpgsa GpgsaMsg;
137 typedef nmea_msgs::Gpgsv GpgsvMsg;
138 typedef nmea_msgs::Gprmc GprmcMsg;
139 
140 // Septentrio INS+GNSS SBF messages
141 typedef septentrio_gnss_driver::INSNavCart INSNavCartMsg;
142 typedef septentrio_gnss_driver::INSNavGeod INSNavGeodMsg;
143 typedef septentrio_gnss_driver::IMUSetup IMUSetupMsg;
144 typedef septentrio_gnss_driver::VelSensorSetup VelSensorSetupMsg;
145 typedef septentrio_gnss_driver::ExtSensorMeas ExtSensorMeasMsg;
146 
153 {
154  TimestampRos tsr;
155  tsr.fromNSec(ts);
156  return tsr;
157 }
158 
164 inline Timestamp timestampFromRos(const TimestampRos& tsr) { return tsr.toNSec(); }
165 
169 namespace log_level {
170  enum LogLevel
171  {
177  };
178 } // namespace log_level
179 
185 {
186 public:
188  pNh_(new ros::NodeHandle("~")), tfListener_(tfBuffer_), lastTfStamp_(0)
189  {
190  }
191 
192  virtual ~ROSaicNodeBase() {}
193 
194  const Settings* settings() const { return &settings_; }
195 
197  {
198  try
199  {
200  ros::NodeHandle nh;
201  if (settings_.ins_vsm_ros_source == "odometry")
202  odometrySubscriber_ = nh.subscribe<nav_msgs::Odometry>(
203  "odometry_vsm", 10, &ROSaicNodeBase::callbackOdometry, this);
204  else if (settings_.ins_vsm_ros_source == "twist")
206  "twist_vsm", 10, &ROSaicNodeBase::callbackTwist, this);
207  } catch (const std::runtime_error& ex)
208  {
209  this->log(log_level::ERROR, "Subscriber initialization failed due to: " +
210  std::string(ex.what()) + ".");
211  }
212  }
213 
224  bool getUint32Param(const std::string& name, uint32_t& val,
225  uint32_t defaultVal) const
226  {
227  int32_t tempVal;
228  if ((!pNh_->getParam(name, tempVal)) || (tempVal < 0))
229  {
230  val = defaultVal;
231  return false;
232  }
233  val = tempVal;
234  return true;
235  }
236 
246  template <typename T>
247  bool param(const std::string& name, T& val, const T& defaultVal) const
248  {
249  return pNh_->param(name, val, defaultVal);
250  };
251 
257  void log(log_level::LogLevel logLevel, const std::string& s) const
258  {
259  switch (logLevel)
260  {
261  case log_level::DEBUG:
263  break;
264  case log_level::INFO:
266  break;
267  case log_level::WARN:
269  break;
270  case log_level::ERROR:
272  break;
273  case log_level::FATAL:
275  break;
276  default:
277  break;
278  }
279  }
280 
285  Timestamp getTime() const { return ros::Time::now().toNSec(); }
286 
292  template <typename M>
293  void publishMessage(const std::string& topic, const M& msg)
294  {
295  auto it = topicMap_.find(topic);
296  if (it != topicMap_.end())
297  {
298  it->second.publish(msg);
299  } else
300  {
301  ros::Publisher pub = pNh_->advertise<M>(topic, queueSize_);
302  topicMap_.insert(std::make_pair(topic, pub));
303  pub.publish(msg);
304  }
305  }
306 
311  void publishTf(const LocalizationMsg& loc)
312  {
313  if (std::isnan(loc.pose.pose.orientation.w))
314  return;
315 
316  if (lastTfStamp_ == loc.header.stamp)
317  return;
318  lastTfStamp_ = loc.header.stamp;
319 
320  geometry_msgs::TransformStamped transformStamped;
321  transformStamped.header.stamp = loc.header.stamp;
322  transformStamped.header.frame_id = loc.header.frame_id;
323  transformStamped.child_frame_id = loc.child_frame_id;
324  transformStamped.transform.translation.x = loc.pose.pose.position.x;
325  transformStamped.transform.translation.y = loc.pose.pose.position.y;
326  transformStamped.transform.translation.z = loc.pose.pose.position.z;
327  transformStamped.transform.rotation.x = loc.pose.pose.orientation.x;
328  transformStamped.transform.rotation.y = loc.pose.pose.orientation.y;
329  transformStamped.transform.rotation.z = loc.pose.pose.orientation.z;
330  transformStamped.transform.rotation.w = loc.pose.pose.orientation.w;
331 
333  {
334  geometry_msgs::TransformStamped T_l_b;
335  try
336  {
337  // try to get tf at timestamp of message
338  T_l_b = tfBuffer_.lookupTransform(
339  loc.child_frame_id, settings_.local_frame_id, lastTfStamp_);
340  } catch (const tf2::TransformException& ex)
341  {
342  try
343  {
345  10.0,
347  << ": No transform for insertion of local frame at t="
348  << lastTfStamp_.toNSec()
349  << ". Exception: " << std::string(ex.what()));
350  // try to get latest tf
351  T_l_b = tfBuffer_.lookupTransform(
352  loc.child_frame_id, settings_.local_frame_id, ros::Time(0));
353  } catch (const tf2::TransformException& ex)
354  {
356  10.0,
358  << ": No most recent transform for insertion of local frame. Exception: "
359  << std::string(ex.what()));
360  return;
361  }
362  }
363 
364  // T_l_g = T_b_g * T_l_b;
365  transformStamped =
366  tf2::eigenToTransform(tf2::transformToEigen(transformStamped) *
367  tf2::transformToEigen(T_l_b));
368  transformStamped.header.stamp = loc.header.stamp;
369  transformStamped.header.frame_id = loc.header.frame_id;
370  transformStamped.child_frame_id = settings_.local_frame_id;
371  }
372 
373  tf2Publisher_.sendTransform(transformStamped);
374  }
375 
379  void setIsIns() { capabilities_.is_ins = true; }
380 
385 
390 
394  bool isIns() { return capabilities_.is_ins; }
395 
400 
405 
406 private:
407  void callbackOdometry(const nav_msgs::Odometry::ConstPtr& odo)
408  {
409  Timestamp stamp = timestampFromRos(odo->header.stamp);
410 
411  processTwist(stamp, odo->twist);
412  }
413 
414  void callbackTwist(const TwistWithCovarianceStampedMsg::ConstPtr& twist)
415  {
416  Timestamp stamp = timestampFromRos(twist->header.stamp);
417 
418  processTwist(stamp, twist->twist);
419  }
420 
422  const geometry_msgs::TwistWithCovariance& twist)
423  {
424  // in case stamp was not set
425  if (stamp == 0)
426  stamp = getTime();
427 
428  static Eigen::Vector3d vel = Eigen::Vector3d::Zero();
429  static Eigen::Vector3d var = Eigen::Vector3d::Zero();
430  static uint64_t ctr = 0;
431  static Timestamp lastStamp = 0;
432 
433  ++ctr;
434  vel[0] += twist.twist.linear.x;
435  vel[1] += twist.twist.linear.y;
436  vel[2] += twist.twist.linear.z;
437  var[0] += twist.covariance[0];
438  var[1] += twist.covariance[7];
439  var[2] += twist.covariance[14];
440 
441  // Rx expects averaged velocity at a rate of 2 Hz
442  if ((stamp - lastStamp) >= 495000000) // allow for 5 ms jitter
443  {
444  vel /= ctr;
445  var /= ctr;
446  time_t epochSeconds = stamp / 1000000000;
447  struct tm* tm_temp = std::gmtime(&epochSeconds);
448  std::stringstream timeUtc;
449  timeUtc << std::setfill('0') << std::setw(2)
450  << std::to_string(tm_temp->tm_hour) << std::setw(2)
451  << std::to_string(tm_temp->tm_min) << std::setw(2)
452  << std::to_string(tm_temp->tm_sec) << "." << std::setw(3)
453  << std::to_string((stamp - (stamp / 1000000000) * 1000000000) /
454  1000000);
455 
456  std::string v_x;
457  std::string v_y;
458  std::string v_z;
459  std::string std_x;
460  std::string std_y;
461  std::string std_z;
463  {
468  else if (var[0] > 0.0)
469  std_x = string_utilities::trimDecimalPlaces(std::sqrt(var[0]));
471  {
472  log(log_level::ERROR, "Invalid covariance value for v_x: " +
473  std::to_string(var[0]) +
474  ". Ignoring measurement.");
475  v_x = "";
476  std_x = string_utilities::trimDecimalPlaces(1000000.0);
477  }
478  } else
479  std_x = std::to_string(1000000.0);
481  {
483  v_y = "-";
488  else if (var[1] > 0.0)
489  std_y = string_utilities::trimDecimalPlaces(std::sqrt(var[1]));
491  {
492  log(log_level::ERROR, "Invalid covariance value for v_y: " +
493  std::to_string(var[1]) +
494  ". Ignoring measurement.");
495  v_y = "";
496  std_y = string_utilities::trimDecimalPlaces(1000000.0);
497  }
498  } else
499  std_y = string_utilities::trimDecimalPlaces(1000000.0);
501  {
503  v_z = "-";
508  else if (var[2] > 0.0)
509  std_z = string_utilities::trimDecimalPlaces(std::sqrt(var[2]));
511  {
512  log(log_level::ERROR, "Invalid covariance value for v_z: " +
513  std::to_string(var[2]) +
514  ". Ignoring measurement.");
515  v_z = "";
516  std_z = string_utilities::trimDecimalPlaces(1000000.0);
517  }
518  } else
519  std_z = string_utilities::trimDecimalPlaces(1000000.0);
520 
521  std::string velNmea = "$PSSN,VSM," + timeUtc.str() + "," + v_x + "," +
522  v_y + "," + std_x + "," + std_y + "," + v_z + "," +
523  std_z;
524 
525  char crc = std::accumulate(velNmea.begin() + 1, velNmea.end(), 0,
526  [](char sum, char ch) { return sum ^ ch; });
527 
528  std::stringstream crcss;
529  crcss << std::hex << static_cast<int32_t>(crc);
530 
531  velNmea += "*" + crcss.str() + "\r\n";
532  sendVelocity(velNmea);
533 
534  vel = Eigen::Vector3d::Zero();
535  var = Eigen::Vector3d::Zero();
536  ctr = 0;
537  lastStamp = stamp;
538  }
539  }
540 
541 protected:
543  std::shared_ptr<ros::NodeHandle> pNh_;
547  virtual void sendVelocity(const std::string& velNmea) = 0;
548 
549 private:
551  std::unordered_map<std::string, ros::Publisher> topicMap_;
553  uint32_t queueSize_ = 1;
564  // tf listener
566  // Capabilities of Rx
568 };
log_level::DEBUG
@ DEBUG
Definition: typedefs.hpp:172
VectorInfoGeodMsg
septentrio_gnss_driver::VectorInfoGeod VectorInfoGeodMsg
Definition: typedefs.hpp:130
ROSaicNodeBase::tfListener_
tf2_ros::TransformListener tfListener_
Definition: typedefs.hpp:565
Timestamp
uint64_t Timestamp
Definition: typedefs.hpp:92
ROSaicNodeBase::registerSubscriber
void registerSubscriber()
Definition: typedefs.hpp:196
timestampFromRos
Timestamp timestampFromRos(const TimestampRos &tsr)
Convert ROS timestamp to nsec timestamp.
Definition: typedefs.hpp:164
Settings::local_frame_id
std::string local_frame_id
Frame id of the local frame to be inserted.
Definition: settings.hpp:306
ROSaicNodeBase::capabilities_
Capabilities capabilities_
Definition: typedefs.hpp:567
ros::Publisher
LocalizationMsg
nav_msgs::Odometry LocalizationMsg
Definition: typedefs.hpp:109
ROS_ERROR_STREAM
#define ROS_ERROR_STREAM(args)
GpgsvMsg
nmea_msgs::Gpgsv GpgsvMsg
Definition: typedefs.hpp:137
Settings::insert_local_frame
bool insert_local_frame
Wether local frame should be inserted into tf.
Definition: settings.hpp:304
NavSatFixMsg
sensor_msgs::NavSatFix NavSatFixMsg
Definition: typedefs.hpp:105
ROSaicNodeBase::log
void log(log_level::LogLevel logLevel, const std::string &s) const
Log function to provide abstraction of ROS loggers.
Definition: typedefs.hpp:257
Capabilities::has_heading
bool has_heading
Wether Rx has heading.
Definition: settings.hpp:364
tf2_eigen.h
Capabilities
Capabilities struct.
Definition: settings.hpp:359
s
XmlRpcServer s
ros
ROS_FATAL_STREAM
#define ROS_FATAL_STREAM(args)
ros.h
Capabilities::has_improved_vsm_handling
bool has_improved_vsm_handling
Wether Rx has improved VSM handling.
Definition: settings.hpp:366
TwistWithCovarianceStampedMsg
geometry_msgs::TwistWithCovarianceStamped TwistWithCovarianceStampedMsg
Definition: typedefs.hpp:101
ROSaicNodeBase::processTwist
void processTwist(Timestamp stamp, const geometry_msgs::TwistWithCovariance &twist)
Definition: typedefs.hpp:421
BlockHeaderMsg
septentrio_gnss_driver::BlockHeader BlockHeaderMsg
Definition: typedefs.hpp:115
timestampToRos
TimestampRos timestampToRos(Timestamp ts)
Convert nsec timestamp to ROS timestamp.
Definition: typedefs.hpp:152
ROSaicNodeBase::hasImprovedVsmHandling
bool hasImprovedVsmHandling()
Check if Rx has improved VSM handling.
Definition: typedefs.hpp:404
NavSatStatusMsg
sensor_msgs::NavSatStatus NavSatStatusMsg
Definition: typedefs.hpp:106
settings.hpp
ROSaicNodeBase::odometrySubscriber_
ros::Subscriber odometrySubscriber_
Odometry subscriber.
Definition: typedefs.hpp:557
ROSaicNodeBase::publishMessage
void publishMessage(const std::string &topic, const M &msg)
Publishing function.
Definition: typedefs.hpp:293
VelCovGeodeticMsg
septentrio_gnss_driver::VelCovGeodetic VelCovGeodeticMsg
Definition: typedefs.hpp:132
ReceiverTimeMsg
septentrio_gnss_driver::ReceiverTime ReceiverTimeMsg
Definition: typedefs.hpp:128
ROS_DEBUG_STREAM
#define ROS_DEBUG_STREAM(args)
log_level::INFO
@ INFO
Definition: typedefs.hpp:173
INSNavCartMsg
septentrio_gnss_driver::INSNavCart INSNavCartMsg
Definition: typedefs.hpp:141
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
ROSaicNodeBase
This class is the base class for abstraction.
Definition: typedefs.hpp:184
TimeReferenceMsg
sensor_msgs::TimeReference TimeReferenceMsg
Definition: typedefs.hpp:107
Settings::ins_vsm_ros_variances_by_parameter
bool ins_vsm_ros_variances_by_parameter
Whether or not to use variance defined by ROS parameter.
Definition: settings.hpp:341
transform_broadcaster.h
tf2::eigenToTransform
geometry_msgs::TransformStamped eigenToTransform(const Eigen::Affine3d &T)
ROSaicNodeBase::topicMap_
std::unordered_map< std::string, ros::Publisher > topicMap_
Map of topics and publishers.
Definition: typedefs.hpp:551
tf2_ros::TransformListener
PVTGeodeticMsg
septentrio_gnss_driver::PVTGeodetic PVTGeodeticMsg
Definition: typedefs.hpp:125
PosCovGeodeticMsg
septentrio_gnss_driver::PosCovGeodetic PosCovGeodeticMsg
Definition: typedefs.hpp:127
GalAuthStatusMsg
septentrio_gnss_driver::GALAuthStatus GalAuthStatusMsg
Definition: typedefs.hpp:116
ROS_WARN_STREAM
#define ROS_WARN_STREAM(args)
ROS_WARN_STREAM_THROTTLE
#define ROS_WARN_STREAM_THROTTLE(period, args)
MeasEpochChannelType1Msg
septentrio_gnss_driver::MeasEpochChannelType1 MeasEpochChannelType1Msg
Definition: typedefs.hpp:120
tf2_ros::TransformBroadcaster::sendTransform
void sendTransform(const geometry_msgs::TransformStamped &transform)
ROSaicNodeBase::sendVelocity
virtual void sendVelocity(const std::string &velNmea)=0
Send velocity to communication layer (virtual)
Settings::ins_vsm_ros_config
std::vector< bool > ins_vsm_ros_config
Whether or not to use individual elements of 3D velocity (v_x, v_y, v_z)
Definition: settings.hpp:339
PVTCartesianMsg
septentrio_gnss_driver::PVTCartesian PVTCartesianMsg
Definition: typedefs.hpp:124
GpsStatusMsg
gps_common::GPSStatus GpsStatusMsg
Definition: typedefs.hpp:104
ROS_INFO_STREAM_THROTTLE
#define ROS_INFO_STREAM_THROTTLE(period, args)
VelCovCartesianMsg
septentrio_gnss_driver::VelCovCartesian VelCovCartesianMsg
Definition: typedefs.hpp:131
Settings::use_ros_axis_orientation
bool use_ros_axis_orientation
ROS axis orientation, body: front-left-up, geographic: ENU.
Definition: settings.hpp:183
PosCovCartesianMsg
septentrio_gnss_driver::PosCovCartesian PosCovCartesianMsg
Definition: typedefs.hpp:126
string_utilities::trimDecimalPlaces
std::string trimDecimalPlaces(double num)
Trims decimal places to three.
Definition: string_utilities.cpp:190
RfBandMsg
septentrio_gnss_driver::RFBand RfBandMsg
Definition: typedefs.hpp:118
ROSaicNodeBase::isIns
bool isIns()
Check if Rx is INS.
Definition: typedefs.hpp:394
ROSaicNodeBase::settings
const Settings * settings() const
Definition: typedefs.hpp:194
AttCovEulerMsg
septentrio_gnss_driver::AttCovEuler AttCovEulerMsg
Definition: typedefs.hpp:122
GpggaMsg
nmea_msgs::Gpgga GpggaMsg
Definition: typedefs.hpp:135
ROSaicNodeBase::setImprovedVsmHandling
void setImprovedVsmHandling()
Set improved VSM handling to true.
Definition: typedefs.hpp:389
ROSaicNodeBase::callbackOdometry
void callbackOdometry(const nav_msgs::Odometry::ConstPtr &odo)
Definition: typedefs.hpp:407
ROSaicNodeBase::ROSaicNodeBase
ROSaicNodeBase()
Definition: typedefs.hpp:187
GpsFixMsg
gps_common::GPSFix GpsFixMsg
Definition: typedefs.hpp:103
tf2_ros::Buffer
INSNavGeodMsg
septentrio_gnss_driver::INSNavGeod INSNavGeodMsg
Definition: typedefs.hpp:142
ROSaicNodeBase::getUint32Param
bool getUint32Param(const std::string &name, uint32_t &val, uint32_t defaultVal) const
Gets an integer or unsigned integer value from the parameter server.
Definition: typedefs.hpp:224
ros::NodeHandle::subscribe
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
ROS_INFO_STREAM
#define ROS_INFO_STREAM(args)
TransformStampedMsg
geometry_msgs::TransformStamped TransformStampedMsg
Definition: typedefs.hpp:102
log_level::ERROR
@ ERROR
Definition: typedefs.hpp:175
ROSaicNodeBase::hasHeading
bool hasHeading()
Check if Rx has heading.
Definition: typedefs.hpp:399
DiagnosticStatusMsg
diagnostic_msgs::DiagnosticStatus DiagnosticStatusMsg
Definition: typedefs.hpp:98
ROSaicNodeBase::settings_
Settings settings_
Settings.
Definition: typedefs.hpp:545
tf2::transformToEigen
Eigen::Isometry3d transformToEigen(const geometry_msgs::Transform &t)
Settings
Settings struct.
Definition: settings.hpp:123
ROSaicNodeBase::tf2Publisher_
tf2_ros::TransformBroadcaster tf2Publisher_
Transform publisher.
Definition: typedefs.hpp:555
ROSaicNodeBase::setIsIns
void setIsIns()
Set INS to true.
Definition: typedefs.hpp:379
ros::this_node::getName
const ROSCPP_DECL std::string & getName()
log_level
Log level for ROS logging.
Definition: typedefs.hpp:169
transform_listener.h
ExtSensorMeasMsg
septentrio_gnss_driver::ExtSensorMeas ExtSensorMeasMsg
Definition: typedefs.hpp:145
ROSaicNodeBase::twistSubscriber_
ros::Subscriber twistSubscriber_
Twist subscriber.
Definition: typedefs.hpp:559
ROSaicNodeBase::getTime
Timestamp getTime() const
Gets current timestamp.
Definition: typedefs.hpp:285
ROSaicNodeBase::callbackTwist
void callbackTwist(const TwistWithCovarianceStampedMsg::ConstPtr &twist)
Definition: typedefs.hpp:414
TimeBase< Time, Duration >::fromNSec
Time & fromNSec(uint64_t t)
ros::Time
string_utilities.hpp
Declares lower-level string utility functions used when parsing messages.
BaseVectorGeodMsg
septentrio_gnss_driver::BaseVectorGeod BaseVectorGeodMsg
Definition: typedefs.hpp:114
ROSaicNodeBase::param
bool param(const std::string &name, T &val, const T &defaultVal) const
Gets parameter of type T from the parameter server.
Definition: typedefs.hpp:247
Settings::ins_vsm_ros_source
std::string ins_vsm_ros_source
VSM source for INS.
Definition: settings.hpp:337
ROSaicNodeBase::pNh_
std::shared_ptr< ros::NodeHandle > pNh_
Node handle pointer.
Definition: typedefs.hpp:543
Capabilities::is_ins
bool is_ins
Wether Rx is INS.
Definition: settings.hpp:362
ROSaicNodeBase::setHasHeading
void setHasHeading()
Set has heading to true.
Definition: typedefs.hpp:384
RfStatusMsg
septentrio_gnss_driver::RFStatus RfStatusMsg
Definition: typedefs.hpp:117
GpgsaMsg
nmea_msgs::Gpgsa GpgsaMsg
Definition: typedefs.hpp:136
VectorInfoCartMsg
septentrio_gnss_driver::VectorInfoCart VectorInfoCartMsg
Definition: typedefs.hpp:129
tf2_ros::TransformBroadcaster
crc
Definition: crc.hpp:42
TimeBase< Time, Duration >::toNSec
uint64_t toNSec() const
VelSensorSetupMsg
septentrio_gnss_driver::VelSensorSetup VelSensorSetupMsg
Definition: typedefs.hpp:144
BaseVectorCartMsg
septentrio_gnss_driver::BaseVectorCart BaseVectorCartMsg
Definition: typedefs.hpp:113
log_level::WARN
@ WARN
Definition: typedefs.hpp:174
tf2_geometry_msgs.h
GprmcMsg
nmea_msgs::Gprmc GprmcMsg
Definition: typedefs.hpp:138
log_level::LogLevel
LogLevel
Definition: typedefs.hpp:170
MeasEpochMsg
septentrio_gnss_driver::MeasEpoch MeasEpochMsg
Definition: typedefs.hpp:119
ROSaicNodeBase::tfBuffer_
tf2_ros::Buffer tfBuffer_
tf buffer
Definition: typedefs.hpp:563
ROSaicNodeBase::~ROSaicNodeBase
virtual ~ROSaicNodeBase()
Definition: typedefs.hpp:192
TimestampRos
ros::Time TimestampRos
Definition: typedefs.hpp:94
Settings::ins_vsm_ros_variances
std::vector< double > ins_vsm_ros_variances
Variances of the 3D velocity (var_x, var_y, var_z)
Definition: settings.hpp:343
AimPlusStatusMsg
septentrio_gnss_driver::AIMPlusStatus AimPlusStatusMsg
Definition: typedefs.hpp:112
QuaternionMsg
geometry_msgs::Quaternion QuaternionMsg
Definition: typedefs.hpp:99
MeasEpochChannelType2Msg
septentrio_gnss_driver::MeasEpochChannelType2 MeasEpochChannelType2Msg
Definition: typedefs.hpp:121
tf2::TransformException
ROSaicNodeBase::queueSize_
uint32_t queueSize_
Publisher queue size.
Definition: typedefs.hpp:553
ROSaicNodeBase::lastTfStamp_
TimestampRos lastTfStamp_
Last tf stamp.
Definition: typedefs.hpp:561
IMUSetupMsg
septentrio_gnss_driver::IMUSetup IMUSetupMsg
Definition: typedefs.hpp:143
ROSaicNodeBase::publishTf
void publishTf(const LocalizationMsg &loc)
Publishing function for tf.
Definition: typedefs.hpp:311
tf2_ros::Buffer::lookupTransform
virtual geometry_msgs::TransformStamped lookupTransform(const std::string &target_frame, const ros::Time &target_time, const std::string &source_frame, const ros::Time &source_time, const std::string &fixed_frame, const ros::Duration timeout) const
log_level::FATAL
@ FATAL
Definition: typedefs.hpp:176
ImuMsg
sensor_msgs::Imu ImuMsg
Definition: typedefs.hpp:108
ros::NodeHandle
ros::Subscriber
ros::Time::now
static Time now()
PoseWithCovarianceStampedMsg
geometry_msgs::PoseWithCovarianceStamped PoseWithCovarianceStampedMsg
Definition: typedefs.hpp:100
DiagnosticArrayMsg
diagnostic_msgs::DiagnosticArray DiagnosticArrayMsg
Definition: typedefs.hpp:97
AttEulerMsg
septentrio_gnss_driver::AttEuler AttEulerMsg
Definition: typedefs.hpp:123


septentrio_gnss_driver
Author(s): Tibor Dome
autogenerated on Wed Nov 22 2023 04:04:27