rosaic_node.cpp
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 // Eigen include
32 #include <Eigen/Geometry>
35 
36 namespace rosaic_node {
43  ROSaicNode::ROSaicNode(const rclcpp::NodeOptions& options) :
44  ROSaicNodeBase(options), IO_(this), tfBuffer_(this->get_clock())
45  {
46  param("activate_debug_log", settings_.activate_debug_log, false);
48  {
49  auto ret = rcutils_logging_set_logger_level(
50  this->get_logger().get_name(), RCUTILS_LOG_SEVERITY_DEBUG);
51  if (ret != RCUTILS_RET_OK)
52  {
53  RCLCPP_ERROR(this->get_logger(), "Error setting severity: %s",
54  rcutils_get_error_string().str);
55  rcutils_reset_error();
56  }
57  }
58 
59  this->log(log_level::DEBUG, "Called ROSaicNode() constructor..");
60 
61  tfListener_ = std::make_unique<tf2_ros::TransformListener>(tfBuffer_);
62 
63  // Parameters must be set before initializing IO
64  if (!getROSParams())
65  return;
66 
67  setupThread_ = std::thread(std::bind(&ROSaicNode::setup, this));
68 
69  this->log(log_level::DEBUG, "Leaving ROSaicNode() constructor..");
70  }
71 
73  {
74  IO_.close();
75  if (setupThread_.joinable())
76  setupThread_.join();
77  }
78 
80  {
81  // Initializes Connection
82  IO_.connect();
83  }
84 
85  [[nodiscard]] bool ROSaicNode::getROSParams()
86  {
87  param("ntp_server", settings_.ntp_server, false);
88  param("ptp_server_clock", settings_.ptp_server_clock, false);
89  param("use_gnss_time", settings_.use_gnss_time, false);
90  param("latency_compensation", settings_.latency_compensation, false);
91  param("frame_id", settings_.frame_id, static_cast<std::string>("gnss"));
92  param("imu_frame_id", settings_.imu_frame_id,
93  static_cast<std::string>("imu"));
94  param("poi_frame_id", settings_.poi_frame_id,
95  static_cast<std::string>("base_link"));
96  param("vsm_frame_id", settings_.vsm_frame_id,
97  static_cast<std::string>("vsm"));
98  param("aux1_frame_id", settings_.aux1_frame_id,
99  static_cast<std::string>("aux1"));
100  param("vehicle_frame_id", settings_.vehicle_frame_id,
102  param("local_frame_id", settings_.local_frame_id,
103  static_cast<std::string>("odom"));
104  param("insert_local_frame", settings_.insert_local_frame, false);
105  param("lock_utm_zone", settings_.lock_utm_zone, true);
106  param("leap_seconds", settings_.leap_seconds, -128);
107  param("configure_rx", settings_.configure_rx, true);
108 
109  param("custom_commands_file", settings_.custom_commands_file,
110  static_cast<std::string>(""));
111 
112  // Communication parameters
113  param("device", settings_.device, static_cast<std::string>("/dev/ttyACM0"));
114  getUint32Param("serial.baudrate", settings_.baudrate,
115  static_cast<uint32_t>(921600));
116  param("serial.hw_flow_control", settings_.hw_flow_control,
117  static_cast<std::string>("off"));
118  getUint32Param("stream_device.tcp.port", settings_.tcp_port,
119  static_cast<uint32_t>(0));
120  param("stream_device.tcp.ip_server", settings_.tcp_ip_server,
121  static_cast<std::string>(""));
122  getUint32Param("stream_device.udp.port", settings_.udp_port,
123  static_cast<uint32_t>(0));
124  param("stream_device.udp.unicast_ip", settings_.udp_unicast_ip,
125  static_cast<std::string>(""));
126  param("stream_device.udp.ip_server", settings_.udp_ip_server,
127  static_cast<std::string>(""));
128  param("login.user", settings_.login_user, static_cast<std::string>(""));
129  param("login.password", settings_.login_password,
130  static_cast<std::string>(""));
131 
132  settings_.reconnect_delay_s = 2.0f; // Removed from ROS parameter list.
133  param("receiver_type", settings_.septentrio_receiver_type,
134  static_cast<std::string>("gnss"));
135  if (!((settings_.septentrio_receiver_type == "gnss") ||
137  {
138  this->log(log_level::FATAL, "Unkown septentrio_receiver_type " +
140  " use either gnss or ins.");
141  return false;
142  }
143 
144  if (settings_.configure_rx && !settings_.tcp_ip_server.empty() &&
145  !settings_.udp_ip_server.empty())
146  {
147  this->log(
149  "Both UDP and TCP have been defined to receive data, only TCP will be used. If UDP is intended, leave tcp/ip_server empty.");
150  }
151 
152  // Polling period parameters
153  getUint32Param("polling_period.pvt", settings_.polling_period_pvt,
154  static_cast<uint32_t>(1000));
157  {
158  this->log(
160  "Please specify a valid polling period for PVT-related SBF blocks and NMEA messages. " +
161  std::to_string(settings_.polling_period_pvt));
162  return false;
163  }
164  getUint32Param("polling_period.rest", settings_.polling_period_rest,
165  static_cast<uint32_t>(1000));
168  {
169  this->log(
171  "Please specify a valid polling period for PVT-unrelated SBF blocks and NMEA messages.");
172  return false;
173  }
174 
175  // OSNMA parameters
176  param("osnma.mode", settings_.osnma.mode, std::string("off"));
177  param("osnma.ntp_server", settings_.osnma.ntp_server, std::string(""));
178  param("osnma.keep_open", settings_.osnma.keep_open, true);
179 
180  // multi_antenna param
181  param("multi_antenna", settings_.multi_antenna, false);
182 
183  // Publishing parameters
184  param("publish.auto_publish", settings_.auto_publish, false);
185  param("publish.publish_only_valid", settings_.publish_only_valid, false);
186  param("publish.gpst", settings_.publish_gpst, false);
187  param("publish.navsatfix", settings_.publish_navsatfix, true);
188  param("publish.gpsfix", settings_.publish_gpsfix, false);
189  param("publish.pose", settings_.publish_pose, false);
190  param("publish.diagnostics", settings_.publish_diagnostics, false);
191  param("publish.aimplusstatus", settings_.publish_aimplusstatus, false);
192  param("publish.galauthstatus", settings_.publish_galauthstatus, false);
193  param("publish.gpgga", settings_.publish_gpgga, false);
194  param("publish.gprmc", settings_.publish_gprmc, false);
195  param("publish.gpgsa", settings_.publish_gpgsa, false);
196  param("publish.gpgsv", settings_.publish_gpgsv, false);
197  param("publish.measepoch", settings_.publish_measepoch, false);
198  param("publish.pvtcartesian", settings_.publish_pvtcartesian, false);
199  param("publish.pvtgeodetic", settings_.publish_pvtgeodetic, false);
200  param("publish.basevectorcart", settings_.publish_basevectorcart, false);
201  param("publish.basevectorgeod", settings_.publish_basevectorgeod, false);
202  param("publish.poscovcartesian", settings_.publish_poscovcartesian, false);
203  param("publish.poscovgeodetic", settings_.publish_poscovgeodetic, false);
204  param("publish.velcovcartesian", settings_.publish_velcovcartesian, false);
205  param("publish.velcovgeodetic", settings_.publish_velcovgeodetic, false);
206  param("publish.atteuler", settings_.publish_atteuler, false);
207  param("publish.attcoveuler", settings_.publish_attcoveuler, false);
208  param("publish.insnavcart", settings_.publish_insnavcart, false);
209  param("publish.insnavgeod", settings_.publish_insnavgeod, false);
210  param("publish.imusetup", settings_.publish_imusetup, false);
211  param("publish.velsensorsetup", settings_.publish_velsensorsetup, false);
212  param("publish.exteventinsnavgeod", settings_.publish_exteventinsnavgeod,
213  false);
214  param("publish.exteventinsnavcart", settings_.publish_exteventinsnavcart,
215  false);
216  param("publish.extsensormeas", settings_.publish_extsensormeas, false);
217  param("publish.imu", settings_.publish_imu, false);
218  param("publish.localization", settings_.publish_localization, false);
219  param("publish.localization_ecef", settings_.publish_localization_ecef,
220  false);
221  param("publish.twist", settings_.publish_twist, false);
222  param("publish.tf", settings_.publish_tf, false);
223  param("publish.tf_ecef", settings_.publish_tf_ecef, false);
224 
226  {
227  this->log(
229  "Only one of the tfs may be published at once, just activating tf in ECEF ");
230  settings_.publish_tf = false;
231  }
232 
233  // Datum and marker-to-ARP offset
234  param("datum", settings_.datum, std::string("Default"));
235  // WGS84 is equivalent to Default and kept for backwards compatibility
236  if (settings_.datum == "Default")
237  settings_.datum = "WGS84";
238  param("ant_type", settings_.ant_type, std::string("Unknown"));
239  param("ant_aux1_type", settings_.ant_aux1_type, std::string("Unknown"));
240  if (!param("ant_serial_nr", settings_.ant_serial_nr, std::string()))
241  {
242  uint32_t sn_tmp;
243  if (getUint32Param("ant_serial_nr", sn_tmp, static_cast<uint32_t>(0)))
244  settings_.ant_serial_nr = std::to_string(sn_tmp);
245  else
246  settings_.ant_serial_nr = "Unknown";
247  }
248  if (!param("ant_aux1_serial_nr", settings_.ant_aux1_serial_nr,
249  std::string()))
250  {
251  uint32_t sn_tmp;
252  if (getUint32Param("ant_aux1_serial_nr", sn_tmp,
253  static_cast<uint32_t>(0)))
254  settings_.ant_aux1_serial_nr = std::to_string(sn_tmp);
255  else
256  settings_.ant_aux1_serial_nr = "Unknown";
257  }
258  param("poi_to_arp.delta_e", settings_.delta_e, 0.0f);
259  param("poi_to_arp.delta_n", settings_.delta_n, 0.0f);
260  param("poi_to_arp.delta_u", settings_.delta_u, 0.0f);
261 
262  param("use_ros_axis_orientation", settings_.use_ros_axis_orientation, true);
263 
264  // INS Spatial Configuration
265  bool getConfigFromTf;
266  param("get_spatial_config_from_tf", getConfigFromTf, false);
267  if (getConfigFromTf)
268  {
269  // Wait a little for tf to become ready
270  using namespace std::chrono_literals;
271  std::this_thread::sleep_for(1000ms);
272 
273  if (settings_.septentrio_receiver_type == "ins")
274  {
275  TransformStampedMsg T_imu_vehicle;
277  T_imu_vehicle);
278  TransformStampedMsg T_poi_imu;
280  T_poi_imu);
281  TransformStampedMsg T_vsm_imu;
283  T_vsm_imu);
284  TransformStampedMsg T_ant_imu;
286 
287  // Rotation between IMU and vehicle
288  Eigen::Matrix3d C_imu_vehicle =
289  tf2::transformToEigen(T_imu_vehicle).rotation();
290 
291  // Lever arms from IMU in vehicle frame
292  Eigen::Affine3d T_poi_imuWrtVeh =
293  C_imu_vehicle * tf2::transformToEigen(T_poi_imu);
294  Eigen::Affine3d T_vsm_imuWrtVeh =
295  C_imu_vehicle * tf2::transformToEigen(T_vsm_imu);
296  Eigen::Affine3d T_ant_imuWrtVeh =
297  C_imu_vehicle * tf2::transformToEigen(T_ant_imu);
298 
299  // IMU orientation parameter
300  double roll, pitch, yaw;
301  getRPY(T_imu_vehicle.transform.rotation, roll, pitch, yaw);
305  // INS antenna lever arm offset parameter
306  settings_.ant_lever_x = T_ant_imuWrtVeh.translation()[0];
307  settings_.ant_lever_y = T_ant_imuWrtVeh.translation()[1];
308  settings_.ant_lever_z = T_ant_imuWrtVeh.translation()[2];
309  // INS POI ofset paramter
310  settings_.poi_x = T_poi_imuWrtVeh.translation()[0];
311  settings_.poi_y = T_poi_imuWrtVeh.translation()[1];
312  settings_.poi_z = T_poi_imuWrtVeh.translation()[2];
313  // INS velocity sensor lever arm offset parameter
314  settings_.vsm_x = T_vsm_imuWrtVeh.translation()[0];
315  settings_.vsm_y = T_vsm_imuWrtVeh.translation()[1];
316  settings_.vsm_z = T_vsm_imuWrtVeh.translation()[2];
317 
319  {
320  TransformStampedMsg T_aux1_imu;
322  T_aux1_imu);
323 
324  // Lever arms from IMU in vehicle frame
325  Eigen::Affine3d T_aux1_imuWrtVeh =
326  C_imu_vehicle * tf2::transformToEigen(T_aux1_imu);
327 
328  // Antenna Attitude Determination parameter
329  double dy = T_aux1_imuWrtVeh.translation()[1] -
330  T_ant_imuWrtVeh.translation()[1];
331  double dx = T_aux1_imuWrtVeh.translation()[0] -
332  T_ant_imuWrtVeh.translation()[0];
334  parsing_utilities::rad2deg(std::atan2(dy, dx));
335  double dz = T_aux1_imuWrtVeh.translation()[2] -
336  T_ant_imuWrtVeh.translation()[2];
337  double dr = std::sqrt(parsing_utilities::square(dx) +
340  parsing_utilities::rad2deg(std::atan2(-dz, dr));
341  }
342  }
343  if ((settings_.septentrio_receiver_type == "gnss") &&
345  {
346  TransformStampedMsg T_ant_vehicle;
348  T_ant_vehicle);
349  TransformStampedMsg T_aux1_vehicle;
351  T_aux1_vehicle);
352 
353  // Antenna Attitude Determination parameter
354  double dy = T_aux1_vehicle.transform.translation.y -
355  T_ant_vehicle.transform.translation.y;
356  double dx = T_aux1_vehicle.transform.translation.x -
357  T_ant_vehicle.transform.translation.x;
359  parsing_utilities::rad2deg(std::atan2(dy, dx));
360  double dz = T_aux1_vehicle.transform.translation.z -
361  T_ant_vehicle.transform.translation.z;
362  double dr = std::sqrt(parsing_utilities::square(dx) +
365  parsing_utilities::rad2deg(std::atan2(-dz, dr));
366  }
367  } else
368  {
369  // IMU orientation parameter
370  param("ins_spatial_config.imu_orientation.theta_x", settings_.theta_x,
371  0.0);
372  param("ins_spatial_config.imu_orientation.theta_y", settings_.theta_y,
373  0.0);
374  param("ins_spatial_config.imu_orientation.theta_z", settings_.theta_z,
375  0.0);
376  // INS antenna lever arm offset parameter
377  param("ins_spatial_config.ant_lever_arm.x", settings_.ant_lever_x, 0.0);
378  param("ins_spatial_config.ant_lever_arm.y", settings_.ant_lever_y, 0.0);
379  param("ins_spatial_config.ant_lever_arm.z", settings_.ant_lever_z, 0.0);
380  // INS POI ofset paramter
381  param("ins_spatial_config.poi_lever_arm.delta_x", settings_.poi_x, 0.0);
382  param("ins_spatial_config.poi_lever_arm.delta_y", settings_.poi_y, 0.0);
383  param("ins_spatial_config.poi_lever_arm.delta_z", settings_.poi_z, 0.0);
384  // INS velocity sensor lever arm offset parameter
385  param("ins_spatial_config.vsm_lever_arm.vsm_x", settings_.vsm_x, 0.0);
386  param("ins_spatial_config.vsm_lever_arm.vsm_y", settings_.vsm_y, 0.0);
387  param("ins_spatial_config.vsm_lever_arm.vsm_z", settings_.vsm_z, 0.0);
388  // Antenna Attitude Determination parameter
389  param("att_offset.heading", settings_.heading_offset, 0.0);
390  param("att_offset.pitch", settings_.pitch_offset, 0.0);
391  }
392 
394  {
397  settings_.theta_y *= -1.0;
398  settings_.theta_z *= -1.0;
399  settings_.ant_lever_y *= -1.0;
400  settings_.ant_lever_z *= -1.0;
401  settings_.poi_y *= -1.0;
402  settings_.poi_z *= -1.0;
403  settings_.vsm_y *= -1.0;
404  settings_.vsm_z *= -1.0;
405  settings_.heading_offset *= -1.0;
406  settings_.pitch_offset *= -1.0;
407  }
408 
409  if (std::abs(settings_.heading_offset) >
410  std::numeric_limits<double>::epsilon())
411  {
413  {
414  this->log(
416  "Pitch angle output by topic /atteuler is a tilt angle rotated by " +
417  std::to_string(settings_.heading_offset) + ".");
418  }
419  if (settings_.publish_pose &&
421  {
422  this->log(
424  "Pitch angle output by topic /pose is a tilt angle rotated by " +
425  std::to_string(settings_.heading_offset) + ".");
426  }
427  }
428 
429  this->log(log_level::DEBUG,
430  "IMU roll offset: " + std::to_string(settings_.theta_x));
431  this->log(log_level::DEBUG,
432  "IMU pitch offset: " + std::to_string(settings_.theta_y));
433  this->log(log_level::DEBUG,
434  "IMU yaw offset: " + std::to_string(settings_.theta_z));
435  this->log(log_level::DEBUG,
436  "Ant heading offset: " + std::to_string(settings_.heading_offset));
437  this->log(log_level::DEBUG,
438  "Ant pitch offset: " + std::to_string(settings_.pitch_offset));
439 
440  // ins_initial_heading param
441  param("ins_initial_heading", settings_.ins_initial_heading,
442  std::string("auto"));
443 
444  // ins_std_dev_mask
445  param("ins_std_dev_mask.att_std_dev", settings_.att_std_dev, 5.0f);
446  param("ins_std_dev_mask.pos_std_dev", settings_.pos_std_dev, 10.0f);
447 
448  // INS solution reference point
449  param("ins_use_poi", settings_.ins_use_poi, false);
450 
452  {
453  this->log(
455  "If tf shall be published, ins_use_poi has to be set to true! It is set automatically to true.");
456  settings_.ins_use_poi = true;
457  }
458 
459  // RTK correction parameters
460  // NTRIP
461  for (uint8_t i = 1; i < 4; ++i)
462  {
463  RtkNtrip ntripSettings;
464  std::string ntrip = "ntrip_" + std::to_string(i);
465 
466  param("rtk_settings." + ntrip + ".id", ntripSettings.id, std::string());
467  if (ntripSettings.id.empty())
468  continue;
469 
470  param("rtk_settings." + ntrip + ".caster", ntripSettings.caster,
471  std::string());
472  getUint32Param("rtk_settings." + ntrip + ".caster_port",
473  ntripSettings.caster_port, static_cast<uint32_t>(0));
474  param("rtk_settings." + ntrip + ".username", ntripSettings.username,
475  std::string());
476  if (!param("rtk_settings." + ntrip + ".password", ntripSettings.password,
477  std::string()))
478  {
479  uint32_t pwd_tmp;
480  getUint32Param("rtk_settings." + ntrip + ".password", pwd_tmp,
481  static_cast<uint32_t>(0));
482  ntripSettings.password = std::to_string(pwd_tmp);
483  }
484  param("rtk_settings." + ntrip + ".mountpoint", ntripSettings.mountpoint,
485  std::string());
486  param("rtk_settings." + ntrip + ".version", ntripSettings.version,
487  std::string("v2"));
488  param("rtk_settings." + ntrip + ".tls", ntripSettings.tls, false);
489  if (ntripSettings.tls)
490  param("rtk_settings." + ntrip + ".fingerprint",
491  ntripSettings.fingerprint, std::string(""));
492  param("rtk_settings." + ntrip + ".rtk_standard",
493  ntripSettings.rtk_standard, std::string("auto"));
494  param("rtk_settings." + ntrip + ".send_gga", ntripSettings.send_gga,
495  std::string("auto"));
496  if (ntripSettings.send_gga.empty())
497  ntripSettings.send_gga = "off";
498  param("rtk_settings." + ntrip + ".keep_open", ntripSettings.keep_open,
499  true);
500 
501  settings_.rtk.ntrip.push_back(ntripSettings);
502  }
503  // IP server
504  for (uint8_t i = 1; i < 6; ++i)
505  {
506  RtkIpServer ipSettings;
507  std::string ips = "ip_server_" + std::to_string(i);
508 
509  param("rtk_settings." + ips + ".id", ipSettings.id, std::string(""));
510  if (ipSettings.id.empty())
511  continue;
512 
513  getUint32Param("rtk_settings." + ips + ".port", ipSettings.port,
514  static_cast<uint32_t>(0));
515  param("rtk_settings." + ips + ".rtk_standard", ipSettings.rtk_standard,
516  std::string("auto"));
517  param("rtk_settings." + ips + ".send_gga", ipSettings.send_gga,
518  std::string("auto"));
519  if (ipSettings.send_gga.empty())
520  ipSettings.send_gga = "off";
521  param("rtk_settings." + ips + ".keep_open", ipSettings.keep_open, true);
522 
523  settings_.rtk.ip_server.push_back(ipSettings);
524  }
525  // Serial
526  for (uint8_t i = 1; i < 6; ++i)
527  {
528  RtkSerial serialSettings;
529  std::string serial = "serial_" + std::to_string(i);
530 
531  param("rtk_settings." + serial + ".port", serialSettings.port,
532  std::string());
533  if (serialSettings.port.empty())
534  continue;
535 
536  getUint32Param("rtk_settings." + serial + ".baud_rate",
537  serialSettings.baud_rate, static_cast<uint32_t>(115200));
538  param("rtk_settings." + serial + ".rtk_standard",
539  serialSettings.rtk_standard, std::string("auto"));
540  param("rtk_settings." + serial + ".send_gga", serialSettings.send_gga,
541  std::string("auto"));
542  if (serialSettings.send_gga.empty())
543  serialSettings.send_gga = "off";
544  param("rtk_settings." + serial + ".keep_open", serialSettings.keep_open,
545  true);
546 
547  settings_.rtk.serial.push_back(serialSettings);
548  }
549 
550  {
551  // deprecation warnings
552  std::string tempString;
553  int32_t tempInt;
554  bool tempBool;
555  param("ntrip_settings.mode", tempString, std::string(""));
556  if (tempString != "")
557  this->log(
559  "Deprecation warning: parameter ntrip_settings.mode has been removed, see README under section rtk_settings.");
560  param("ntrip_settings.caster", tempString, std::string(""));
561  if (tempString != "")
562  this->log(
564  "Deprecation warning: parameter ntrip_settings.caster has been removed, see README under section rtk_settings.");
565  param("ntrip_settings.rx_has_internet", tempBool, false);
566  if (tempBool)
567  this->log(
569  "Deprecation warning: parameter ntrip_settings.rx_has_internet has been removed, see README under section rtk_settings.");
570  param("ntrip_settings.rx_input_corrections_tcp", tempInt, 0);
571  if (tempInt != 0)
572  this->log(
574  "Deprecation warning: parameter ntrip_settings.rx_input_corrections_tcp has been removed, see README under section rtk_settings.");
575  param("ntrip_settings.rx_input_corrections_serial", tempString,
576  std::string(""));
577  if (tempString != "")
578  this->log(
580  "Deprecation warning: parameter ntrip_settings.rx_input_corrections_serial has been removed, see README under section rtk_settings.");
581  }
582 
584  {
586  {
587  this->log(
589  "AttEuler needs multi-antenna receiver. Multi-antenna setting automatically activated. Deactivate publishing of AttEuler if multi-antenna operation is not available.");
590  settings_.multi_antenna = true;
591  }
592  }
593 
594  // VSM - velocity sensor measurements for INS
595  if (settings_.septentrio_receiver_type == "ins")
596  {
597  param("ins_vsm.ros.source", settings_.ins_vsm.ros_source,
598  std::string(""));
599  std::string ipid = "IPS5";
600 
601  bool ins_use_vsm = false;
602  ins_use_vsm = ((settings_.ins_vsm.ros_source == "odometry") ||
603  (settings_.ins_vsm.ros_source == "twist"));
604  if (!settings_.ins_vsm.ros_source.empty() && !ins_use_vsm)
605  this->log(log_level::ERROR, "unknown ins_vsm.ros.source " +
607  " -> VSM input will not be used!");
608  else if (!settings_.tcp_ip_server.empty())
609  ipid = settings_.tcp_ip_server;
610 
611  param("ins_vsm.ip_server.id", settings_.ins_vsm.ip_server, ipid);
612  if (!settings_.ins_vsm.ip_server.empty())
613  {
614  getUint32Param("ins_vsm.ip_server.port",
616  static_cast<uint32_t>(24786));
617  param("ins_vsm.ip_server.keep_open",
619  this->log(
621  "velocity sensor measurements via ip_server will be used.");
622 
625  } else if (ins_use_vsm)
626  {
627  this->log(
629  "no ins_vsm.ip_server.id set -> VSM input will not be used!");
630  ins_use_vsm = false;
631  }
632 
633  param("ins_vsm.serial.port", settings_.ins_vsm.serial_port,
634  std::string(""));
635  if (!settings_.ins_vsm.serial_port.empty())
636  {
637  getUint32Param("ins_vsm.serial.baud_rate",
639  static_cast<uint32_t>(115200));
640  param("ins_vsm.serial.keep_open", settings_.ins_vsm.serial_keep_open,
641  true);
642  this->log(log_level::INFO,
643  "velocity sensor measurements via serial will be used.");
644  }
645 
646  param("ins_vsm.ros.config", settings_.ins_vsm.ros_config,
647  std::vector<bool>());
648  if (ins_use_vsm && (settings_.ins_vsm.ros_config.size() == 3))
649  {
650  if (std::all_of(settings_.ins_vsm.ros_config.begin(),
652  [](bool v) { return !v; }))
653  {
654  ins_use_vsm = false;
655  this->log(
657  "all elements of ins_vsm.ros.config have been set to false -> VSM input will not be used!");
658  } else
659  {
660  param("ins_vsm.ros.variances_by_parameter",
663  {
664  param("ins_vsm.ros.variances",
666  std::vector<double>());
667  if (settings_.ins_vsm.ros_variances.size() != 3)
668  {
669  this->log(
671  "ins_vsm.ros.variances has to be of size 3 for var_x, var_y, and var_z -> VSM input will not be used!");
672  ins_use_vsm = false;
674  } else
675  {
676  for (size_t i = 0;
677  i < settings_.ins_vsm.ros_config.size(); ++i)
678  {
679  if (settings_.ins_vsm.ros_config[i] &&
680  (settings_.ins_vsm.ros_variances[i] <= 0.0))
681  {
682  this->log(
684  "ins_vsm.ros.config of element " +
685  std::to_string(i) +
686  " has been set to be used but its variance is not > 0.0 -> its VSM input will not be used!");
687  settings_.ins_vsm.ros_config[i] = false;
688  }
689  }
690  }
691  if (std::all_of(settings_.ins_vsm.ros_config.begin(),
693  [](bool v) { return !v; }))
694  {
695  ins_use_vsm = false;
697  this->log(
699  "all elements of ins_vsm.ros.config have been set to false due to invalid covariances -> VSM input will not be used!");
700  }
701  }
702  }
703  } else if (ins_use_vsm)
704  {
706  this->log(
708  "ins_vsm.ros.config has to be of size 3 to signal wether to use v_x, v_y, and v_z -> VSM input will not be used!");
709  }
710  if (ins_use_vsm)
711  {
712  this->log(log_level::INFO, "ins_vsm.ros.source " +
714  " will be used.");
716  }
717  }
718 
719  boost::smatch match;
720  if (boost::regex_match(settings_.device, match,
721  boost::regex("(tcp)://(.+):(\\d+)")))
722  {
723  settings_.device_tcp_ip = match[2];
724  settings_.device_tcp_port = match[3];
726  } else if (boost::regex_match(
727  settings_.device, match,
728  boost::regex("(file_name):(/|(?:/[\\w-]+)+.sbf)")))
729  {
731  settings_.use_gnss_time = true;
732  settings_.device = match[2];
734  } else if (boost::regex_match(
735  settings_.device, match,
736  boost::regex("(file_name):(/|(?:/[\\w-]+)+.pcap)")))
737  {
738  settings_.read_from_pcap = true;
739  settings_.use_gnss_time = true;
740  settings_.device = match[2];
742  } else if (boost::regex_match(settings_.device, match,
743  boost::regex("(serial):(.+)")))
744  {
745  std::string proto(match[2]);
747  settings_.device = proto;
748  } else
749  {
751  (settings_.ins_vsm.ros_source == "odometry") ||
752  (settings_.ins_vsm.ros_source == "twist"))
753  {
754  std::stringstream ss;
755  ss << "Device is unsupported. Perhaps you meant 'tcp://host:port' or 'file_name:xxx.sbf' or 'serial:/path/to/device'?";
756  this->log(log_level::ERROR, ss.str());
757  return false;
758  }
759  }
760 
763 
764  if (settings_.septentrio_receiver_type == "ins")
765  {
768  }
769 
771 
772  // To be implemented: RTCM, raw data settings, PPP, SBAS ...
773  this->log(log_level::DEBUG, "Finished getROSParams() method");
774  return true;
775  }
776 
777  [[nodiscard]] bool ROSaicNode::validPeriod(uint32_t period, bool isIns) const
778  {
779  return ((period == 0) || ((period == 5 && isIns)) || (period == 10) ||
780  (period == 20) || (period == 40) || (period == 50) ||
781  (period == 100) || (period == 200) || (period == 500) ||
782  (period == 1000) || (period == 2000) || (period == 5000) ||
783  (period == 10000) || (period == 15000) || (period == 30000) ||
784  (period == 60000) || (period == 120000) || (period == 300000) ||
785  (period == 600000) || (period == 900000) || (period == 1800000) ||
786  (period == 3600000));
787  }
788 
789  void ROSaicNode::getTransform(const std::string& targetFrame,
790  const std::string& sourceFrame,
791  TransformStampedMsg& T_s_t) const
792  {
793  bool found = false;
794  while (!found)
795  {
796  try
797  {
798  // try to get tf from source frame to target frame
799  T_s_t = tfBuffer_.lookupTransform(targetFrame, sourceFrame,
800  rclcpp::Time(0));
801  found = true;
802  } catch (const tf2::TransformException& ex)
803  {
804  this->log(log_level::WARN, "Waiting for transform from " +
805  sourceFrame + " to " + targetFrame +
806  ": " + ex.what() + ".");
807  found = false;
808  using namespace std::chrono_literals;
809  std::this_thread::sleep_for(2000ms);
810  }
811  }
812  }
813 
814  void ROSaicNode::getRPY(const QuaternionMsg& qm, double& roll, double& pitch,
815  double& yaw) const
816  {
817  Eigen::Quaterniond q(qm.w, qm.x, qm.y, qm.z);
818  Eigen::Quaterniond::RotationMatrixType C = q.matrix();
819 
820  roll = std::atan2(C(2, 1), C(2, 2));
821  pitch = std::asin(-C(2, 0));
822  yaw = std::atan2(C(1, 0), C(0, 0));
823  }
824 
825  void ROSaicNode::sendVelocity(const std::string& velNmea)
826  {
827  IO_.sendVelocity(velNmea);
828  }
829 } // namespace rosaic_node
830 
831 #include "rclcpp_components/register_node_macro.hpp"
832 
833 // Register the component with class_loader.
834 // This acts as a sort of entry point, allowing the component to be discoverable
835 // when its library is being loaded into a running process.
836 RCLCPP_COMPONENTS_REGISTER_NODE(rosaic_node::ROSaicNode)
Settings::osnma
Osnma osnma
OSNMA settings.
Definition: settings.hpp:253
log_level::WARN
@ WARN
Definition: typedefs.hpp:182
Settings::publish_pose
bool publish_pose
Whether or not to publish the PoseWithCovarianceStampedMsg message.
Definition: settings.hpp:320
Settings::publish_attcoveuler
bool publish_attcoveuler
Whether or not to publish the AttCovEulerMsg message.
Definition: settings.hpp:298
device_type::TCP
@ TCP
Definition: settings.hpp:141
InsVsm::serial_port
std::string serial_port
VSM serial port.
Definition: settings.hpp:131
Settings::ins_initial_heading
std::string ins_initial_heading
For heading computation when unit is powered-cycled.
Definition: settings.hpp:245
Settings::latency_compensation
bool latency_compensation
Wether processing latency shall be compensated for in ROS timestamp.
Definition: settings.hpp:350
ROSaicNodeBase::registerSubscriber
void registerSubscriber()
Definition: typedefs.hpp:207
Osnma::keep_open
bool keep_open
Wether OSNMA shall be kept open on shutdown.
Definition: settings.hpp:44
Settings::publish_imusetup
bool publish_imusetup
Whether or not to publish the IMUSetupMsg message.
Definition: settings.hpp:304
Settings::publish_twist
bool publish_twist
Whether or not to publish the TwistWithCovarianceStampedMsg message.
Definition: settings.hpp:330
Settings::local_frame_id
std::string local_frame_id
Frame id of the local frame to be inserted.
Definition: settings.hpp:338
RtkNtrip::id
std::string id
Id of the NTRIP port.
Definition: settings.hpp:50
Settings::publish_localization
bool publish_localization
Whether or not to publish the LocalizationMsg message.
Definition: settings.hpp:326
Settings::pos_std_dev
float pos_std_dev
Position deviation mask.
Definition: settings.hpp:249
Rtk::serial
std::vector< RtkSerial > serial
Definition: settings.hpp:109
Settings::use_gnss_time
bool use_gnss_time
Definition: settings.hpp:344
rosaic_node::ROSaicNode::IO_
io::CommunicationCore IO_
Handles communication with the Rx.
Definition: rosaic_node.hpp:131
Settings::login_password
std::string login_password
Password for login.
Definition: settings.hpp:176
InsVsm::ip_server_keep_open
bool ip_server_keep_open
Wether VSM shall be kept open om shutdown.
Definition: settings.hpp:129
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
Settings::publish_pvtcartesian
bool publish_pvtcartesian
Definition: settings.hpp:275
Settings::udp_ip_server
std::string udp_ip_server
UDP IP server id.
Definition: settings.hpp:166
settings::checkUniquenssOfIps
void checkUniquenssOfIps(ROSaicNodeBase *node, const Settings &settings)
Definition: settings_helpers.hpp:44
InsVsm::ip_server
std::string ip_server
VSM IP server id.
Definition: settings.hpp:125
rosaic_node::ROSaicNode
This class represents the ROsaic node, to be extended..
Definition: rosaic_node.hpp:83
Settings::insert_local_frame
bool insert_local_frame
Wether local frame should be inserted into tf.
Definition: settings.hpp:336
Settings::publish_pvtgeodetic
bool publish_pvtgeodetic
Whether or not to publish the PVTGeodeticMsg message.
Definition: settings.hpp:277
Settings::heading_offset
double heading_offset
Attitude offset determination in longitudinal direction.
Definition: settings.hpp:237
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
rosaic_node::ROSaicNode::getTransform
void getTransform(const std::string &targetFrame, const std::string &sourceFrame, TransformStampedMsg &T_s_t) const
Gets transforms from tf2.
Definition: rosaic_node.cpp:789
Settings::publish_gpgga
bool publish_gpgga
Whether or not to publish the GGA message.
Definition: settings.hpp:259
RtkIpServer::keep_open
bool keep_open
Wether RTK connections shall be kept open on shutdown.
Definition: settings.hpp:87
Settings::publish_imu
bool publish_imu
Whether or not to publish the ImuMsg message.
Definition: settings.hpp:324
Osnma::ntp_server
std::string ntp_server
Server for NTP synchronization.
Definition: settings.hpp:42
parsing_utilities::rad2deg
T rad2deg(T rad)
Definition: parsing_utilities.hpp:93
RtkSerial::baud_rate
uint32_t baud_rate
Baud rate of the serial port on which Rx receives the corrections.
Definition: settings.hpp:96
parsing_utilities::wrapAngle180to180
double wrapAngle180to180(double angle)
Wraps an angle between -180 and 180 degrees.
Definition: parsing_utilities.hpp:122
QuaternionMsg
geometry_msgs::msg::Quaternion QuaternionMsg
Definition: typedefs.hpp:108
Settings::multi_antenna
bool multi_antenna
INS multiantenna.
Definition: settings.hpp:241
Settings::vsm_x
double vsm_x
INS velocity sensor lever arm x-offset.
Definition: settings.hpp:231
Settings::udp_port
uint32_t udp_port
UDP port.
Definition: settings.hpp:162
rosaic_node::ROSaicNode::validPeriod
bool validPeriod(uint32_t period, bool isIns) const
Checks if the period has a valid value.
Definition: rosaic_node.cpp:777
settings::autoPublish
void autoPublish(ROSaicNodeBase *node, Settings &settings)
Definition: settings_helpers.hpp:170
settings::checkUniquenssOfIpsVsm
void checkUniquenssOfIpsVsm(ROSaicNodeBase *node, const Settings &settings)
Definition: settings_helpers.hpp:113
InsVsm::serial_baud_rate
uint32_t serial_baud_rate
VSM serial baud rate.
Definition: settings.hpp:133
Settings::ntp_server
bool ntp_server
Wether NTP server shall be activated.
Definition: settings.hpp:346
Settings::delta_n
float delta_n
Marker-to-ARP offset in the northward direction.
Definition: settings.hpp:197
Settings::polling_period_pvt
uint32_t polling_period_pvt
Polling period for PVT-related SBF blocks.
Definition: settings.hpp:191
Osnma::mode
std::string mode
OSNMA mode.
Definition: settings.hpp:40
RtkNtrip::tls
bool tls
Wether to use TLS.
Definition: settings.hpp:64
Settings::datum
std::string datum
Datum to be used.
Definition: settings.hpp:189
Settings::frame_id
std::string frame_id
The frame ID used in the header of every published ROS message.
Definition: settings.hpp:352
Settings::device_type
device_type::DeviceType device_type
Device type.
Definition: settings.hpp:156
Settings::theta_z
double theta_z
IMU orientation z-angle.
Definition: settings.hpp:217
RtkSerial::send_gga
std::string send_gga
Whether (and at which rate) or not to send GGA to the serial port.
Definition: settings.hpp:100
Settings::publish_gpst
bool publish_gpst
Whether or not to publish the TimeReferenceMsg message with GPST.
Definition: settings.hpp:314
RtkSerial::port
std::string port
Definition: settings.hpp:94
Settings::poi_frame_id
std::string poi_frame_id
Definition: settings.hpp:357
Settings::poi_y
double poi_y
INS POI offset in y-dimension.
Definition: settings.hpp:227
Settings::activate_debug_log
bool activate_debug_log
Set logger level to DEBUG.
Definition: settings.hpp:152
Settings::publish_galauthstatus
bool publish_galauthstatus
Whether or not to publish the GALAuthStatus message and diagnostics.
Definition: settings.hpp:272
Settings::publish_velcovcartesian
bool publish_velcovcartesian
Definition: settings.hpp:291
Settings::publish_aimplusstatus
bool publish_aimplusstatus
Definition: settings.hpp:270
Settings::poi_x
double poi_x
INS POI offset in x-dimension.
Definition: settings.hpp:225
rosaic_node::ROSaicNode::tfListener_
std::unique_ptr< tf2_ros::TransformListener > tfListener_
Definition: rosaic_node.hpp:134
io::CommunicationCore::sendVelocity
void sendVelocity(const std::string &velNmea)
Hands over NMEA velocity message over to the send() method of manager_.
Definition: communication_core.cpp:1021
ROSaicNodeBase
This class is the base class for abstraction.
Definition: typedefs.hpp:192
Settings::tcp_ip_server
std::string tcp_ip_server
TCP IP server id.
Definition: settings.hpp:170
Settings::theta_x
double theta_x
IMU orientation x-angle.
Definition: settings.hpp:213
Settings::publish_velsensorsetup
bool publish_velsensorsetup
Whether or not to publish the VelSensorSetupMsg message.
Definition: settings.hpp:306
log_level::FATAL
@ FATAL
Definition: typedefs.hpp:184
rosaic_node
Settings::theta_y
double theta_y
IMU orientation y-angle.
Definition: settings.hpp:215
Settings::ant_aux1_serial_nr
std::string ant_aux1_serial_nr
Serial number of your particular Aux1 antenna.
Definition: settings.hpp:209
RtkNtrip::send_gga
std::string send_gga
Whether (and at which rate) or not to send GGA to the NTRIP caster.
Definition: settings.hpp:70
RtkNtrip::fingerprint
std::string fingerprint
Self-signed certificate fingerprint.
Definition: settings.hpp:66
Settings::publish_exteventinsnavcart
bool publish_exteventinsnavcart
Whether or not to publish the ExtEventINSNavCartMsg message.
Definition: settings.hpp:310
Settings::publish_gpsfix
bool publish_gpsfix
Whether or not to publish the GpsFixMsg message.
Definition: settings.hpp:318
Settings::configure_rx
bool configure_rx
Definition: settings.hpp:187
Settings::publish_gpgsa
bool publish_gpgsa
Whether or not to publish the GSA message.
Definition: settings.hpp:263
Settings::vsm_frame_id
std::string vsm_frame_id
The frame ID of the velocity sensor.
Definition: settings.hpp:359
Settings::baudrate
uint32_t baudrate
Baudrate.
Definition: settings.hpp:183
Settings::publish_velcovgeodetic
bool publish_velcovgeodetic
Definition: settings.hpp:294
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
RtkNtrip::caster
std::string caster
Hostname or IP address of the NTRIP caster to connect to.
Definition: settings.hpp:52
Settings::ptp_server_clock
bool ptp_server_clock
Wether PTP grandmaster clock shall be activated.
Definition: settings.hpp:348
Settings::tcp_port
uint32_t tcp_port
TCP port.
Definition: settings.hpp:168
Settings::publish_poscovgeodetic
bool publish_poscovgeodetic
Definition: settings.hpp:288
rosaic_node.hpp
The heart of the ROSaic driver: The ROS node that represents it.
Settings::vsm_y
double vsm_y
INS velocity sensor lever arm y-offset.
Definition: settings.hpp:233
Settings::publish_tf_ecef
bool publish_tf_ecef
Whether or not to publish the tf of the localization.
Definition: settings.hpp:334
Settings::publish_basevectorcart
bool publish_basevectorcart
Definition: settings.hpp:280
rosaic_node::ROSaicNode::sendVelocity
void sendVelocity(const std::string &velNmea)
Send velocity to communication layer (virtual)
Definition: rosaic_node.cpp:825
RtkNtrip
Definition: settings.hpp:47
Rtk::ntrip
std::vector< RtkNtrip > ntrip
Definition: settings.hpp:107
device_type::SBF_FILE
@ SBF_FILE
Definition: settings.hpp:143
InsVsm::serial_keep_open
bool serial_keep_open
Wether VSM shall be kept open om shutdown.
Definition: settings.hpp:135
RtkSerial
Definition: settings.hpp:90
RtkSerial::keep_open
bool keep_open
Wether RTK connections shall be kept open on shutdown.
Definition: settings.hpp:102
RtkNtrip::caster_port
uint32_t caster_port
IP port number of NTRIP caster to connect to.
Definition: settings.hpp:54
Settings::vsm_z
double vsm_z
INS velocity sensor lever arm z-offset.
Definition: settings.hpp:235
Settings::use_ros_axis_orientation
bool use_ros_axis_orientation
ROS axis orientation, body: front-left-up, geographic: ENU.
Definition: settings.hpp:211
Settings::pitch_offset
double pitch_offset
Attitude offset determination in latitudinal direction.
Definition: settings.hpp:239
Settings::ant_aux1_type
std::string ant_aux1_type
Definition: settings.hpp:205
Settings::publish_localization_ecef
bool publish_localization_ecef
Whether or not to publish the LocalizationMsg message.
Definition: settings.hpp:328
ROSaicNodeBase::isIns
bool isIns()
Check if Rx is INS.
Definition: typedefs.hpp:440
Settings::delta_u
float delta_u
Marker-to-ARP offset in the upward direction.
Definition: settings.hpp:199
Settings::ins_use_poi
bool ins_use_poi
INS solution reference point.
Definition: settings.hpp:243
Settings::ant_serial_nr
std::string ant_serial_nr
Serial number of your particular Main antenna.
Definition: settings.hpp:207
rosaic_node::ROSaicNode::getROSParams
bool getROSParams()
Gets the node parameters from the ROS Parameter Server, parts of which are specified in a YAML file.
Definition: rosaic_node.cpp:85
Settings::ant_type
std::string ant_type
Definition: settings.hpp:202
rosaic_node::ROSaicNode::setupThread_
std::thread setupThread_
Definition: rosaic_node.hpp:136
Settings::publish_atteuler
bool publish_atteuler
Whether or not to publish the AttEulerMsg message.
Definition: settings.hpp:296
Settings::login_user
std::string login_user
Username for login.
Definition: settings.hpp:174
InsVsm::use_stream_device
bool use_stream_device
Wether to use stream device tcp.
Definition: settings.hpp:123
Settings::lock_utm_zone
bool lock_utm_zone
Wether the UTM zone of the localization is locked.
Definition: settings.hpp:365
InsVsm::ros_variances
std::vector< double > ros_variances
Variances of the 3D velocity (var_x, var_y, var_z)
Definition: settings.hpp:121
Settings::publish_basevectorgeod
bool publish_basevectorgeod
Whether or not to publish the BaseVectorGeodMsg message.
Definition: settings.hpp:282
Settings::publish_diagnostics
bool publish_diagnostics
Whether or not to publish the DiagnosticArrayMsg message.
Definition: settings.hpp:322
Settings::imu_frame_id
std::string imu_frame_id
The frame ID used in the header of published ROS Imu message.
Definition: settings.hpp:354
TransformStampedMsg
geometry_msgs::msg::TransformStamped TransformStampedMsg
Definition: typedefs.hpp:111
Settings::polling_period_rest
uint32_t polling_period_rest
Polling period for all other SBF blocks and NMEA messages.
Definition: settings.hpp:193
Settings::device_tcp_port
std::string device_tcp_port
TCP port.
Definition: settings.hpp:160
RtkNtrip::version
std::string version
NTRIP version for NTRIP service.
Definition: settings.hpp:62
parsing_utilities::square
T square(T val)
Definition: parsing_utilities.hpp:65
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
Rtk::ip_server
std::vector< RtkIpServer > ip_server
Definition: settings.hpp:108
device_type::SERIAL
@ SERIAL
Definition: settings.hpp:142
RtkNtrip::rtk_standard
std::string rtk_standard
RTCM version for correction data.
Definition: settings.hpp:68
Settings::poi_z
double poi_z
INS POI offset in z-dimension.
Definition: settings.hpp:229
RtkIpServer::port
uint32_t port
Definition: settings.hpp:81
ROSaicNodeBase::settings_
Settings settings_
Settings.
Definition: typedefs.hpp:589
tf2::transformToEigen
Eigen::Isometry3d transformToEigen(const geometry_msgs::Transform &t)
Settings::custom_commands_file
std::string custom_commands_file
Custom commands file.
Definition: settings.hpp:178
RtkNtrip::username
std::string username
Username for NTRIP service.
Definition: settings.hpp:56
rosaic_node::ROSaicNode::getRPY
void getRPY(const QuaternionMsg &qm, double &roll, double &pitch, double &yaw) const
Gets Euler angles from quaternion message.
Definition: rosaic_node.cpp:814
settings_helpers.hpp
settings::checkUniquenssOfIpsPortsVsm
void checkUniquenssOfIpsPortsVsm(ROSaicNodeBase *node, const Settings &settings)
Definition: settings_helpers.hpp:139
Settings::publish_poscovcartesian
bool publish_poscovcartesian
Definition: settings.hpp:285
RtkSerial::rtk_standard
std::string rtk_standard
RTCM version for correction data.
Definition: settings.hpp:98
Settings::publish_insnavcart
bool publish_insnavcart
Whether or not to publish the INSNavCartMsg message.
Definition: settings.hpp:300
rosaic_node::ROSaicNode::ROSaicNode
ROSaicNode()
Definition: rosaic_node_ros1.cpp:43
device_type::PCAP_FILE
@ PCAP_FILE
Definition: settings.hpp:144
Settings::delta_e
float delta_e
Marker-to-ARP offset in the eastward direction.
Definition: settings.hpp:195
log_level::ERROR
@ ERROR
Definition: typedefs.hpp:183
Settings::read_from_sbf_log
bool read_from_sbf_log
Whether or not we are reading from an SBF file.
Definition: settings.hpp:369
Settings::hw_flow_control
std::string hw_flow_control
HW flow control.
Definition: settings.hpp:185
Settings::ins_vsm
InsVsm ins_vsm
INS VSM setting.
Definition: settings.hpp:373
RtkIpServer::rtk_standard
std::string rtk_standard
RTCM version for correction data.
Definition: settings.hpp:83
Settings::device_tcp_ip
std::string device_tcp_ip
TCP IP.
Definition: settings.hpp:158
Settings::ant_lever_z
double ant_lever_z
INS antenna lever arm z-offset.
Definition: settings.hpp:223
rosaic_node::ROSaicNode::setup
void setup()
Definition: rosaic_node.cpp:79
Settings::vehicle_frame_id
std::string vehicle_frame_id
The frame ID of the vehicle frame.
Definition: settings.hpp:363
Settings::leap_seconds
int32_t leap_seconds
The number of leap seconds that have been inserted into the UTC time.
Definition: settings.hpp:367
Settings::publish_gprmc
bool publish_gprmc
Whether or not to publish the RMC message.
Definition: settings.hpp:261
io::CommunicationCore::connect
void connect()
Connects the data stream.
Definition: communication_core.cpp:168
log_level::DEBUG
@ DEBUG
Definition: typedefs.hpp:180
RtkNtrip::keep_open
bool keep_open
Wether RTK connections shall be kept open on shutdown.
Definition: settings.hpp:72
Settings::aux1_frame_id
std::string aux1_frame_id
The frame ID of the aux1 antenna.
Definition: settings.hpp:361
rosaic_node::ROSaicNode::~ROSaicNode
~ROSaicNode()
Definition: rosaic_node.cpp:72
io::CommunicationCore::close
void close()
Definition: communication_core.cpp:85
Settings::publish_navsatfix
bool publish_navsatfix
Whether or not to publish the NavSatFixMsg message.
Definition: settings.hpp:316
Settings::reconnect_delay_s
float reconnect_delay_s
Definition: settings.hpp:181
RtkIpServer
Definition: settings.hpp:75
Settings::publish_tf
bool publish_tf
Whether or not to publish the tf of the localization.
Definition: settings.hpp:332
Settings::udp_unicast_ip
std::string udp_unicast_ip
UDP unicast destination ip.
Definition: settings.hpp:164
Settings::publish_only_valid
bool publish_only_valid
Wether to publish only valid messages.
Definition: settings.hpp:257
Settings::att_std_dev
float att_std_dev
Attitude deviation mask.
Definition: settings.hpp:247
Settings::auto_publish
bool auto_publish
Wether to publish automatically for cinfigure_rx = false.
Definition: settings.hpp:255
Settings::publish_measepoch
bool publish_measepoch
Whether or not to publish the MeasEpoch message.
Definition: settings.hpp:267
Settings::publish_exteventinsnavgeod
bool publish_exteventinsnavgeod
Whether or not to publish the ExtEventINSNavGeodMsg message.
Definition: settings.hpp:308
settings::checkUniquenssOfIpsPorts
void checkUniquenssOfIpsPorts(ROSaicNodeBase *node, const Settings &settings)
Definition: settings_helpers.hpp:85
RtkIpServer::id
std::string id
The IP server id.
Definition: settings.hpp:78
Settings::ant_lever_x
double ant_lever_x
INS antenna lever arm x-offset.
Definition: settings.hpp:219
tf2::TransformException
Settings::publish_extsensormeas
bool publish_extsensormeas
Whether or not to publish the ExtSensorMeasMsg message.
Definition: settings.hpp:312
rosaic_node::ROSaicNode::tfBuffer_
tf2_ros::Buffer tfBuffer_
tf2 buffer and listener
Definition: rosaic_node.hpp:133
RtkNtrip::mountpoint
std::string mountpoint
Mountpoint for NTRIP service.
Definition: settings.hpp:60
Settings::device
std::string device
Device.
Definition: settings.hpp:154
InsVsm::ros_variances_by_parameter
bool ros_variances_by_parameter
Whether or not to use variance defined by ROS parameter.
Definition: settings.hpp:119
Settings::publish_insnavgeod
bool publish_insnavgeod
Whether or not to publish the INSNavGeodMsg message.
Definition: settings.hpp:302
Settings::rtk
Rtk rtk
RTK corrections settings.
Definition: settings.hpp:251
RtkNtrip::password
std::string password
Password for NTRIP service.
Definition: settings.hpp:58
Settings::septentrio_receiver_type
std::string septentrio_receiver_type
Septentrio receiver type, either "gnss" or "ins".
Definition: settings.hpp:340
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
Settings::read_from_pcap
bool read_from_pcap
Whether or not we are reading from a PCAP file.
Definition: settings.hpp:371
Settings::publish_gpgsv
bool publish_gpgsv
Whether or not to publish the GSV message.
Definition: settings.hpp:265
InsVsm::ip_server_port
uint32_t ip_server_port
VSM tcp port.
Definition: settings.hpp:127
Settings::ant_lever_y
double ant_lever_y
INS antenna lever arm y-offset.
Definition: settings.hpp:221
RtkIpServer::send_gga
std::string send_gga
Whether (and at which rate) or not to send GGA to the NTRIP caster.
Definition: settings.hpp:85


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