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(m_ros_processing_time_, 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_ERROR("Unable to get the device Info : %s", sbgErrorCodeToString(error_code));
175  }
176 
177  ROS_INFO("SBG_DRIVER - productCode = %s", device_info.productCode);
178  ROS_INFO("SBG_DRIVER - serialNumber = %u", device_info.serialNumber);
179 
180  ROS_INFO("SBG_DRIVER - calibationRev = %s", getVersionAsString(device_info.calibationRev).c_str());
181  ROS_INFO("SBG_DRIVER - calibrationDate = %u / %u / %u", device_info.calibrationDay, device_info.calibrationMonth, device_info.calibrationYear);
182 
183  ROS_INFO("SBG_DRIVER - hardwareRev = %s", getVersionAsString(device_info.hardwareRev).c_str());
184  ROS_INFO("SBG_DRIVER - firmwareRev = %s", getVersionAsString(device_info.firmwareRev).c_str());
185 }
186 
187 std::string SbgDevice::getVersionAsString(uint32 sbg_version_enc) const
188 {
189  char version[32];
190  sbgVersionToStringEncoded(sbg_version_enc, version, 32);
191 
192  return std::string(version);
193 }
194 
196 {
198 
199  //
200  // Check if the rate frequency has to be defined according to the defined publishers.
201  //
203  {
205  }
206  else
207  {
209  }
210 }
211 
213 {
215  {
216  ConfigApplier configApplier(m_com_handle_);
217  configApplier.applyConfiguration(m_config_store_);
218  }
219 }
220 
221 bool SbgDevice::processMagCalibration(std_srvs::Trigger::Request& ref_ros_request, std_srvs::Trigger::Response& ref_ros_response)
222 {
223  SBG_UNUSED_PARAMETER(ref_ros_request);
224 
226  {
227  if (endMagCalibration())
228  {
229  ref_ros_response.success = true;
230  ref_ros_response.message = "Magnetometer calibration is finished. See the output console to get calibration informations.";
231  }
232  else
233  {
234  ref_ros_response.success = false;
235  ref_ros_response.message = "Unable to end the calibration.";
236  }
237 
240  }
241  else
242  {
243  if (startMagCalibration())
244  {
245  ref_ros_response.success = true;
246  ref_ros_response.message = "Magnetometer calibration process started.";
247  }
248  else
249  {
250  ref_ros_response.success = false;
251  ref_ros_response.message = "Unable to start magnetometers calibration.";
252  }
253 
255  }
256 
257  return ref_ros_response.success;
258 }
259 
260 bool SbgDevice::saveMagCalibration(std_srvs::Trigger::Request& ref_ros_request, std_srvs::Trigger::Response& ref_ros_response)
261 {
262  SBG_UNUSED_PARAMETER(ref_ros_request);
263 
265  {
266  ref_ros_response.success = false;
267  ref_ros_response.message = "Magnetometer calibration process is still ongoing, finish it before trying to save it.";
268  }
269  else if (m_mag_calibration_done_)
270  {
272  {
273  ref_ros_response.success = true;
274  ref_ros_response.message = "Magnetometer calibration has been uploaded to the device.";
275  }
276  else
277  {
278  ref_ros_response.success = false;
279  ref_ros_response.message = "Magnetometer calibration has not been uploaded to the device.";
280  }
281  }
282  else
283  {
284  ref_ros_response.success = false;
285  ref_ros_response.message = "No magnetometer calibration has been done.";
286  }
287 
288  return ref_ros_response.success;
289 }
290 
292 {
293  SbgErrorCode error_code;
294  SbgEComMagCalibMode mag_calib_mode;
295  SbgEComMagCalibBandwidth mag_calib_bandwidth;
296 
297  mag_calib_mode = m_config_store_.getMagnetometerCalibMode();
298  mag_calib_bandwidth = m_config_store_.getMagnetometerCalibBandwidth();
299 
300  error_code = sbgEComCmdMagStartCalib(&m_com_handle_, mag_calib_mode, mag_calib_bandwidth);
301 
302  if (error_code != SBG_NO_ERROR)
303  {
304  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to start the magnetometer calibration : %s", sbgErrorCodeToString(error_code));
305  return false;
306  }
307  else
308  {
309  ROS_INFO("SBG DRIVER [Mag Calib] - Start calibration");
310  ROS_INFO("SBG DRIVER [Mag Calib] - Mode : %s", g_mag_calib_mode_[mag_calib_mode].c_str());
311  ROS_INFO("SBG DRIVER [Mag Calib] - Bandwidth : %s", g_mag_calib_bandwidth[mag_calib_bandwidth].c_str());
312  return true;
313  }
314 }
315 
317 {
318  SbgErrorCode error_code;
319 
321 
322  if (error_code != SBG_NO_ERROR)
323  {
324  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to compute the magnetometer calibration results : %s", sbgErrorCodeToString(error_code));
325  return false;
326  }
327  else
328  {
331 
332  return true;
333  }
334 }
335 
337 {
338  SbgErrorCode error_code;
339 
341  {
343 
344  if (error_code != SBG_NO_ERROR)
345  {
346  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to set the magnetometers calibration data to the device : %s", sbgErrorCodeToString(error_code));
347  return false;
348  }
349  else
350  {
351  ROS_INFO("SBG DRIVER [Mag Calib] - Saving data to the device");
352  ConfigApplier configApplier(m_com_handle_);
353  configApplier.saveConfiguration();
354  return true;
355  }
356  }
357  else
358  {
359  ROS_ERROR("SBG DRIVER [Mag Calib] - The calibration was invalid, it can't be uploaded on the device.");
360  return false;
361  }
362 }
363 
365 {
366  ROS_INFO("SBG DRIVER [Mag Calib] - Quality of the calibration %s", g_mag_calib_quality_[m_magCalibResults.quality].c_str());
367  ROS_INFO("SBG DRIVER [Mag Calib] - Calibration results confidence %s", g_mag_calib_confidence_[m_magCalibResults.confidence].c_str());
368 
369  SbgEComMagCalibMode mag_calib_mode;
370 
371  mag_calib_mode = m_config_store_.getMagnetometerCalibMode();
372 
373  //
374  // Check the magnetometers calibration status and display the warnings.
375  //
377  {
378  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough valid points. Maybe you are moving too fast");
379  }
381  {
382  ROS_WARN("SBG DRIVER [Mag Calib] - Unable to find a calibration solution. Maybe there are too much non static distortions");
383  }
385  {
386  ROS_WARN("SBG DRIVER [Mag Calib] - The magnetic calibration has troubles to correct the magnetometers and inertial frame alignment");
387  }
388  if (mag_calib_mode == SBG_ECOM_MAG_CALIB_MODE_2D)
389  {
391  {
392  ROS_WARN("SBG DRIVER [Mag Calib] - Too much roll motion for a 2D magnetic calibration");
393  }
395  {
396  ROS_WARN("SBG DRIVER [Mag Calib] - Too much pitch motion for a 2D magnetic calibration");
397  }
398  }
399  else
400  {
402  {
403  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough roll motion for a 3D magnetic calibration");
404  }
406  {
407  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough pitch motion for a 3D magnetic calibration.");
408  }
409  }
411  {
412  ROS_WARN("SBG DRIVER [Mag Calib] - Not enough yaw motion to compute a valid magnetic calibration");
413  }
414 }
415 
417 {
418  SbgEComMagCalibMode mag_calib_mode;
419  SbgEComMagCalibBandwidth mag_calib_bandwidth;
420  ostringstream mag_results_stream;
421  string output_filename;
422 
423  mag_calib_mode = m_config_store_.getMagnetometerCalibMode();
424  mag_calib_bandwidth = m_config_store_.getMagnetometerCalibBandwidth();
425 
426  mag_results_stream << "SBG DRIVER [Mag Calib]" << endl;
427  mag_results_stream << "======= Parameters =======" << endl;
428  mag_results_stream << "* CALIB_MODE = " << g_mag_calib_mode_[mag_calib_mode] << endl;
429  mag_results_stream << "* CALIB_BW = " << g_mag_calib_bandwidth[mag_calib_bandwidth] << endl;
430 
431  mag_results_stream << "======= Results =======" << endl;
432  mag_results_stream << g_mag_calib_quality_[m_magCalibResults.quality] << endl;
433  mag_results_stream << g_mag_calib_confidence_[m_magCalibResults.confidence] << endl;
434  mag_results_stream << "======= Infos =======" << endl;
435  mag_results_stream << "* Used points : " << m_magCalibResults.numPoints << "/" << m_magCalibResults.maxNumPoints << endl;
436  mag_results_stream << "* Mean, Std, Max" << endl;
437  mag_results_stream << "[Before]\t" << m_magCalibResults.beforeMeanError << "\t" << m_magCalibResults.beforeStdError << "\t" << m_magCalibResults.beforeMaxError << endl;
438  mag_results_stream << "[After]\t" << m_magCalibResults.afterMeanError << "\t" << m_magCalibResults.afterStdError << "\t" << m_magCalibResults.afterMaxError << endl;
439  mag_results_stream << "[Accuracy]\t" << sbgRadToDegF(m_magCalibResults.meanAccuracy) << "\t" << sbgRadToDegF(m_magCalibResults.stdAccuracy) << "\t" << sbgRadToDegF(m_magCalibResults.maxAccuracy) << endl;
440  mag_results_stream << "* Offset\t" << m_magCalibResults.offset[0] << "\t" << m_magCalibResults.offset[1] << "\t" << m_magCalibResults.offset[2] << endl;
441 
442  mag_results_stream << "* Matrix" << endl;
443  mag_results_stream << m_magCalibResults.matrix[0] << "\t" << m_magCalibResults.matrix[1] << "\t" << m_magCalibResults.matrix[2] << endl;
444  mag_results_stream << m_magCalibResults.matrix[3] << "\t" << m_magCalibResults.matrix[4] << "\t" << m_magCalibResults.matrix[5] << endl;
445  mag_results_stream << m_magCalibResults.matrix[6] << "\t" << m_magCalibResults.matrix[7] << "\t" << m_magCalibResults.matrix[8] << endl;
446 
447  output_filename = "mag_calib_" + timeToStr(ros::WallTime::now()) + ".txt";
448  ofstream output_file(output_filename);
449  output_file << mag_results_stream.str();
450  output_file.close();
451 
452  ROS_INFO("%s", mag_results_stream.str().c_str());
453  ROS_INFO("SBG DRIVER [Mag Calib] - Magnetometers calibration results saved to file %s", output_filename.c_str());
454 }
455 
456 //---------------------------------------------------------------------//
457 //- Parameters -//
458 //---------------------------------------------------------------------//
459 
460 uint32_t SbgDevice::getUpdateFrequency(void) const
461 {
462  return m_rate_frequency_;
463 }
464 
465 //---------------------------------------------------------------------//
466 //- Public methods -//
467 //---------------------------------------------------------------------//
468 
470 {
471  SbgErrorCode error_code;
472  initPublishers();
473  configure();
474 
476 
477  if (error_code != SBG_NO_ERROR)
478  {
479  throw ros::Exception("SBG_DRIVER - [Init] Unable to set the callback function - " + std::string(sbgErrorCodeToString(error_code)));
480  }
481 }
482 
484 {
487 
488  ROS_INFO("SBG DRIVER [Init] - SBG device is initialized for magnetometers calibration.");
489 }
490 
492 {
494 
496 }
SbgEComMagCalibConfidence confidence
Helper methods and definitions used to handle version.
MessagePublisher m_message_publisher_
Definition: sbg_device.h:76
sbgIpAddress getIpAddress(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:221
const std::string & getUartPortName(void) const
void displayMagCalibrationStatusResult(void) const
Definition: sbg_device.cpp:364
SbgEComMagCalibQuality quality
void periodicHandle(void)
Definition: sbg_device.cpp:491
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
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:336
const SbgEComMagCalibBandwidth & getMagnetometerCalibBandwidth(void) const
enum _SbgEComMagCalibBandwidth SbgEComMagCalibBandwidth
uint32_t getReadingRateFrequency(void) const
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
const SbgEComMagCalibMode & getMagnetometerCalibMode(void) const
#define ROS_WARN(...)
#define SBG_ECOM_MAG_CALIB_Y_MOTION_ISSUE
Definition: sbgEComCmdMag.h:81
ros::NodeHandle & m_ref_node_
Definition: sbg_device.h:75
bool checkConfigWithRos(void) const
std::string getVersionAsString(uint32 sbg_version_enc) const
Definition: sbg_device.cpp:187
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
#define SBG_ECOM_MAG_CALIB_TOO_MUCH_DISTORTIONS
Definition: sbgEComCmdMag.h:79
SbgErrorCode sbgInterfaceUdpCreate(SbgInterface *pHandle, sbgIpAddress remoteAddr, uint32 remotePort, uint32 localPort)
#define ROS_INFO(...)
uint32_t getBaudRate(void) const
ros::Time m_ros_processing_time_
Definition: sbg_device.h:87
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
uint32_t getInputPortAddress(void) const
uint32_t getUpdateFrequency(void) const
Definition: sbg_device.cpp:460
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceSerialCreate(SbgInterface *pHandle, const char *deviceName, uint32_t baudRate)
void readDeviceInfo(void)
Definition: sbg_device.cpp:165
void loadFromRosNodeHandle(const ros::NodeHandle &ref_node_handle)
bool startMagCalibration(void)
Definition: sbg_device.cpp:291
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
uint32_t getOutputPortAddress(void) const
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:316
void applyConfiguration(const ConfigStore &ref_config_store)
bool isInterfaceUdp(void) const
#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:212
bool isInterfaceSerial(void) const
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)
static Time now()
#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:260
bool m_mag_calibration_done_
Definition: sbg_device.h:82
#define SBG_ECOM_MAG_CALIB_ALIGNMENT_ISSUE
Definition: sbgEComCmdMag.h:83
uint32_t getMaxOutputFrequency(void) const
void initDeviceForReceivingData(void)
Definition: sbg_device.cpp:469
void initDeviceForMagCalibration(void)
Definition: sbg_device.cpp:483
#define ROS_ERROR(...)
void publish(const ros::Time &ref_ros_time, SbgEComClass sbg_msg_class, SbgEComMsgId sbg_msg_id, const SbgBinaryLogData &ref_sbg_log)
bool m_mag_calibration_ongoing_
Definition: sbg_device.h:81
void initPublishers(void)
Definition: sbg_device.cpp:195
void exportMagCalibrationResults(void) const
Definition: sbg_device.cpp:416
SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface)
Definition: sbgECom.c:19
enum _SbgErrorCode SbgErrorCode
SbgErrorCode sbgEComClose(SbgEComHandle *pHandle)
Definition: sbgECom.c:58
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 Thu Oct 22 2020 03:47:22