Main Page
Namespaces
Classes
Files
File List
File Members
src
lslidar_c16_driver_node.cc
Go to the documentation of this file.
1
/*
2
* This file is part of lslidar_c16 driver.
3
*
4
* The driver is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* The driver is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with the driver. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#include <
ros/ros.h
>
19
#include <
lslidar_c16_driver/lslidar_c16_driver.h
>
20
21
int
main
(
int
argc,
char
** argv)
22
{
23
ros::init
(argc, argv,
"lslidar_c16_driver_node"
);
24
ros::NodeHandle
node;
25
ros::NodeHandle
private_nh(
"~"
);
26
27
// start the driver
28
ROS_INFO
(
"namespace is %s"
, private_nh.
getNamespace
().c_str());
29
lslidar_c16_driver::LslidarC16Driver
driver(node, private_nh);
30
if
(!driver.initialize()) {
31
ROS_ERROR
(
"Cannot initialize lslidar driver..."
);
32
return
0;
33
}
34
// loop until shut down or end of file
35
while
(
ros::ok
() && driver.polling()) {
36
ros::spinOnce
();
37
38
}
39
40
return
0;
41
}
ros::NodeHandle
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
lslidar_c16_driver::LslidarC16Driver
Definition:
lslidar_c16_driver.h:40
ROS_INFO
#define ROS_INFO(...)
ros::ok
ROSCPP_DECL bool ok()
ros::NodeHandle::getNamespace
const std::string & getNamespace() const
ros.h
lslidar_c16_driver.h
ros::spinOnce
ROSCPP_DECL void spinOnce()
ROS_ERROR
#define ROS_ERROR(...)
main
int main(int argc, char **argv)
Definition:
lslidar_c16_driver_node.cc:21
lslidar_c16_driver
Author(s): Yutong
autogenerated on Thu Aug 22 2019 03:51:43