Main Page
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Typedefs
Enumerations
+
Classes
Class List
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
+
Functions
a
c
d
e
f
g
i
l
m
o
p
r
s
t
u
w
~
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
y
z
+
Files
File List
+
File Members
+
All
_
c
d
f
g
i
m
n
s
t
u
+
Functions
m
s
t
Variables
+
Typedefs
d
f
i
s
u
+
Enumerations
_
+
Enumerator
s
+
Macros
_
c
f
i
n
s
t
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
uint32_t loopFrequency;
13
14
ROS_INFO
(
"SBG DRIVER - Init node, load params and connect to the device."
);
15
SbgDevice
sbg_device(node_handle);
16
17
ROS_INFO
(
"SBG DRIVER - Initialize device for receiving data"
);
18
sbg_device.
initDeviceForReceivingData
();
19
20
loopFrequency = sbg_device.
getUpdateFrequency
();
21
ROS_INFO
(
"SBG DRIVER - ROS Node frequency : %u Hz"
, loopFrequency);
22
ros::Rate
loop_rate(loopFrequency);
23
24
while
(
ros::ok
())
25
{
26
sbg_device.
periodicHandle
();
27
loop_rate.
sleep
();
28
}
29
30
return
0;
31
}
32
catch
(
ros::Exception
const
& refE)
33
{
34
ROS_ERROR
(
"SBG_DRIVER - %s"
, refE.what());
35
}
36
37
return
0;
38
}
ros::NodeHandle
sbg::SbgDevice
Definition:
sbg_device.h:56
sbg::SbgDevice::periodicHandle
void periodicHandle(void)
Definition:
sbg_device.cpp:483
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
sbg::SbgDevice::getUpdateFrequency
uint32_t getUpdateFrequency(void) const
Definition:
sbg_device.cpp:452
ROS_INFO
#define ROS_INFO(...)
ros::ok
ROSCPP_DECL bool ok()
ros::Rate::sleep
bool sleep()
sbg_device.h
Handle a connected SBG device.
ros::Exception
sbg::SbgDevice::initDeviceForReceivingData
void initDeviceForReceivingData(void)
Definition:
sbg_device.cpp:461
ROS_ERROR
#define ROS_ERROR(...)
sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:35