Main Page
Namespaces
Classes
Files
File List
File Members
src
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
}
ros::NodeHandle
sbg::SbgDevice
Definition:
sbg_device.h:56
sbg::SbgDevice::periodicHandle
void periodicHandle(void)
Definition:
sbg_device.cpp:491
main
int main(int argc, char **argv)
Definition:
main.cpp:5
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ros::Rate
ROS_INFO
#define ROS_INFO(...)
ros::ok
ROSCPP_DECL bool ok()
sbg::SbgDevice::getUpdateFrequency
uint32_t getUpdateFrequency(void) const
Definition:
sbg_device.cpp:460
sbg_device.h
Handle a connected SBG device.
ros::Exception
sbg::SbgDevice::initDeviceForReceivingData
void initDeviceForReceivingData(void)
Definition:
sbg_device.cpp:469
ROS_ERROR
#define ROS_ERROR(...)
sbg_driver
Author(s): SBG Systems
autogenerated on Thu Oct 22 2020 03:47:22