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 <any>
35 #include <iomanip>
36 #include <sstream>
37 #include <unordered_map>
38 // ROS includes
39 #include <rclcpp/rclcpp.hpp>
40 // tf2 includes
43 #ifdef ROS2_VER_N250
44 #include <tf2_eigen/tf2_eigen.hpp>
45 #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
46 #else
47 #include <tf2_eigen/tf2_eigen.h>
49 #endif
50 // ROS msg includes
51 #include <diagnostic_msgs/msg/diagnostic_array.hpp>
52 #include <diagnostic_msgs/msg/diagnostic_status.hpp>
53 #include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>
54 #include <geometry_msgs/msg/quaternion.hpp>
55 #include <geometry_msgs/msg/twist_with_covariance.hpp>
56 #include <geometry_msgs/msg/twist_with_covariance_stamped.hpp>
57 #include <gps_msgs/msg/gps_fix.hpp>
58 #include <nav_msgs/msg/odometry.hpp>
59 #include <sensor_msgs/msg/imu.hpp>
60 #include <sensor_msgs/msg/nav_sat_fix.hpp>
61 #include <sensor_msgs/msg/time_reference.hpp>
62 // GNSS msg includes
63 #include <septentrio_gnss_driver/msg/aim_plus_status.hpp>
64 #include <septentrio_gnss_driver/msg/att_cov_euler.hpp>
65 #include <septentrio_gnss_driver/msg/att_euler.hpp>
66 #include <septentrio_gnss_driver/msg/base_vector_cart.hpp>
67 #include <septentrio_gnss_driver/msg/base_vector_geod.hpp>
68 #include <septentrio_gnss_driver/msg/block_header.hpp>
69 #include <septentrio_gnss_driver/msg/gal_auth_status.hpp>
70 #include <septentrio_gnss_driver/msg/meas_epoch.hpp>
71 #include <septentrio_gnss_driver/msg/meas_epoch_channel_type1.hpp>
72 #include <septentrio_gnss_driver/msg/meas_epoch_channel_type2.hpp>
73 #include <septentrio_gnss_driver/msg/pos_cov_cartesian.hpp>
74 #include <septentrio_gnss_driver/msg/pos_cov_geodetic.hpp>
75 #include <septentrio_gnss_driver/msg/pvt_cartesian.hpp>
76 #include <septentrio_gnss_driver/msg/pvt_geodetic.hpp>
77 #include <septentrio_gnss_driver/msg/receiver_time.hpp>
78 #include <septentrio_gnss_driver/msg/rf_band.hpp>
79 #include <septentrio_gnss_driver/msg/rf_status.hpp>
80 #include <septentrio_gnss_driver/msg/vector_info_cart.hpp>
81 #include <septentrio_gnss_driver/msg/vector_info_geod.hpp>
82 #include <septentrio_gnss_driver/msg/vel_cov_cartesian.hpp>
83 #include <septentrio_gnss_driver/msg/vel_cov_geodetic.hpp>
84 // NMEA msg includes
85 #include <nmea_msgs/msg/gpgga.hpp>
86 #include <nmea_msgs/msg/gpgsa.hpp>
87 #include <nmea_msgs/msg/gpgsv.hpp>
88 #include <nmea_msgs/msg/gprmc.hpp>
89 // INS msg includes
90 #include <septentrio_gnss_driver/msg/ext_sensor_meas.hpp>
91 #include <septentrio_gnss_driver/msg/imu_setup.hpp>
92 #include <septentrio_gnss_driver/msg/ins_nav_cart.hpp>
93 #include <septentrio_gnss_driver/msg/ins_nav_geod.hpp>
94 #include <septentrio_gnss_driver/msg/vel_sensor_setup.hpp>
95 // Rosaic includes
99 
100 // Timestamp in nanoseconds (Unix epoch)
101 typedef uint64_t Timestamp;
102 // ROS timestamp
103 typedef rclcpp::Time TimestampRos;
104 
105 // ROS messages
106 typedef diagnostic_msgs::msg::DiagnosticArray DiagnosticArrayMsg;
107 typedef diagnostic_msgs::msg::DiagnosticStatus DiagnosticStatusMsg;
108 typedef geometry_msgs::msg::Quaternion QuaternionMsg;
109 typedef geometry_msgs::msg::PoseWithCovarianceStamped PoseWithCovarianceStampedMsg;
110 typedef geometry_msgs::msg::TwistWithCovarianceStamped TwistWithCovarianceStampedMsg;
111 typedef geometry_msgs::msg::TransformStamped TransformStampedMsg;
112 typedef geometry_msgs::msg::Vector3 Vector3Msg;
113 typedef gps_msgs::msg::GPSFix GpsFixMsg;
114 typedef gps_msgs::msg::GPSStatus GpsStatusMsg;
115 typedef sensor_msgs::msg::NavSatFix NavSatFixMsg;
116 typedef sensor_msgs::msg::NavSatStatus NavSatStatusMsg;
117 typedef sensor_msgs::msg::TimeReference TimeReferenceMsg;
118 typedef sensor_msgs::msg::Imu ImuMsg;
119 typedef nav_msgs::msg::Odometry LocalizationMsg;
120 
121 // Septentrio GNSS SBF messages
122 typedef septentrio_gnss_driver::msg::AIMPlusStatus AimPlusStatusMsg;
123 typedef septentrio_gnss_driver::msg::BaseVectorCart BaseVectorCartMsg;
124 typedef septentrio_gnss_driver::msg::BaseVectorGeod BaseVectorGeodMsg;
125 typedef septentrio_gnss_driver::msg::BlockHeader BlockHeaderMsg;
126 typedef septentrio_gnss_driver::msg::GALAuthStatus GalAuthStatusMsg;
127 typedef septentrio_gnss_driver::msg::RFStatus RfStatusMsg;
128 typedef septentrio_gnss_driver::msg::RFBand RfBandMsg;
129 typedef septentrio_gnss_driver::msg::MeasEpoch MeasEpochMsg;
130 typedef septentrio_gnss_driver::msg::MeasEpochChannelType1 MeasEpochChannelType1Msg;
131 typedef septentrio_gnss_driver::msg::MeasEpochChannelType2 MeasEpochChannelType2Msg;
132 typedef septentrio_gnss_driver::msg::AttCovEuler AttCovEulerMsg;
133 typedef septentrio_gnss_driver::msg::AttEuler AttEulerMsg;
134 typedef septentrio_gnss_driver::msg::PVTCartesian PVTCartesianMsg;
135 typedef septentrio_gnss_driver::msg::PVTGeodetic PVTGeodeticMsg;
136 typedef septentrio_gnss_driver::msg::PosCovCartesian PosCovCartesianMsg;
137 typedef septentrio_gnss_driver::msg::PosCovGeodetic PosCovGeodeticMsg;
138 typedef septentrio_gnss_driver::msg::ReceiverTime ReceiverTimeMsg;
139 typedef septentrio_gnss_driver::msg::VectorInfoCart VectorInfoCartMsg;
140 typedef septentrio_gnss_driver::msg::VectorInfoGeod VectorInfoGeodMsg;
141 typedef septentrio_gnss_driver::msg::VelCovCartesian VelCovCartesianMsg;
142 typedef septentrio_gnss_driver::msg::VelCovGeodetic VelCovGeodeticMsg;
143 
144 // NMEA message
145 typedef nmea_msgs::msg::Gpgga GpggaMsg;
146 typedef nmea_msgs::msg::Gpgsa GpgsaMsg;
147 typedef nmea_msgs::msg::Gpgsv GpgsvMsg;
148 typedef nmea_msgs::msg::Gprmc GprmcMsg;
149 
150 // Septentrio INS+GNSS SBF messages
151 typedef septentrio_gnss_driver::msg::INSNavCart INSNavCartMsg;
152 typedef septentrio_gnss_driver::msg::INSNavGeod INSNavGeodMsg;
153 typedef septentrio_gnss_driver::msg::IMUSetup IMUSetupMsg;
154 typedef septentrio_gnss_driver::msg::VelSensorSetup VelSensorSetupMsg;
155 typedef septentrio_gnss_driver::msg::ExtSensorMeas ExtSensorMeasMsg;
156 
163 
170 {
171  return tsr.nanoseconds();
172 }
173 
177 namespace log_level {
178  enum LogLevel
179  {
185  };
186 } // namespace log_level
187 
192 class ROSaicNodeBase : public rclcpp::Node
193 {
194 public:
195  ROSaicNodeBase(const rclcpp::NodeOptions& options) :
196  Node("septentrio_gnss", options), tf2Publisher_(this),
197  tfBuffer_(this->get_clock()), tfListener_(tfBuffer_)
198  {
199  }
200 
202 
203  bool ok() { return rclcpp::ok(); }
204 
205  const Settings* settings() const { return &settings_; }
206 
208  {
209  try
210  {
211  if (settings_.ins_vsm.ros_source == "odometry")
213  this->create_subscription<nav_msgs::msg::Odometry>(
214  "odometry_vsm",
215  rclcpp::QoS(rclcpp::KeepLast(1))
216  .durability_volatile()
217  .best_effort(),
218  std::bind(&ROSaicNodeBase::callbackOdometry, this,
219  std::placeholders::_1));
220  else if (settings_.ins_vsm.ros_source == "twist")
222  this->create_subscription<TwistWithCovarianceStampedMsg>(
223  "twist_vsm",
224  rclcpp::QoS(rclcpp::KeepLast(1))
225  .durability_volatile()
226  .best_effort(),
227  std::bind(&ROSaicNodeBase::callbackTwist, this,
228  std::placeholders::_1));
229  } catch (const std::runtime_error& ex)
230  {
231  this->log(log_level::ERROR, "Subscriber initialization failed due to: " +
232  std::string(ex.what()) + ".");
233  }
234  }
235 
244  bool getUint32Param(const std::string& name, uint32_t& val, uint32_t defaultVal)
245  {
246  int32_t tempVal;
247  if ((!this->param(name, tempVal, -1)) || (tempVal < 0))
248  {
249  val = defaultVal;
250  return false;
251  }
252  val = tempVal;
253  return true;
254  }
255 
264  template <typename T>
265  bool param(const std::string& name, T& val, const T& defaultVal)
266  {
267  if (this->has_parameter(name))
268  this->undeclare_parameter(name);
269 
270  try
271  {
272  val = this->declare_parameter<T>(name, defaultVal);
273  } catch (std::runtime_error& e)
274  {
275  RCLCPP_WARN_STREAM(this->get_logger(), e.what());
276  return false;
277  }
278  return true;
279  };
280 
286  void log(log_level::LogLevel logLevel, const std::string& s) const
287  {
288  switch (logLevel)
289  {
290  case log_level::DEBUG:
291  RCLCPP_DEBUG_STREAM(this->get_logger(), s);
292  break;
293  case log_level::INFO:
294  RCLCPP_INFO_STREAM(this->get_logger(), s);
295  break;
296  case log_level::WARN:
297  RCLCPP_WARN_STREAM(this->get_logger(), s);
298  break;
299  case log_level::ERROR:
300  RCLCPP_ERROR_STREAM(this->get_logger(), s);
301  break;
302  case log_level::FATAL:
303  RCLCPP_FATAL_STREAM(this->get_logger(), s);
304  break;
305  default:
306  break;
307  }
308  }
309 
314  Timestamp getTime() const { return this->now().nanoseconds(); }
315 
321  template <typename M>
322  void publishMessage(const std::string& topic, const M& msg)
323  {
324  if constexpr (has_block_header<M>::value)
325  {
326  if (settings_.publish_only_valid && !validValue(msg.block_header.tow))
327  return;
328  }
329 
330  auto it = topicMap_.find(topic);
331  if (it != topicMap_.end())
332  {
333  typename rclcpp::Publisher<M>::SharedPtr ptr =
334  std::any_cast<typename rclcpp::Publisher<M>::SharedPtr>(it->second);
335  ptr->publish(msg);
336  } else
337  {
338  if (this->ok())
339  {
340  typename rclcpp::Publisher<M>::SharedPtr pub =
341  this->create_publisher<M>(
342  topic, rclcpp::QoS(rclcpp::KeepLast(queueSize_))
343  .durability_volatile()
344  .reliable());
345  topicMap_.insert(std::make_pair(topic, pub));
346  pub->publish(msg);
347  }
348  }
349  }
350 
355  void publishTf(const LocalizationMsg& loc)
356  {
357  if (std::isnan(loc.pose.pose.orientation.w))
358  return;
359 
360  Timestamp currentStamp = timestampFromRos(loc.header.stamp);
361  if (lastTfStamp_ == currentStamp)
362  return;
363 
364  lastTfStamp_ = currentStamp;
365 
366  geometry_msgs::msg::TransformStamped transformStamped;
367 
368  transformStamped.header.stamp = loc.header.stamp;
369  transformStamped.header.frame_id = loc.header.frame_id;
370  transformStamped.child_frame_id = loc.child_frame_id;
371  transformStamped.transform.translation.x = loc.pose.pose.position.x;
372  transformStamped.transform.translation.y = loc.pose.pose.position.y;
373  transformStamped.transform.translation.z = loc.pose.pose.position.z;
374  transformStamped.transform.rotation.x = loc.pose.pose.orientation.x;
375  transformStamped.transform.rotation.y = loc.pose.pose.orientation.y;
376  transformStamped.transform.rotation.z = loc.pose.pose.orientation.z;
377  transformStamped.transform.rotation.w = loc.pose.pose.orientation.w;
378 
380  {
381  geometry_msgs::msg::TransformStamped T_l_b;
382  try
383  {
384  // try to get tf at timestamp of message
385  T_l_b = tfBuffer_.lookupTransform(
386  loc.child_frame_id, settings_.local_frame_id, loc.header.stamp);
387  } catch (const tf2::TransformException& ex)
388  {
389  try
390  {
391  RCLCPP_INFO_STREAM_THROTTLE(
392  this->get_logger(), *this->get_clock(), 10000,
393  ": No transform for insertion of local frame at t="
394  << std::to_string(currentStamp)
395  << ". Exception: " << std::string(ex.what()));
396  // try to get latest tf
397  T_l_b = tfBuffer_.lookupTransform(loc.child_frame_id,
399  rclcpp::Time(0));
400  } catch (const tf2::TransformException& ex)
401  {
402  RCLCPP_WARN_STREAM_THROTTLE(
403  this->get_logger(), *this->get_clock(), 10000,
404  ": No most recent transform for insertion of local frame. Exception: "
405  << std::string(ex.what()));
406  return;
407  }
408  }
409 
410  // T_l_g = T_b_l^-1 * T_b_g;
411  transformStamped =
412  tf2::eigenToTransform(tf2::transformToEigen(transformStamped) *
413  tf2::transformToEigen(T_l_b));
414  transformStamped.header.stamp = loc.header.stamp;
415  transformStamped.header.frame_id = loc.header.frame_id;
416  transformStamped.child_frame_id = settings_.local_frame_id;
417  }
418 
419  tf2Publisher_.sendTransform(transformStamped);
420  }
421 
425  void setIsIns() { capabilities_.is_ins = true; }
426 
431 
436 
440  bool isIns() { return capabilities_.is_ins; }
441 
446 
451 
452 private:
453  void callbackOdometry(const nav_msgs::msg::Odometry::ConstSharedPtr odo)
454  {
455  Timestamp stamp = timestampFromRos(odo->header.stamp);
456 
457  processTwist(stamp, odo->twist);
458  }
459 
460  void callbackTwist(const TwistWithCovarianceStampedMsg::ConstSharedPtr twist)
461  {
462  Timestamp stamp = timestampFromRos(twist->header.stamp);
463 
464  processTwist(stamp, twist->twist);
465  }
466 
468  const geometry_msgs::msg::TwistWithCovariance& twist)
469  {
470  // in case stamp was not set
471  if (stamp == 0)
472  stamp = getTime();
473 
474  thread_local Eigen::Vector3d vel = Eigen::Vector3d::Zero();
475  thread_local Eigen::Vector3d var = Eigen::Vector3d::Zero();
476  thread_local uint64_t ctr = 0;
477  thread_local Timestamp lastStamp = 0;
478 
479  ++ctr;
480  vel[0] += twist.twist.linear.x;
481  vel[1] += twist.twist.linear.y;
482  vel[2] += twist.twist.linear.z;
483  var[0] += twist.covariance[0];
484  var[1] += twist.covariance[7];
485  var[2] += twist.covariance[14];
486 
487  // Rx expects averaged velocity at a rate of 2 Hz
488  if ((stamp - lastStamp) >= 495000000) // allow for 5 ms jitter
489  {
490  vel /= ctr;
491  var /= ctr;
492  time_t epochSeconds = stamp / 1000000000;
493  struct tm* tm_temp = std::gmtime(&epochSeconds);
494  std::stringstream timeUtc;
495  timeUtc << std::setfill('0') << std::setw(2)
496  << std::to_string(tm_temp->tm_hour) << std::setw(2)
497  << std::to_string(tm_temp->tm_min) << std::setw(2)
498  << std::to_string(tm_temp->tm_sec) << "." << std::setw(3)
499  << std::to_string((stamp - (stamp / 1000000000) * 1000000000) /
500  1000000);
501 
502  std::string v_x;
503  std::string v_y;
504  std::string v_z;
505  std::string std_x;
506  std::string std_y;
507  std::string std_z;
509  {
514  else if (var[0] > 0.0)
515  std_x = string_utilities::trimDecimalPlaces(std::sqrt(var[0]));
517  {
518  log(log_level::ERROR, "Invalid covariance value for v_x: " +
519  std::to_string(var[0]) +
520  ". Ignoring measurement.");
521  v_x = "";
522  std_x = string_utilities::trimDecimalPlaces(1000000.0);
523  }
524  } else
525  std_x = std::to_string(1000000.0);
527  {
529  v_y = "-";
534  else if (var[1] > 0.0)
535  std_y = string_utilities::trimDecimalPlaces(std::sqrt(var[1]));
537  {
538  log(log_level::ERROR, "Invalid covariance value for v_y: " +
539  std::to_string(var[1]) +
540  ". Ignoring measurement.");
541  v_y = "";
542  std_y = string_utilities::trimDecimalPlaces(1000000.0);
543  }
544  } else
545  std_y = string_utilities::trimDecimalPlaces(1000000.0);
547  {
549  v_z = "-";
554  else if (var[2] > 0.0)
555  std_z = string_utilities::trimDecimalPlaces(std::sqrt(var[2]));
557  {
558  log(log_level::ERROR, "Invalid covariance value for v_z: " +
559  std::to_string(var[2]) +
560  ". Ignoring measurement.");
561  v_z = "";
562  std_z = string_utilities::trimDecimalPlaces(1000000.0);
563  }
564  } else
565  std_z = string_utilities::trimDecimalPlaces(1000000.0);
566 
567  std::string velNmea = "$PSSN,VSM," + timeUtc.str() + "," + v_x + "," +
568  v_y + "," + std_x + "," + std_y + "," + v_z + "," +
569  std_z;
570 
571  char crc = std::accumulate(velNmea.begin() + 1, velNmea.end(), 0,
572  [](char sum, char ch) { return sum ^ ch; });
573 
574  std::stringstream crcss;
575  crcss << std::hex << static_cast<int32_t>(crc);
576 
577  velNmea += "*" + crcss.str() + "\r\n";
578  sendVelocity(velNmea);
579 
580  vel = Eigen::Vector3d::Zero();
581  var = Eigen::Vector3d::Zero();
582  ctr = 0;
583  lastStamp = stamp;
584  }
585  }
586 
587 protected:
591  virtual void sendVelocity(const std::string& velNmea) = 0;
592 
593 private:
595  std::unordered_map<std::string, std::any> topicMap_;
597  uint32_t queueSize_ = 1;
601  rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr odometrySubscriber_;
603  rclcpp::Subscription<TwistWithCovarianceStampedMsg>::SharedPtr twistSubscriber_;
608  // tf listener
610  // Capabilities of Rx
612 };
log_level::WARN
@ WARN
Definition: typedefs.hpp:182
GpggaMsg
nmea_msgs::msg::Gpgga GpggaMsg
Definition: typedefs.hpp:145
ROSaicNodeBase::tfListener_
tf2_ros::TransformListener tfListener_
Definition: typedefs.hpp:609
Timestamp
uint64_t Timestamp
Definition: typedefs.hpp:101
ROSaicNodeBase::registerSubscriber
void registerSubscriber()
Definition: typedefs.hpp:207
timestampFromRos
Timestamp timestampFromRos(const TimestampRos &tsr)
Convert ROS timestamp to nsec timestamp.
Definition: typedefs.hpp:169
INSNavCartMsg
septentrio_gnss_driver::msg::INSNavCart INSNavCartMsg
Definition: typedefs.hpp:151
Settings::local_frame_id
std::string local_frame_id
Frame id of the local frame to be inserted.
Definition: settings.hpp:338
ROSaicNodeBase::capabilities_
Capabilities capabilities_
Definition: typedefs.hpp:611
VectorInfoCartMsg
septentrio_gnss_driver::msg::VectorInfoCart VectorInfoCartMsg
Definition: typedefs.hpp:139
ImuMsg
sensor_msgs::msg::Imu ImuMsg
Definition: typedefs.hpp:118
InsVsm::ros_source
std::string ros_source
VSM source for INS.
Definition: settings.hpp:115
InsVsm::ros_config
std::vector< bool > ros_config
Whether or not to use individual elements of 3D velocity (v_x, v_y, v_z)
Definition: settings.hpp:117
MeasEpochChannelType1Msg
septentrio_gnss_driver::msg::MeasEpochChannelType1 MeasEpochChannelType1Msg
Definition: typedefs.hpp:130
PoseWithCovarianceStampedMsg
geometry_msgs::msg::PoseWithCovarianceStamped PoseWithCovarianceStampedMsg
Definition: typedefs.hpp:109
AttEulerMsg
septentrio_gnss_driver::msg::AttEuler AttEulerMsg
Definition: typedefs.hpp:133
Settings::insert_local_frame
bool insert_local_frame
Wether local frame should be inserted into tf.
Definition: settings.hpp:336
ROSaicNodeBase::log
void log(log_level::LogLevel logLevel, const std::string &s) const
Log function to provide abstraction of ROS loggers.
Definition: typedefs.hpp:286
MeasEpochChannelType2Msg
septentrio_gnss_driver::msg::MeasEpochChannelType2 MeasEpochChannelType2Msg
Definition: typedefs.hpp:131
Capabilities::has_heading
bool has_heading
Wether Rx has heading.
Definition: settings.hpp:382
GpgsvMsg
nmea_msgs::msg::Gpgsv GpgsvMsg
Definition: typedefs.hpp:147
tf2_eigen.h
Capabilities
Capabilities struct.
Definition: settings.hpp:377
s
XmlRpcServer s
TimeReferenceMsg
sensor_msgs::msg::TimeReference TimeReferenceMsg
Definition: typedefs.hpp:117
Capabilities::has_improved_vsm_handling
bool has_improved_vsm_handling
Wether Rx has improved VSM handling.
Definition: settings.hpp:384
VelCovGeodeticMsg
septentrio_gnss_driver::msg::VelCovGeodetic VelCovGeodeticMsg
Definition: typedefs.hpp:142
QuaternionMsg
geometry_msgs::msg::Quaternion QuaternionMsg
Definition: typedefs.hpp:108
DiagnosticArrayMsg
diagnostic_msgs::msg::DiagnosticArray DiagnosticArrayMsg
Definition: typedefs.hpp:106
BaseVectorGeodMsg
septentrio_gnss_driver::msg::BaseVectorGeod BaseVectorGeodMsg
Definition: typedefs.hpp:124
timestampToRos
TimestampRos timestampToRos(Timestamp ts)
Convert nsec timestamp to ROS timestamp.
Definition: typedefs.hpp:162
ROSaicNodeBase::hasImprovedVsmHandling
bool hasImprovedVsmHandling()
Check if Rx has improved VSM handling.
Definition: typedefs.hpp:450
settings.hpp
PVTCartesianMsg
septentrio_gnss_driver::msg::PVTCartesian PVTCartesianMsg
Definition: typedefs.hpp:134
ROSaicNodeBase::publishMessage
void publishMessage(const std::string &topic, const M &msg)
Publishing function.
Definition: typedefs.hpp:322
IMUSetupMsg
septentrio_gnss_driver::msg::IMUSetup IMUSetupMsg
Definition: typedefs.hpp:153
sbf_utilities.hpp
ROSaicNodeBase::topicMap_
std::unordered_map< std::string, std::any > topicMap_
Map of topics and publishers.
Definition: typedefs.hpp:595
ROSaicNodeBase::ok
bool ok()
Definition: typedefs.hpp:203
ROSaicNodeBase::callbackOdometry
void callbackOdometry(const nav_msgs::msg::Odometry::ConstSharedPtr odo)
Definition: typedefs.hpp:453
ROSaicNodeBase
This class is the base class for abstraction.
Definition: typedefs.hpp:192
transform_broadcaster.h
tf2::eigenToTransform
geometry_msgs::TransformStamped eigenToTransform(const Eigen::Affine3d &T)
ReceiverTimeMsg
septentrio_gnss_driver::msg::ReceiverTime ReceiverTimeMsg
Definition: typedefs.hpp:138
log_level::FATAL
@ FATAL
Definition: typedefs.hpp:184
tf2_ros::TransformListener
ROSaicNodeBase::lastTfStamp_
Timestamp lastTfStamp_
Last tf stamp.
Definition: typedefs.hpp:605
PosCovCartesianMsg
septentrio_gnss_driver::msg::PosCovCartesian PosCovCartesianMsg
Definition: typedefs.hpp:136
ROSaicNodeBase::getUint32Param
bool getUint32Param(const std::string &name, uint32_t &val, uint32_t defaultVal)
Gets an integer or unsigned integer value from the parameter server.
Definition: typedefs.hpp:244
ROSaicNodeBase::processTwist
void processTwist(Timestamp stamp, const geometry_msgs::msg::TwistWithCovariance &twist)
Definition: typedefs.hpp:467
ROSaicNodeBase::odometrySubscriber_
rclcpp::Subscription< nav_msgs::msg::Odometry >::SharedPtr odometrySubscriber_
Odometry subscriber.
Definition: typedefs.hpp:601
ROSaicNodeBase::callbackTwist
void callbackTwist(const TwistWithCovarianceStampedMsg::ConstSharedPtr twist)
Definition: typedefs.hpp:460
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)
INSNavGeodMsg
septentrio_gnss_driver::msg::INSNavGeod INSNavGeodMsg
Definition: typedefs.hpp:152
MeasEpochMsg
septentrio_gnss_driver::msg::MeasEpoch MeasEpochMsg
Definition: typedefs.hpp:129
Vector3Msg
geometry_msgs::msg::Vector3 Vector3Msg
Definition: typedefs.hpp:112
Settings::use_ros_axis_orientation
bool use_ros_axis_orientation
ROS axis orientation, body: front-left-up, geographic: ENU.
Definition: settings.hpp:211
string_utilities::trimDecimalPlaces
std::string trimDecimalPlaces(double num)
Trims decimal places to three.
Definition: string_utilities.cpp:190
GalAuthStatusMsg
septentrio_gnss_driver::msg::GALAuthStatus GalAuthStatusMsg
Definition: typedefs.hpp:126
TwistWithCovarianceStampedMsg
geometry_msgs::msg::TwistWithCovarianceStamped TwistWithCovarianceStampedMsg
Definition: typedefs.hpp:110
ROSaicNodeBase::isIns
bool isIns()
Check if Rx is INS.
Definition: typedefs.hpp:440
ROSaicNodeBase::settings
const Settings * settings() const
Definition: typedefs.hpp:205
NavSatFixMsg
sensor_msgs::msg::NavSatFix NavSatFixMsg
Definition: typedefs.hpp:115
ROSaicNodeBase::setImprovedVsmHandling
void setImprovedVsmHandling()
Set improved VSM handling to true.
Definition: typedefs.hpp:435
validValue
bool validValue(T s)
Check if value is not set to Do-Not-Use.
Definition: sbf_utilities.hpp:51
GprmcMsg
nmea_msgs::msg::Gprmc GprmcMsg
Definition: typedefs.hpp:148
PosCovGeodeticMsg
septentrio_gnss_driver::msg::PosCovGeodetic PosCovGeodeticMsg
Definition: typedefs.hpp:137
has_block_header
Definition: sbf_utilities.hpp:37
InsVsm::ros_variances
std::vector< double > ros_variances
Variances of the 3D velocity (var_x, var_y, var_z)
Definition: settings.hpp:121
tf2_ros::Buffer
TransformStampedMsg
geometry_msgs::msg::TransformStamped TransformStampedMsg
Definition: typedefs.hpp:111
TimestampRos
rclcpp::Time TimestampRos
Definition: typedefs.hpp:103
AttCovEulerMsg
septentrio_gnss_driver::msg::AttCovEuler AttCovEulerMsg
Definition: typedefs.hpp:132
ROSaicNodeBase::param
bool param(const std::string &name, T &val, const T &defaultVal)
Gets parameter of type T from the parameter server.
Definition: typedefs.hpp:265
VelCovCartesianMsg
septentrio_gnss_driver::msg::VelCovCartesian VelCovCartesianMsg
Definition: typedefs.hpp:141
ROSaicNodeBase::hasHeading
bool hasHeading()
Check if Rx has heading.
Definition: typedefs.hpp:445
BlockHeaderMsg
septentrio_gnss_driver::msg::BlockHeader BlockHeaderMsg
Definition: typedefs.hpp:125
GpsStatusMsg
gps_msgs::msg::GPSStatus GpsStatusMsg
Definition: typedefs.hpp:114
ROSaicNodeBase::settings_
Settings settings_
Settings.
Definition: typedefs.hpp:589
tf2::transformToEigen
Eigen::Isometry3d transformToEigen(const geometry_msgs::Transform &t)
Settings
Settings struct.
Definition: settings.hpp:149
ROSaicNodeBase::tf2Publisher_
tf2_ros::TransformBroadcaster tf2Publisher_
Transform publisher.
Definition: typedefs.hpp:599
BaseVectorCartMsg
septentrio_gnss_driver::msg::BaseVectorCart BaseVectorCartMsg
Definition: typedefs.hpp:123
ROSaicNodeBase::setIsIns
void setIsIns()
Set INS to true.
Definition: typedefs.hpp:425
PVTGeodeticMsg
septentrio_gnss_driver::msg::PVTGeodetic PVTGeodeticMsg
Definition: typedefs.hpp:135
log_level
Log level for ROS logging.
Definition: typedefs.hpp:177
transform_listener.h
log_level::ERROR
@ ERROR
Definition: typedefs.hpp:183
ROSaicNodeBase::getTime
Timestamp getTime() const
Gets current timestamp.
Definition: typedefs.hpp:314
Settings::ins_vsm
InsVsm ins_vsm
INS VSM setting.
Definition: settings.hpp:373
VectorInfoGeodMsg
septentrio_gnss_driver::msg::VectorInfoGeod VectorInfoGeodMsg
Definition: typedefs.hpp:140
NavSatStatusMsg
sensor_msgs::msg::NavSatStatus NavSatStatusMsg
Definition: typedefs.hpp:116
string_utilities.hpp
Declares lower-level string utility functions used when parsing messages.
AimPlusStatusMsg
septentrio_gnss_driver::msg::AIMPlusStatus AimPlusStatusMsg
Definition: typedefs.hpp:122
Capabilities::is_ins
bool is_ins
Wether Rx is INS.
Definition: settings.hpp:380
ROSaicNodeBase::setHasHeading
void setHasHeading()
Set has heading to true.
Definition: typedefs.hpp:430
log_level::DEBUG
@ DEBUG
Definition: typedefs.hpp:180
ROSaicNodeBase::~ROSaicNodeBase
~ROSaicNodeBase()
Definition: typedefs.hpp:201
tf2_ros::TransformBroadcaster
crc
Definition: crc.hpp:42
ExtSensorMeasMsg
septentrio_gnss_driver::msg::ExtSensorMeas ExtSensorMeasMsg
Definition: typedefs.hpp:155
VelSensorSetupMsg
septentrio_gnss_driver::msg::VelSensorSetup VelSensorSetupMsg
Definition: typedefs.hpp:154
tf2_geometry_msgs.h
ROSaicNodeBase::twistSubscriber_
rclcpp::Subscription< TwistWithCovarianceStampedMsg >::SharedPtr twistSubscriber_
Twist subscriber.
Definition: typedefs.hpp:603
log_level::LogLevel
LogLevel
Definition: typedefs.hpp:178
ROSaicNodeBase::tfBuffer_
tf2_ros::Buffer tfBuffer_
tf buffer
Definition: typedefs.hpp:607
GpsFixMsg
gps_msgs::msg::GPSFix GpsFixMsg
Definition: typedefs.hpp:113
RfStatusMsg
septentrio_gnss_driver::msg::RFStatus RfStatusMsg
Definition: typedefs.hpp:127
Settings::publish_only_valid
bool publish_only_valid
Wether to publish only valid messages.
Definition: settings.hpp:257
LocalizationMsg
nav_msgs::msg::Odometry LocalizationMsg
Definition: typedefs.hpp:119
tf2::TransformException
DiagnosticStatusMsg
diagnostic_msgs::msg::DiagnosticStatus DiagnosticStatusMsg
Definition: typedefs.hpp:107
ROSaicNodeBase::queueSize_
uint32_t queueSize_
Publisher queue size.
Definition: typedefs.hpp:597
InsVsm::ros_variances_by_parameter
bool ros_variances_by_parameter
Whether or not to use variance defined by ROS parameter.
Definition: settings.hpp:119
GpgsaMsg
nmea_msgs::msg::Gpgsa GpgsaMsg
Definition: typedefs.hpp:146
RfBandMsg
septentrio_gnss_driver::msg::RFBand RfBandMsg
Definition: typedefs.hpp:128
ROSaicNodeBase::publishTf
void publishTf(const LocalizationMsg &loc)
Publishing function for tf.
Definition: typedefs.hpp:355
log_level::INFO
@ INFO
Definition: typedefs.hpp:181
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
ROSaicNodeBase::ROSaicNodeBase
ROSaicNodeBase(const rclcpp::NodeOptions &options)
Definition: typedefs.hpp:195


septentrio_gnss_driver
Author(s): Tibor Dome, Thomas Emter
autogenerated on Sat May 10 2025 03:03:11