20 #include <nav_msgs/OccupancyGrid.h> 22 #include <pcl/point_cloud.h> 23 #include <pcl/point_types.h> 24 #include <sensor_msgs/PointCloud2.h> 32 explicit Grid3d(
const double sensor_dev);
35 bool open(
const std::string& map_path);
41 float computeCloudWeight(
const std::vector<pcl::PointXYZ>& points,
const float tx,
const float ty,
const float tz,
43 bool isIntoMap(
const float x,
const float y,
const float z)
const;
50 bool saveGrid(
const std::string& grid_path);
51 bool loadGrid(
const std::string& grid_path);
54 inline uint32_t
point2grid(
const float x,
const float y,
const float z)
const;
66 pcl::PointCloud<pcl::PointXYZ>::Ptr
cloud_;
76 std::unique_ptr<GridCell[]>
grid_;
bool isIntoMap(const float x, const float y, const float z) const
bool loadGrid(const std::string &grid_path)
uint32_t point2grid(const float x, const float y, const float z) const
bool open(const std::string &map_path)
std::unique_ptr< octomap::OcTree > octomap_
Octomap parameters.
std::unique_ptr< GridCell[]> grid_
TFSIMD_FORCE_INLINE const tfScalar & y() const
bool buildGridSliceMsg(const float z, nav_msgs::OccupancyGrid &msg) const
bool loadOctomap(const std::string &map_path)
bool saveGrid(const std::string &grid_path)
float computeCloudWeight(const std::vector< pcl::PointXYZ > &points, const float tx, const float ty, const float tz, const float a) const
3D probabilistic grid cell
TFSIMD_FORCE_INLINE const tfScalar & x() const
bool buildMapPointCloudMsg(sensor_msgs::PointCloud2 &msg) const
TFSIMD_FORCE_INLINE const tfScalar & z() const
void buildGrid3d2WorldTf(const std::string &global_frame_id, tf::StampedTransform &tf) const
void getMinOctomap(float &x, float &y, float &z) const
Grid3d(const double sensor_dev)
pcl::PointCloud< pcl::PointXYZ >::Ptr cloud_
3D point cloud representation of the map
double sensor_dev_
Init parameter.