src
octomap_tracking_server_node.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012, D. Kuhner, P. Ruchti, University of Freiburg
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* * Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* * Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* * Neither the name of the University of Freiburg nor the names of its
14
* contributors may be used to endorse or promote products derived from
15
* this software without specific prior written permission.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
* POSSIBILITY OF SUCH DAMAGE.
28
*/
29
30
#include <
ros/ros.h
>
31
#include <
octomap_server/TrackingOctomapServer.h
>
32
33
#define USAGE "\nUSAGE: octomap_tracking_server <map.bt>\n" \
34
" map.bt: octomap 3D map file to read\n"
35
36
using namespace
octomap_server
;
37
38
int
main
(
int
argc,
char
** argv){
39
ros::init
(argc, argv,
"octomap_tracking_server"
);
40
std::string mapFilename(
""
);
41
42
if
(argc > 2 || (argc == 2 && std::string(argv[1]) ==
"-h"
)){
43
ROS_ERROR
(
"%s"
,
USAGE
);
44
exit(-1);
45
}
46
47
if
(argc == 2)
48
mapFilename = std::string(argv[1]);
49
50
try
{
51
TrackingOctomapServer
ms(mapFilename);
52
ros::spin
();
53
}
catch
(std::runtime_error& e){
54
ROS_ERROR
(
"octomap_server exception: %s"
, e.what());
55
return
-1;
56
}
57
58
return
0;
59
}
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
TrackingOctomapServer.h
USAGE
#define USAGE
Definition:
octomap_tracking_server_node.cpp:33
octomap_server
Definition:
OctomapServer.h:80
octomap_server::TrackingOctomapServer
Definition:
TrackingOctomapServer.h:37
ros::spin
ROSCPP_DECL void spin()
ros.h
main
int main(int argc, char **argv)
Definition:
octomap_tracking_server_node.cpp:38
ROS_ERROR
#define ROS_ERROR(...)
octomap_server
Author(s): Armin Hornung
autogenerated on Tue Dec 27 2022 03:15:28