mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
OccupancyGrid:segmentCloud() reset indices ptr to make sure the returned pointer is valid
This commit is contained in:
@@ -44,6 +44,13 @@ typename pcl::PointCloud<PointT>::Ptr OccupancyGrid::segmentCloud(
|
|||||||
pcl::IndicesPtr & obstaclesIndices,
|
pcl::IndicesPtr & obstaclesIndices,
|
||||||
pcl::IndicesPtr * flatObstacles) const
|
pcl::IndicesPtr * flatObstacles) const
|
||||||
{
|
{
|
||||||
|
groundIndices.reset(new std::vector<int>);
|
||||||
|
obstaclesIndices.reset(new std::vector<int>);
|
||||||
|
if(flatObstacles)
|
||||||
|
{
|
||||||
|
flatObstacles->reset(new std::vector<int>);
|
||||||
|
}
|
||||||
|
|
||||||
typename pcl::PointCloud<PointT>::Ptr cloud(new pcl::PointCloud<PointT>);
|
typename pcl::PointCloud<PointT>::Ptr cloud(new pcl::PointCloud<PointT>);
|
||||||
pcl::IndicesPtr indices(new std::vector<int>);
|
pcl::IndicesPtr indices(new std::vector<int>);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user