OctoMap: Added occupancy threshold to constructor

This commit is contained in:
matlabbe
2016-09-01 20:33:05 -04:00
parent 717e82c09e
commit 4bd9e4f847
7 changed files with 43 additions and 8 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ public:
class RTABMAP_EXP OctoMap {
public:
OctoMap(float voxelSize = 0.1f);
OctoMap(float voxelSize = 0.1f, float occupancyThr = 0.5f);
const std::map<int, Transform> & addedNodes() const {return addedNodes_;}
void addToCache(int nodeId,
+1 -1
View File
@@ -491,7 +491,7 @@ class RTABMAP_EXP Parameters
RTABMAP_PARAM(Grid, NoiseFilteringRadius, float, 0.0, "Noise filtering radius (0=disabled). Done after segmentation.");
RTABMAP_PARAM(Grid, NoiseFilteringMinNeighbors, int, 5, "Noise filtering minimum neighbors.");
RTABMAP_PARAM(Grid, Scan2dUnknownSpaceFilled, bool, false, "Unknown space filled. Only used with 2D laser scans.");
RTABMAP_PARAM(Grid, Scan2dMaxFilledRange, float, 6.0, "Unknown space filled maximum range. If 0, the laser scan maximum range is used.");
RTABMAP_PARAM(Grid, Scan2dMaxFilledRange, float, 4.0, "Unknown space filled maximum range. If 0, the laser scan maximum range is used.");
public:
virtual ~Parameters();
+2 -1
View File
@@ -35,10 +35,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace rtabmap {
OctoMap::OctoMap(float voxelSize) :
OctoMap::OctoMap(float voxelSize, float occupancyThr) :
octree_(new octomap::ColorOcTree(voxelSize)),
hasColor_(false)
{
octree_->setOccupancyThres(occupancyThr);
UASSERT(voxelSize>0.0f);
}