main.cpp
Go to the documentation of this file.
1 #include <sbg_device.h>
2 
3 using sbg::SbgDevice;
4 
5 int main(int argc, char **argv)
6 {
7  ros::init(argc, argv, "sbg_device");
8  ros::NodeHandle node_handle;
9 
10  try
11  {
12  ROS_INFO("SBG DRIVER - Init node, load params and connect to the device.");
13  SbgDevice sbg_device(node_handle);
14 
15  ROS_INFO("SBG DRIVER - Initialize device for receiving data");
16  sbg_device.initDeviceForReceivingData();
17 
18  ROS_INFO("SBG DRIVER - START RECEIVING DATA");
19  ros::Rate loop_rate(sbg_device.getUpdateFrequency() * 2);
20 
21  while (ros::ok())
22  {
23  sbg_device.periodicHandle();
24  loop_rate.sleep();
25  }
26 
27  return 0;
28  }
29  catch (ros::Exception const& refE)
30  {
31  ROS_ERROR("SBG_DRIVER - %s", refE.what());
32  }
33 
34  return 0;
35 }
void periodicHandle(void)
Definition: sbg_device.cpp:491
int main(int argc, char **argv)
Definition: main.cpp:5
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
#define ROS_INFO(...)
ROSCPP_DECL bool ok()
uint32_t getUpdateFrequency(void) const
Definition: sbg_device.cpp:460
Handle a connected SBG device.
void initDeviceForReceivingData(void)
Definition: sbg_device.cpp:469
#define ROS_ERROR(...)


sbg_driver
Author(s): SBG Systems
autogenerated on Thu Oct 22 2020 03:47:22