-
Notifications
You must be signed in to change notification settings - Fork 400
/
ColorOctomapServer.h
37 lines (31 loc) · 1.32 KB
/
ColorOctomapServer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef COLOR_OCTOMAP_SERVER_RGBDSLAM
#define COLOR_OCTOMAP_SERVER_RGBDSLAM
#include "parameter_server.h"
//#include <octomap/ColorVoxelMap.h>
#include <octomap/ColorOcTree.h>
#include <octomap/Pointcloud.h>
#include <octomap/octomap.h>
#include <qtconcurrentrun.h>
#include <memory>
#include <boost/shared_ptr.hpp>
class ColorOctomapServer {
public:
ColorOctomapServer();
virtual ~ColorOctomapServer();
void reset();
bool save(const char* filename) const;
///Raycas cloud into the octomap
/// @param cloud pointcloud in arbitrary frame (specified in the clouds header)
virtual void insertCloudCallback(const pointcloud_type::ConstPtr cloud, double max_range = -1.0);
///Raycast cloud into the octomap
/// @param cloud pointcloud in map frame
/// @param origin sensor location in map frame
virtual void insertCloudCallbackCommon(boost::shared_ptr<octomap::Pointcloud> cloud,
pointcloud_type::ConstPtr colors,
const octomap::point3d& origin, double max_range = -1.0);
protected:
octomap::ColorOcTree m_octoMap;
//octomap::OctomapROS<octomap::ColorOcTree> m_octoMap;
mutable QFuture<void> rendering; //Mutable is a hack, otherwise waitforfinished cannot be called in const function
};
#endif