Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Typedefs
+
Classes
Class List
+
Class Members
+
All
a
c
d
e
f
h
i
l
m
n
p
r
s
t
u
v
w
x
y
z
~
Functions
+
Variables
a
c
d
e
f
h
i
l
m
n
p
r
s
t
u
v
w
x
y
z
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
i
k
l
m
n
p
r
s
t
u
v
w
x
y
z
+
Functions
a
c
d
e
g
i
l
m
p
r
s
u
v
w
+
Variables
a
c
k
l
m
n
r
s
t
u
w
+
Typedefs
a
b
c
f
i
l
p
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
e
f
i
l
m
p
r
s
t
u
v
+
Macros
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
x
y
z
src
ts_echo_driver_node.cpp
Go to the documentation of this file.
1
#include <
ros/ros.h
>
2
3
#include "
toposens_echo_driver/echo_driver.h
"
4
#include "
toposens_echo_driver/lib_utils.h
"
5
#include "
toposens_echo_driver/ros_utils.h
"
6
7
auto
main
(
int
argc,
char
** argv) ->
int
8
{
9
ros::init
(argc, argv,
"toposens_echo_driver_node"
);
10
11
ros::NodeHandle
nh;
12
ros::NodeHandle
private_nh(
"~"
);
13
toposens_echo_driver::RosParameters
params(private_nh);
14
15
if
(params.
sensor_mode
!=
"single_shot"
)
16
{
17
ROS_ERROR
(
"Given sensor mode %s not supported yet, aborting launching of node!"
,
18
params.
sensor_mode
.c_str());
19
return
0;
20
}
21
22
ROS_INFO
(
"Launching ECHO ONE Driver node in %s mode!"
, params.
sensor_mode
.c_str());
23
24
toposens_echo_driver::EchoOneDriver
driver(nh, params);
25
26
ros::Rate
rate(params.
loop_rate_hz
);
27
while
(
ros::ok
())
28
{
29
ros::spinOnce
();
30
31
constexpr
auto
log_interval =
double
{5};
32
toposens_echo_driver::LogKnownSensors
(log_interval);
33
driver.measure();
34
driver.publishStaticTransforms();
35
36
rate.
sleep
();
37
}
38
39
return
0;
40
}
ros::NodeHandle
toposens_echo_driver::LogKnownSensors
void LogKnownSensors(double log_interval=3.0)
Get currently known sensors from driver and log to ROS console every log_interval seconds...
Definition:
lib_utils.cpp:96
toposens_echo_driver::RosParameters::sensor_mode
std::string sensor_mode
Definition:
ros_utils.h:25
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ros::Rate
echo_driver.h
lib_utils.h
ROS_INFO
#define ROS_INFO(...)
ros::ok
ROSCPP_DECL bool ok()
main
auto main(int argc, char **argv) -> int
Definition:
ts_echo_driver_node.cpp:7
ros::Rate::sleep
bool sleep()
ros.h
toposens_echo_driver::EchoOneDriver
Definition:
echo_driver.h:22
toposens_echo_driver::RosParameters::loop_rate_hz
double loop_rate_hz
Definition:
ros_utils.h:27
toposens_echo_driver::RosParameters
Definition:
ros_utils.h:17
ros::spinOnce
ROSCPP_DECL void spinOnce()
ROS_ERROR
#define ROS_ERROR(...)
ros_utils.h
toposens_echo_driver
Author(s): Tobias Roth
, Dennis Maier
, Baris Yazici
autogenerated on Mon Feb 28 2022 23:57:42