octree_stamped_pa_node.cpp
Go to the documentation of this file.
1 /******************************************************************************
2 * *
3 * octree_stamped_pa_node.cpp *
4 * ========================== *
5 * *
6 *******************************************************************************
7 * *
8 * Repository: *
9 * https://github.com/TUC-ProAut/ros_octomap *
10 * *
11 * Chair of Automation Technology, Technische Universität Chemnitz *
12 * https://www.tu-chemnitz.de/etit/proaut *
13 * *
14 * Author: *
15 * Peter Weissig *
16 * *
17 *******************************************************************************
18 * *
19 * New BSD License *
20 * *
21 * Copyright (c) 2015-2021 TU Chemnitz *
22 * All rights reserved. *
23 * *
24 * Redistribution and use in source and binary forms, with or without *
25 * modification, are permitted provided that the following conditions are met: *
26 * * Redistributions of source code must retain the above copyright notice, *
27 * this list of conditions and the following disclaimer. *
28 * * Redistributions in binary form must reproduce the above copyright *
29 * notice, this list of conditions and the following disclaimer in the *
30 * documentation and/or other materials provided with the distribution. *
31 * * Neither the name of the copyright holder nor the names of its *
32 * contributors may be used to endorse or promote products derived from *
33 * this software without specific prior written permission. *
34 * *
35 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
36 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
37 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR *
38 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR *
39 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
40 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
41 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
42 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, *
43 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR *
44 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
45 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
46 * *
47 ******************************************************************************/
48 
49 // local headers
51 
52 // ros headers
54 
55 // standard headers
56 #include <string>
57 
58 const std::string cOctreeStampedPaNode::nodename_ = "octree_stamped_pa_node";
59 
60 //**************************[main]*********************************************
61 int main(int argc, char **argv) {
62 
65 
66  ros::spin();
67 
68  return 0;
69 }
70 
71 //**************************[cOctreeStampedPaNode]*****************************
73  TypeBase(nodename_) {
74 
75  cParameterPaRos paramloader;
76 
77  // degrading parameter
78  paramloader.load("~/degrading_time", rosparams_.degrading_time_);
79  paramloader.load("~/auto_degrading", rosparams_.auto_degrading_);
80  paramloader.load("~/auto_degrading_intervall",
82 }
83 
84 //**************************[~cOctreeStampedPaNode]****************************
86 
87 }
88 
89 //**************************[getConfig]****************************************
90 octomap_pa_msgs::Config cOctreeStampedPaNode::getConfig() {
91 
92  // init variables
93  octomap_pa_msgs::Config result;
94 
95  // call base class function
96  result = TypeBase::getConfig();
97 
98  // config for degrading (not used by default)
99  result.degrading.degrading_time = rosparams_.degrading_time_;
100  result.degrading.auto_degrading = rosparams_.degrading_time_;
101  result.degrading.auto_degrading_intervall =
103 
104  // return result
105  return result;
106 }
107 
108 //**************************[internal_node_update]*****************************
110 
111  checkDegrading();
112 }
cOctreeStampedPaRosParameter rosparams_
parameters
double degrading_time_
duration how long the outdated nodes will be kept (60s)
~cOctreeStampedPaNode()
default destructor
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void checkDegrading(void)
helper function for automatic degrading
virtual octomap_pa_msgs::Config getConfig(void)
function for retrieving all current configs
int main(int argc, char **argv)
virtual octomap_pa_msgs::Config getConfig(void)
function for retrieving all current configs
cOctreeStampedPaNode()
default constructor
bool load(const std::string name, bool &value, const bool print_default=true) const
double auto_degrading_intervall_
intervall for automatic degrading (2.0s)
ROSCPP_DECL void spin()
bool auto_degrading_
turns on automatic degrading (true)
virtual void internal_node_update(void)
virtual overload for additional updates
static const std::string nodename_
official node name


octomap_pa
Author(s):
autogenerated on Mon Feb 28 2022 23:02:35