mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Increased version 0.10.5: Added unknownSpaceFilled parameter to occupancy2DFromLaserScan()
This commit is contained in:
@@ -20,7 +20,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
|
|||||||
#######################
|
#######################
|
||||||
SET(RTABMAP_MAJOR_VERSION 0)
|
SET(RTABMAP_MAJOR_VERSION 0)
|
||||||
SET(RTABMAP_MINOR_VERSION 10)
|
SET(RTABMAP_MINOR_VERSION 10)
|
||||||
SET(RTABMAP_PATCH_VERSION 4)
|
SET(RTABMAP_PATCH_VERSION 5)
|
||||||
SET(RTABMAP_VERSION
|
SET(RTABMAP_VERSION
|
||||||
${RTABMAP_MAJOR_VERSION}.${RTABMAP_MINOR_VERSION}.${RTABMAP_PATCH_VERSION})
|
${RTABMAP_MAJOR_VERSION}.${RTABMAP_MINOR_VERSION}.${RTABMAP_PATCH_VERSION})
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ void RTABMAP_EXP occupancy2DFromLaserScan(
|
|||||||
const cv::Mat & scan,
|
const cv::Mat & scan,
|
||||||
cv::Mat & ground,
|
cv::Mat & ground,
|
||||||
cv::Mat & obstacles,
|
cv::Mat & obstacles,
|
||||||
float cellSize);
|
float cellSize,
|
||||||
|
bool unknownSpaceFilled = false);
|
||||||
|
|
||||||
cv::Mat RTABMAP_EXP create2DMapFromOccupancyLocalMaps(
|
cv::Mat RTABMAP_EXP create2DMapFromOccupancyLocalMaps(
|
||||||
const std::map<int, Transform> & poses,
|
const std::map<int, Transform> & poses,
|
||||||
|
|||||||
@@ -187,8 +187,10 @@ struct Transformation2{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Constructor that sets the translation and rotation **/
|
/** Constructor that sets the translation and rotation **/
|
||||||
Transformation2 (const T& _theta, const Vector2<T>& trans):
|
Transformation2 (const T& _theta, const Vector2<T>& trans){
|
||||||
Transformation2(trans.x(), trans.y(), _theta){}
|
setRotation(_theta);
|
||||||
|
setTranslation(trans.x(), trans.y());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Copy constructor **/
|
/** Copy constructor **/
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ void occupancy2DFromLaserScan(
|
|||||||
const cv::Mat & scan,
|
const cv::Mat & scan,
|
||||||
cv::Mat & ground,
|
cv::Mat & ground,
|
||||||
cv::Mat & obstacles,
|
cv::Mat & obstacles,
|
||||||
float cellSize)
|
float cellSize,
|
||||||
|
bool unknownSpaceFilled)
|
||||||
{
|
{
|
||||||
if(scan.empty())
|
if(scan.empty())
|
||||||
{
|
{
|
||||||
@@ -66,7 +67,7 @@ void occupancy2DFromLaserScan(
|
|||||||
scans.insert(std::make_pair(1, obstaclesCloud));
|
scans.insert(std::make_pair(1, obstaclesCloud));
|
||||||
|
|
||||||
float xMin, yMin;
|
float xMin, yMin;
|
||||||
cv::Mat map8S = create2DMap(poses, scans, cellSize, false, xMin, yMin);
|
cv::Mat map8S = create2DMap(poses, scans, cellSize, unknownSpaceFilled, xMin, yMin);
|
||||||
|
|
||||||
// find ground cells
|
// find ground cells
|
||||||
std::list<int> groundIndices;
|
std::list<int> groundIndices;
|
||||||
|
|||||||
Reference in New Issue
Block a user