46 #ifndef __OCTREE_BASE_PA_ROS_H 47 #define __OCTREE_BASE_PA_ROS_H 56 #include <geometry_msgs/Point.h> 57 #include <sensor_msgs/PointCloud.h> 58 #include <sensor_msgs/PointCloud2.h> 59 #include <sensor_msgs/LaserScan.h> 60 #include <nav_msgs/Path.h> 61 #include <std_srvs/Empty.h> 63 #include <octomap_msgs/Octomap.h> 68 #include <pcl/point_cloud.h> 69 #include <pcl/point_types.h> 74 template <
typename OCTREE>
83 typedef typename pcl::PointCloud<pcl::PointXYZ>::ConstPtr
95 virtual void clear(
void);
99 bool addCloud(
const sensor_msgs::PointCloud2ConstPtr &cloud,
104 bool addCloud(
const sensor_msgs::PointCloudConstPtr &cloud,
109 bool addCloud(
const sensor_msgs::LaserScanConstPtr &cloud,
114 octomap_msgs::OctomapPtr
getOctomap(
void)
const;
120 const int tree_depth = 0,
const bool expand =
false)
const;
123 const int tree_depth = 0,
const bool expand =
false)
const;
143 OctKey
pointToKey(
const geometry_msgs::Point &point)
const;
145 geometry_msgs::PointPtr
keyToPoint(
const OctKey &key)
const;
147 void keyToPoint(
const OctKey &key,
double &x,
double &y,
double &z)
const;
154 bool getChildKey(
const OctKey ¤t,
const int current_level,
155 OctKey &child,
const int child_pos)
const;
158 bool getParentKey(
const OctKey ¤t,
const int current_level,
159 OctKey &parent)
const;
162 bool readFull(
const std::string& filename);
175 bool addCloud(
const PclPointCloudPtr &cloud,
181 const int min_level, PclPointCloud &cloud)
const;
185 OctKey &child,
const int child_pos)
const;
188 OctKey &parent)
const;
191 #include "octomap_pa/octree_base_pa_ros.hxx" 193 #endif // __OCTREE_BASE_PA_ROS_H sensor_msgs::PointCloud2Ptr getOctomapPcdFree(const int tree_depth=0, const bool expand=false) const
similar to getOctomapPcd, but only returning just empty voxels
void getParentKeySimple(const OctKey ¤t, const int current_level, OctKey &parent) const
helper function for getParentKey
octomap_msgs::OctomapPtr getOctomapFull(void) const
function for getting the full octomap
virtual void clear(void)
clear local timestamps with octomap
OctKey pointToKey(const geometry_msgs::Point &point) const
functions for converting from point (geometry_msg) to key
::octomap::OcTreeKey OctKey
bool getParentKey(const OctKey ¤t, const int current_level, OctKey &parent) const
bool updateTime(const ros::Time &time)
cOctreeBasePaRos< OCTREE > TreeTypeFull
void getOctomapPcdSub(const OctKey &key, const int current_level, const int min_level, PclPointCloud &cloud) const
helper function for getOctomapPcd...
ros::Time getOutputTime(void) const
octomap_msgs::OctomapPtr getOctomap(void) const
function for getting the binary octomap
void setOutputTime(const ros::Time &time)
virtual ros::Time getLastInsertionTime(void) const
ros::Time last_insertion_time_
internal variable for storing last insertion time
bool addCloud(const sensor_msgs::PointCloud2ConstPtr &cloud, const cAddCloudParameter ¶ms, const tf::Transform transform=tf::Transform::getIdentity())
pcl::PointCloud< pcl::PointXYZ >::Ptr PclPointCloudPtr
cOctreeBasePaRos(double resolution)
default constructor
cOctreeBasePaRosParameter rosparams_base_
parameters
sensor_msgs::PointCloud2Ptr getOctomapPcd(const int tree_depth=0, const bool expand=false) const
function for getting the pointcloud equivalent of the octomap
virtual ~cOctreeBasePaRos()
default destructor
bool getChildKey(const OctKey ¤t, const int current_level, OctKey &child, const int child_pos) const
geometry_msgs::PointPtr keyToPoint(const OctKey &key) const
function for converting from key to point (geometry_msg)
bool readFull(const std::string &filename)
trying to read the given file into the current OcTree
pcl::PointCloud< pcl::PointXYZ >::ConstPtr PclPointCloudConstPtr
pcl::PointCloud< pcl::PointXYZ > PclPointCloud
void getChildKeySimple(const OctKey ¤t, const int current_level, OctKey &child, const int child_pos) const
helper function for getChildKey
ros::Time current_output_time_
internal variable for storing current output time
virtual void setLastInsertionTime(const ros::Time &time)