octree_pa_node.h
Go to the documentation of this file.
1 /******************************************************************************
2 * *
3 * octree_pa_node.h *
4 * ================ *
5 * *
6 *******************************************************************************
7 * *
8 * github 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 *******************************************************************************
15 * *
16 * New BSD License *
17 * *
18 * Copyright (c) 2015-2018, Peter Weissig, Technische Universität Chemnitz *
19 * All rights reserved. *
20 * *
21 * Redistribution and use in source and binary forms, with or without *
22 * modification, are permitted provided that the following conditions are met: *
23 * * Redistributions of source code must retain the above copyright *
24 * notice, this list of conditions and the following disclaimer. *
25 * * Redistributions in binary form must reproduce the above copyright *
26 * notice, this list of conditions and the following disclaimer in the *
27 * documentation and/or other materials provided with the distribution. *
28 * * Neither the name of the Technische Universität Chemnitz nor the *
29 * names of its contributors may be used to endorse or promote products *
30 * derived from this software without specific prior written permission. *
31 * *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
33 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
35 * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY *
36 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *
38 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
39 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY *
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
42 * DAMAGE. *
43 * *
44 ******************************************************************************/
45 
46 #ifndef __OCTREE_PA_NODE_H
47 #define __OCTREE_PA_NODE_H
48 
49 // local headers
53 
54 #include "octomap_pa/OctomapPaFileName.h"
55 #include "octomap_pa/OctomapPaGetSize.h"
56 
57 // ros headers
58 #include <ros/ros.h>
59 
60 #include <geometry_msgs/Point.h>
61 #include <sensor_msgs/PointCloud.h>
62 #include <sensor_msgs/PointCloud2.h>
63 #include <nav_msgs/Path.h>
64 #include <std_srvs/Empty.h>
65 
66 #include <tf/transform_listener.h>
67 
68 #include <octomap_msgs/Octomap.h>
69 
71 
72 // additional libraries
73 #include <pcl/point_types.h>
74 
75 #include <octomap/octomap.h>
76 
77 // standard headers
78 #include <string>
79 #include <vector>
80 
81 //**************************[cOctreePaNode]************************************
82 class cOctreePaNode : public cOctreePaRos {
83  public:
85  cOctreePaNode();
86 
89 
91  void publishOctomap(void);
92 
93  protected:
94 
98 
105 
108 
111 
112 
117  const sensor_msgs::PointCloud2ConstPtr &msg);
118 
123  const sensor_msgs::PointCloudConstPtr &msg);
124 
128  void addLaserCallbackSub(const sensor_msgs::LaserScanConstPtr &msg);
129 
138 
139 
142  bool clearCallbackSrv(std_srvs::Empty::Request &req,
143  std_srvs::Empty::Response &res);
144 
147  bool getSizeCallbackSrv(
148  octomap_pa::OctomapPaGetSize::Request &req,
149  octomap_pa::OctomapPaGetSize::Response &res);
152  bool saveCallbackSrv(
153  octomap_pa::OctomapPaFileName::Request &req,
154  octomap_pa::OctomapPaFileName::Response &res);
157  bool loadCallbackSrv(
158  octomap_pa::OctomapPaFileName::Request &req,
159  octomap_pa::OctomapPaFileName::Response &res);
160 };
161 
162 #endif // __OCTREE_PA_NODE_H
ros::Publisher pub_octomap_
puplisher for the octomap (binary data)
void addPointcloudOldCallbackSub(const sensor_msgs::PointCloudConstPtr &msg)
callback function for receiving a pointcloud (old format)
ros::ServiceServer srv_load_
service for loading a octomap
int count_cloud_old_
number of inserted pointclouds (old format)
ros::ServiceServer srv_clear_
service for clearing the octomap
ros::Subscriber sub_cloud_old_
subscriber for a pointcloud (old format)
bool clearCallbackSrv(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
ros::Subscriber sub_cloud_
subscriber for a pointcloud
int count_laser_
number of inserted laser scans
cAddCloudParameter addparams_
ros::ServiceServer srv_getsize_
service for receiving the size of the octomap
bool saveCallbackSrv(octomap_pa::OctomapPaFileName::Request &req, octomap_pa::OctomapPaFileName::Response &res)
bool loadCallbackSrv(octomap_pa::OctomapPaFileName::Request &req, octomap_pa::OctomapPaFileName::Response &res)
cOctreePaNode()
default constructor
ros::ServiceServer srv_save_
service for saving the octomap
tf::TransformListener tf_listener_
transformation of different frames
~cOctreePaNode()
default destructor
void addPointcloudCallbackSub(const sensor_msgs::PointCloud2ConstPtr &msg)
callback function for receiving a pointcloud
ros::Publisher pub_octomap_full_
puplisher for the octomap (full data)
ros::Subscriber sub_laser_
subscriber for a laserscan
void publishOctomap(void)
function for publishing the octomap
ros::Publisher pub_cloud_occupied_
puplisher for occupied voxels as pointcloud
cOctreeBasePaNodeParameter nodeparams_
parameters
int count_cloud_
number of inserted pointclouds
bool getSizeCallbackSrv(octomap_pa::OctomapPaGetSize::Request &req, octomap_pa::OctomapPaGetSize::Response &res)
void addLaserCallbackSub(const sensor_msgs::LaserScanConstPtr &msg)
callback function for receiving a laserscan
ros::NodeHandle nh_
node handler for topic subscription and advertising
ros::Publisher pub_cloud_free_
puplisher for free voxels as pointcloud


octomap_pa
Author(s):
autogenerated on Fri Jun 7 2019 22:04:53