sbg_device.cpp
Go to the documentation of this file.
1 // File header
2 #include "sbg_device.h"
3 
4 // Standard headers
5 #include <iomanip>
6 #include <fstream>
7 #include <ctime>
8 
9 // Boost headers
10 #include <boost/lexical_cast.hpp>
11 #include <boost/regex.hpp>
12 #include <boost/thread/xtime.hpp>
13 #include <boost/date_time/local_time/local_time.hpp>
14 
15 // SbgECom headers
16 #include <version/sbgVersion.h>
17 
18 using namespace std;
19 using sbg::SbgDevice;
20 
21 // From ros_com/recorder
22 std::string timeToStr(ros::WallTime ros_t)
23 {
24  (void)ros_t;
25  std::stringstream msg;
26  const boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
27  boost::posix_time::time_facet *const f = new boost::posix_time::time_facet("%Y-%m-%d-%H-%M-%S");
28  msg.imbue(std::locale(msg.getloc(),f));
29  msg << now;
30  return msg.str();
31 }
32 
33 //
34 // Static magnetometers maps definition.
35 //
36 std::map<SbgEComMagCalibQuality, std::string> SbgDevice::g_mag_calib_quality_ = { {SBG_ECOM_MAG_CALIB_QUAL_OPTIMAL, "Quality: optimal"},
37  {SBG_ECOM_MAG_CALIB_QUAL_GOOD, "Quality: good"},
38  {SBG_ECOM_MAG_CALIB_QUAL_POOR, "Quality: poor"},
39  {SBG_ECOM_MAG_CALIB_QUAL_INVALID, "Quality: invalid"}};
40 
41 std::map<SbgEComMagCalibConfidence, std::string> SbgDevice::g_mag_calib_confidence_ = { {SBG_ECOM_MAG_CALIB_TRUST_HIGH, "Confidence: high"},
42  {SBG_ECOM_MAG_CALIB_TRUST_MEDIUM, "Confidence: medium"},
43  {SBG_ECOM_MAG_CALIB_TRUST_LOW, "Confidence: low"}};
44 
45 std::map<SbgEComMagCalibMode, std::string> SbgDevice::g_mag_calib_mode_ = { {SBG_ECOM_MAG_CALIB_MODE_2D, "Mode 2D"},
46  {SBG_ECOM_MAG_CALIB_MODE_3D, "Mode 3D"}};
47 
48 std::map<SbgEComMagCalibBandwidth, std::string> SbgDevice::g_mag_calib_bandwidth = {{SBG_ECOM_MAG_CALIB_HIGH_BW, "High Bandwidth"},
49  {SBG_ECOM_MAG_CALIB_MEDIUM_BW, "Medium Bandwidth"},
50  {SBG_ECOM_MAG_CALIB_LOW_BW, "Low Bandwidth"}};
51 
55 //---------------------------------------------------------------------//
56 //- Constructor -//
57 //---------------------------------------------------------------------//
58 
59 SbgDevice::SbgDevice(ros::NodeHandle& ref_node_handle):
60 m_ref_node_(ref_node_handle),
61 m_mag_calibration_ongoing_(false),
62 m_mag_calibration_done_(false)
63 {
65  connect();
66 }
67 
69 {
70  SbgErrorCode error_code;
71 
72  error_code = sbgEComClose(&m_com_handle_);
73 
74  if (error_code != SBG_NO_ERROR)
75  {
76  ROS_ERROR("Unable to close the SBG communication handle - %s.", sbgErrorCodeToString(error_code));
77  }
78 
80  {
82  }
84  {
86  }
87 
88  if (error_code != SBG_NO_ERROR)
89  {
90  ROS_ERROR("SBG DRIVER - Unable to close the communication interface.");
91  }
92 }
93 
94 //---------------------------------------------------------------------//
95 //- Private methods -//
96 //---------------------------------------------------------------------//
97 
98 SbgErrorCode SbgDevice::onLogReceivedCallback(SbgEComHandle* p_handle, SbgEComClass msg_class, SbgEComMsgId msg, const SbgBinaryLogData* p_log_data, void* p_user_arg)
99 {
100  assert(p_user_arg);
101 
102  SBG_UNUSED_PARAMETER(p_handle);
103 
104  SbgDevice *p_sbg_device;
105  p_sbg_device = (SbgDevice*)(p_user_arg);
106 
107  p_sbg_device->onLogReceived(msg_class, msg, *p_log_data);
108 
109  return SBG_NO_ERROR;
110 }
111 
112 void SbgDevice::onLogReceived(SbgEComClass msg_class, SbgEComMsgId msg, const SbgBinaryLogData& ref_sbg_data)
113 {
114  //
115  // Publish the received SBG log.
116  //
117  m_message_publisher_.publish(msg_class, msg, ref_sbg_data);
118 }
119 
121 {
122  //
123  // Get the ROS private nodeHandle, where the parameters are loaded from the launch file.
124  //
125  ros::NodeHandle n_private("~");
127 }
128 
130 {
131  SbgErrorCode error_code;
132  error_code = SBG_NO_ERROR;
133 
134  //
135  // Initialize the communication interface from the config store, then initialize the sbgECom protocol to communicate with the device.
136  //
138  {
140  }
141  else if (m_config_store_.isInterfaceUdp())
142  {
144  }
145  else
146  {
147  throw ros::Exception("Invalid interface type for the SBG device.");
148  }
149 
150  if (error_code != SBG_NO_ERROR)
151  {
152  throw ros::Exception("SBG_DRIVER - [Init] Unable to initialize the interface - " + std::string(sbgErrorCodeToString(error_code)));
153  }
154 
155  error_code = sbgEComInit(&m_com_handle_, &m_sbg_interface_);
156 
157  if (error_code != SBG_NO_ERROR)
158  {
159  throw ros::Exception("SBG_DRIVER - [Init] Unable to initialize the SbgECom protocol - " + std::string(sbgErrorCodeToString(error_code)));
160  }
161 
162  readDeviceInfo();
163 }
164 
166 {
167  SbgEComDeviceInfo device_info;
168  SbgErrorCode error_code;
169 
170  error_code = sbgEComCmdGetInfo(&m_com_handle_, &device_info);
171 
172  if (error_code == SBG_NO_ERROR)
173  {
174  ROS_INFO("SBG_DRIVER - productCode = %s", device_info.productCode);
175  ROS_INFO("SBG_DRIVER - serialNumber = %u", device_info.serialNumber);
176 
177  ROS_INFO("SBG_DRIVER - calibationRev = %s", getVersionAsString(device_info.calibationRev).c_str());
178  ROS_INFO("SBG_DRIVER - calibrationDate = %u / %u / %u", device_info.calibrationDay, device_info.calibrationMonth, device_info.calibrationYear);
179 
180  ROS_INFO("SBG_DRIVER - hardwareRev = %s", getVersionAsString(device_info.hardwareRev).c_str());
181  ROS_INFO("SBG_DRIVER - firmwareRev = %s", getVersionAsString(device_info.firmwareRev).c_str());
182  }
183  else
184  {
185  ROS_ERROR("Unable to get the device Info : %s", sbgErrorCodeToString(error_code));
186  }
187 }
188 
189 std::string SbgDevice::getVersionAsString(uint32 sbg_version_enc) const
190 {
191  char version[32];
192  sbgVersionToStringEncoded(sbg_version_enc, version, 32);
193 
194  return std::string(version);
195 }
196 
198 {
200 
202 }
203 
205 {
207  {
208  ConfigApplier configApplier(m_com_handle_);
209  configApplier.applyConfiguration(m_config_store_);
210  }
211 }
212 
213 bool SbgDevice::processMagCalibration(std_srvs::Trigger::Request& ref_ros_request, std_srvs::Trigger::Response& ref_ros_response)
214 {
215  SBG_UNUSED_PARAMETER(ref_ros_request);
216 
218  {
219  if (endMagCalibration())
220  {
221  ref_ros_response.success = true;
222  ref_ros_response.message = "Magnetometer calibration is finished. See the output console to get calibration informations.";
223  }
224  else
225  {
226  ref_ros_response.success = false;
227  ref_ros_response.message = "Unable to end the calibration.";
228  }
229 
232  }
233  else
234  {
235  if (startMagCalibration())
236  {
237  ref_ros_response.success = true;
238  ref_ros_response.message = "Magnetometer calibration process started.";
239  }
240  else
241  {
242  ref_ros_response.success = false;
243  ref_ros_response.message = "Unable to start magnetometers calibration.";
244  }
245 
247  }
248 
249  return ref_ros_response.success;
250 }
251 
252 bool SbgDevice::saveMagCalibration(std_srvs::Trigger::Request& ref_ros_request, std_srvs::Trigger::Response& ref_ros_response)
253 {
254  SBG_UNUSED_PARAMETER(ref_ros_request);
255 
257  {
258  ref_ros_response.success = false;
259  ref_ros_response.message = "Magnetometer calibration process is still ongoing, finish it before trying to save it.";
260  }
261  else if (m_mag_calibration_done_)
262  {
264  {
265  ref_ros_response.success = true;
266  ref_ros_response.message = "Magnetometer calibration has been uploaded to the device.";
267  }
268  else
269  {
270  ref_ros_response.success = false;
271  ref_ros_response.message = "Magnetometer calibration has not been uploaded to the device.";
272  }
273  }
274  else
275  {
276  ref_ros_response.success = false;
277  ref_ros_response.message = "No magnetometer calibration has been done.";
278  }
279 
280  return ref_ros_response.success;
281 }
282 
284 {
285  SbgErrorCode error_code;
286  SbgEComMagCalibMode mag_calib_mode;
287  SbgEComMagCalibBandwidth mag_calib_bandwidth;
288 
289  mag_calib_mode = m_config_store_.getMagnetometerCalibMode();
290  mag_calib_bandwidth = m_config_store_.getMagnetometerCalibBandwidth();
291 
292  error_code = sbgEComCmdMagStartCalib(&m_com_handle_, mag_calib_mode, mag_calib_bandwidth);
293 
294  if (error_code != SBG_NO_ERROR)
295  {
296  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to start the magnetometer calibration : %s", sbgErrorCodeToString(error_code));
297  return false;
298  }
299  else
300  {
301  ROS_INFO("SBG DRIVER [Mag Calib] - Start calibration");
302  ROS_INFO("SBG DRIVER [Mag Calib] - Mode : %s", g_mag_calib_mode_[mag_calib_mode].c_str());
303  ROS_INFO("SBG DRIVER [Mag Calib] - Bandwidth : %s", g_mag_calib_bandwidth[mag_calib_bandwidth].c_str());
304  return true;
305  }
306 }
307 
309 {
310  SbgErrorCode error_code;
311 
313 
314  if (error_code != SBG_NO_ERROR)
315  {
316  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to compute the magnetometer calibration results : %s", sbgErrorCodeToString(error_code));
317  return false;
318  }
319  else
320  {
323 
324  return true;
325  }
326 }
327 
329 {
330  SbgErrorCode error_code;
331 
333  {
335 
336  if (error_code != SBG_NO_ERROR)
337  {
338  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to set the magnetometers calibration data to the device : %s", sbgErrorCodeToString(error_code));
339  return false;
340  }
341  else
342  {
343  ROS_INFO("SBG DRIVER [Mag Calib] - Saving data to the device");
344  ConfigApplier configApplier(m_com_handle_);
345  configApplier.saveConfiguration();
346  return true;
347  }
348  }
349  else
350  {
351  ROS_ERROR("SBG DRIVER [Mag Calib] - The calibration was invalid, it can't be uploaded on the device.");
352  return false;
353  }
354 }
355 
357 {
358  ROS_INFO("SBG DRIVER [Mag Calib] - Quality of the calibration %s", g_mag_calib_quality_[m_magCalibResults.quality].c_str());
359  ROS_INFO("SBG DRIVER [Mag Calib] - Calibration results confidence %s", g_mag_calib_confidence_[m_magCalibResults.confidence].c_str());
360 
361  SbgEComMagCalibMode mag_calib_mode;
362 
363  mag_calib_mode = m_config_store_.getMagnetometerCalibMode();
364 
365  //
366  // Check the magnetometers calibration status and display the warnings.
367  //
369  {
370  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough valid points. Maybe you are moving too fast");
371  }
373  {
374  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to find a calibration solution. Maybe there are too much non static distortions");
375  }
377  {
378  ROS_WARN("SBG DRIVER [Mag Calib] - The magnetic calibration has troubles to correct the magnetometers and inertial frame alignment");
379  }
380  if (mag_calib_mode == SBG_ECOM_MAG_CALIB_MODE_2D)
381  {
383  {
384  ROS_WARN("SBG DRIVER [Mag Calib] - Too much roll motion for a 2D magnetic calibration");
385  }
387  {
388  ROS_WARN("SBG DRIVER [Mag Calib] - Too much pitch motion for a 2D magnetic calibration");
389  }
390  }
391  else
392  {
394  {
395  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough roll motion for a 3D magnetic calibration");
396  }
398  {
399  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough pitch motion for a 3D magnetic calibration.");
400  }
401  }
403  {
404  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough yaw motion to compute a valid magnetic calibration");
405  }
406 }
407 
409 {
410  SbgEComMagCalibMode mag_calib_mode;
411  SbgEComMagCalibBandwidth mag_calib_bandwidth;
412  ostringstream mag_results_stream;
413  string output_filename;
414 
415  mag_calib_mode = m_config_store_.getMagnetometerCalibMode();
416  mag_calib_bandwidth = m_config_store_.getMagnetometerCalibBandwidth();
417 
418  mag_results_stream << "SBG DRIVER [Mag Calib]" << endl;
419  mag_results_stream << "======= Parameters =======" << endl;
420  mag_results_stream << "* CALIB_MODE = " << g_mag_calib_mode_[mag_calib_mode] << endl;
421  mag_results_stream << "* CALIB_BW = " << g_mag_calib_bandwidth[mag_calib_bandwidth] << endl;
422 
423  mag_results_stream << "======= Results =======" << endl;
424  mag_results_stream << g_mag_calib_quality_[m_magCalibResults.quality] << endl;
425  mag_results_stream << g_mag_calib_confidence_[m_magCalibResults.confidence] << endl;
426  mag_results_stream << "======= Infos =======" << endl;
427  mag_results_stream << "* Used points : " << m_magCalibResults.numPoints << "/" << m_magCalibResults.maxNumPoints << endl;
428  mag_results_stream << "* Mean, Std, Max" << endl;
429  mag_results_stream << "[Before]\t" << m_magCalibResults.beforeMeanError << "\t" << m_magCalibResults.beforeStdError << "\t" << m_magCalibResults.beforeMaxError << endl;
430  mag_results_stream << "[After]\t" << m_magCalibResults.afterMeanError << "\t" << m_magCalibResults.afterStdError << "\t" << m_magCalibResults.afterMaxError << endl;
431  mag_results_stream << "[Accuracy]\t" << sbgRadToDegF(m_magCalibResults.meanAccuracy) << "\t" << sbgRadToDegF(m_magCalibResults.stdAccuracy) << "\t" << sbgRadToDegF(m_magCalibResults.maxAccuracy) << endl;
432  mag_results_stream << "* Offset\t" << m_magCalibResults.offset[0] << "\t" << m_magCalibResults.offset[1] << "\t" << m_magCalibResults.offset[2] << endl;
433 
434  mag_results_stream << "* Matrix" << endl;
435  mag_results_stream << m_magCalibResults.matrix[0] << "\t" << m_magCalibResults.matrix[1] << "\t" << m_magCalibResults.matrix[2] << endl;
436  mag_results_stream << m_magCalibResults.matrix[3] << "\t" << m_magCalibResults.matrix[4] << "\t" << m_magCalibResults.matrix[5] << endl;
437  mag_results_stream << m_magCalibResults.matrix[6] << "\t" << m_magCalibResults.matrix[7] << "\t" << m_magCalibResults.matrix[8] << endl;
438 
439  output_filename = "mag_calib_" + timeToStr(ros::WallTime::now()) + ".txt";
440  ofstream output_file(output_filename);
441  output_file << mag_results_stream.str();
442  output_file.close();
443 
444  ROS_INFO("%s", mag_results_stream.str().c_str());
445  ROS_INFO("SBG DRIVER [Mag Calib] - Magnetometers calibration results saved to file %s", output_filename.c_str());
446 }
447 
448 //---------------------------------------------------------------------//
449 //- Parameters -//
450 //---------------------------------------------------------------------//
451 
452 uint32_t SbgDevice::getUpdateFrequency(void) const
453 {
454  return m_rate_frequency_;
455 }
456 
457 //---------------------------------------------------------------------//
458 //- Public methods -//
459 //---------------------------------------------------------------------//
460 
462 {
463  SbgErrorCode error_code;
464  initPublishers();
465  configure();
466 
468 
469  if (error_code != SBG_NO_ERROR)
470  {
471  throw ros::Exception("SBG_DRIVER - [Init] Unable to set the callback function - " + std::string(sbgErrorCodeToString(error_code)));
472  }
473 }
474 
476 {
479 
480  ROS_INFO("SBG DRIVER [Init] - SBG device is initialized for magnetometers calibration.");
481 }
482 
484 {
486 }
const SbgEComMagCalibMode & getMagnetometerCalibMode(void) const
SbgEComMagCalibConfidence confidence
Helper methods and definitions used to handle version.
MessagePublisher m_message_publisher_
Definition: sbg_device.h:76
bool isInterfaceUdp(void) const
uint32_t getReadingRateFrequency(void) const
uint8_t productCode[SBG_ECOM_INFO_PRODUCT_CODE_LENGTH]
ros::ServiceServer m_calib_save_service_
Definition: sbg_device.h:85
unsigned int uint32
Definition: sbgTypes.h:52
SBG_COMMON_LIB_API SbgErrorCode sbgVersionToStringEncoded(uint32_t version, char *pBuffer, uint32_t sizeOfBuffer)
Definition: sbgVersion.c:414
bool processMagCalibration(std_srvs::Trigger::Request &ref_ros_request, std_srvs::Trigger::Response &ref_ros_response)
Definition: sbg_device.cpp:213
void exportMagCalibrationResults(void) const
Definition: sbg_device.cpp:408
SbgEComMagCalibQuality quality
void periodicHandle(void)
Definition: sbg_device.cpp:483
void onLogReceived(SbgEComClass msg_class, SbgEComMsgId msg, const SbgBinaryLogData &ref_sbg_data)
Definition: sbg_device.cpp:112
uint16_t calibrationYear
f
static const char * sbgErrorCodeToString(SbgErrorCode errorCode)
Definition: sbgErrorCodes.h:72
bool isInterfaceSerial(void) const
enum _SbgEComMagCalibMode SbgEComMagCalibMode
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialDestroy(SbgInterface *pHandle)
SbgErrorCode sbgEComCmdMagStartCalib(SbgEComHandle *pHandle, SbgEComMagCalibMode mode, SbgEComMagCalibBandwidth bandwidth)
bool uploadMagCalibrationToDevice(void)
Definition: sbg_device.cpp:328
bool checkConfigWithRos(void) const
uint32_t getBaudRate(void) const
enum _SbgEComMagCalibBandwidth SbgEComMagCalibBandwidth
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
#define ROS_WARN(...)
uint32_t getUpdateFrequency(void) const
Definition: sbg_device.cpp:452
#define SBG_ECOM_MAG_CALIB_Y_MOTION_ISSUE
Definition: sbgEComCmdMag.h:81
ros::NodeHandle & m_ref_node_
Definition: sbg_device.h:75
void publish(SbgEComClass sbg_msg_class, SbgEComMsgId sbg_msg_id, const SbgBinaryLogData &ref_sbg_log)
void displayMagCalibrationStatusResult(void) const
Definition: sbg_device.cpp:356
SBG_INLINE float sbgRadToDegF(float angle)
Definition: sbgDefines.h:371
SbgInterface m_sbg_interface_
Definition: sbg_device.h:74
static std::map< SbgEComMagCalibQuality, std::string > g_mag_calib_quality_
Definition: sbg_device.h:64
ConfigStore m_config_store_
Definition: sbg_device.h:77
void saveConfiguration(void)
void connect(void)
Definition: sbg_device.cpp:129
uint32_t getInputPortAddress(void) const
#define SBG_ECOM_MAG_CALIB_TOO_MUCH_DISTORTIONS
Definition: sbgEComCmdMag.h:79
SbgErrorCode sbgInterfaceUdpCreate(SbgInterface *pHandle, sbgIpAddress remoteAddr, uint32 remotePort, uint32 localPort)
sbgIpAddress getIpAddress(void) const
#define ROS_INFO(...)
SbgEComHandle m_com_handle_
Definition: sbg_device.h:73
void loadParameters(void)
Definition: sbg_device.cpp:120
SbgErrorCode sbgEComHandle(SbgEComHandle *pHandle)
Definition: sbgECom.c:165
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialCreate(SbgInterface *pHandle, const char *deviceName, uint32_t baudRate)
std::string getVersionAsString(uint32 sbg_version_enc) const
Definition: sbg_device.cpp:189
void readDeviceInfo(void)
Definition: sbg_device.cpp:165
void loadFromRosNodeHandle(const ros::NodeHandle &ref_node_handle)
bool startMagCalibration(void)
Definition: sbg_device.cpp:283
const std::string & getUartPortName(void) const
static std::map< SbgEComMagCalibConfidence, std::string > g_mag_calib_confidence_
Definition: sbg_device.h:65
SbgEComMagCalibResults m_magCalibResults
Definition: sbg_device.h:83
SbgErrorCode sbgEComSetReceiveLogCallback(SbgEComHandle *pHandle, SbgEComReceiveLogFunc pReceiveLogCallback, void *pUserArg)
Definition: sbgECom.c:195
static std::map< SbgEComMagCalibMode, std::string > g_mag_calib_mode_
Definition: sbg_device.h:66
#define SBG_ECOM_MAG_CALIB_NOT_ENOUGH_POINTS
Definition: sbgEComCmdMag.h:78
SbgErrorCode sbgEComCmdMagComputeCalib(SbgEComHandle *pHandle, SbgEComMagCalibResults *pCalibResults)
std::string timeToStr(ros::WallTime ros_t)
Definition: sbg_device.cpp:22
uint32_t m_rate_frequency_
Definition: sbg_device.h:79
bool endMagCalibration(void)
Definition: sbg_device.cpp:308
void applyConfiguration(const ConfigStore &ref_config_store)
#define SBG_ECOM_MAG_CALIB_X_MOTION_ISSUE
Definition: sbgEComCmdMag.h:80
uint8_t SbgEComMsgId
Definition: sbgEComIds.h:289
static WallTime now()
SbgErrorCode sbgEComCmdMagSetCalibData(SbgEComHandle *pHandle, const float offset[3], const float matrix[9])
Definition: sbgEComCmdMag.c:44
#define SBG_UNUSED_PARAMETER(x)
Definition: sbgDefines.h:194
void configure(void)
Definition: sbg_device.cpp:204
static std::map< SbgEComMagCalibBandwidth, std::string > g_mag_calib_bandwidth
Definition: sbg_device.h:67
void initPublishers(ros::NodeHandle &ref_ros_node_handle, const ConfigStore &ref_config_store)
#define SBG_ECOM_MAG_CALIB_Z_MOTION_ISSUE
Definition: sbgEComCmdMag.h:82
enum _SbgEComClass SbgEComClass
SbgErrorCode sbgEComCmdGetInfo(SbgEComHandle *pHandle, SbgEComDeviceInfo *pInfo)
Handle a connected SBG device.
bool saveMagCalibration(std_srvs::Trigger::Request &ref_ros_request, std_srvs::Trigger::Response &ref_ros_response)
Definition: sbg_device.cpp:252
bool m_mag_calibration_done_
Definition: sbg_device.h:82
#define SBG_ECOM_MAG_CALIB_ALIGNMENT_ISSUE
Definition: sbgEComCmdMag.h:83
void initDeviceForReceivingData(void)
Definition: sbg_device.cpp:461
void initDeviceForMagCalibration(void)
Definition: sbg_device.cpp:475
#define ROS_ERROR(...)
bool m_mag_calibration_ongoing_
Definition: sbg_device.h:81
void initPublishers(void)
Definition: sbg_device.cpp:197
SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface)
Definition: sbgECom.c:19
const SbgEComMagCalibBandwidth & getMagnetometerCalibBandwidth(void) const
enum _SbgErrorCode SbgErrorCode
SbgErrorCode sbgEComClose(SbgEComHandle *pHandle)
Definition: sbgECom.c:58
uint32_t getOutputPortAddress(void) const
SbgErrorCode sbgInterfaceUdpDestroy(SbgInterface *pHandle)
static SbgErrorCode onLogReceivedCallback(SbgEComHandle *p_handle, SbgEComClass msg_class, SbgEComMsgId msg, const SbgBinaryLogData *p_log_data, void *p_user_arg)
Definition: sbg_device.cpp:98
ros::ServiceServer m_calib_service_
Definition: sbg_device.h:84


sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:35