使用MSVC运行时点云(PCL)内存错误

时间:2017-04-13 09:04:48

标签: eigen point-cloud-library

我尝试使用MSVC(VS2013)构建SLAM演示。该演示来自https://github.com/HeYijia/dvo_demo-code

以下是错误消息,我不确定它是什么。它是Eigen的一个错误(在我的作品中是一个1.7.2),或者只是在连接点云时缺少一个帧。

我跟踪了可能出现此错误的函数调用。在这里,我粘贴了该函数和错误消息。

// This is my test.
pcl::PointCloud< pcl::PointXYZRGBA>::Ptr JoinPointCloud(pcl::PointCloud< pcl::PointXYZRGBA>::Ptr oldpointclouds, dvo_framedata::FrameRGBD & newframe, Eigen::Affine3d & transform)
{
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr newcloud = img2pcl(newframe);                   // Frame to point cloud.
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr output(new pcl::PointCloud<pcl::PointXYZRGBA>); // To save new point cloud.

    pcl::transformPointCloud(*newcloud, *output, transform.cast<float>()); // Modified on 20170411.

    *oldpointclouds += *output;

    //    static pcl::VoxelGrid<pcl::PointXYZRGBA> voxel;
    pcl::VoxelGrid<pcl::PointXYZRGBA> voxel; // Modified on 20170411.
    voxel.setLeafSize(0.01f, 0.01f, 0.01f);  // Unit for down sample point, which is 1cm here.
    voxel.setInputCloud(oldpointclouds);
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr showout(new pcl::PointCloud<pcl::PointXYZRGBA>);
    voxel.filter(*showout);                  // Filter result is outputed to showout.

    output->clear();   // Added on 20170411.
    newcloud->clear(); // Added on 20170411.
    return showout;
}

错误消息

    KernelBase.dll!75f2c54f()   Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]    
    TestDVO.exe!Eigen::internal::throw_std_bad_alloc() Line 93  C++
>   TestDVO.exe!Eigen::internal::aligned_malloc(unsigned int size) Line 234 C++
    TestDVO.exe!Eigen::aligned_allocator<Eigen::internal::workaround_msvc_stl_support<pcl::PointXYZRGBA> 

>::allocate(unsigned int num, const void * hint) Line 726   C++
    [External Code] 
    TestDVO.exe!std::vector<pcl::PointXYZRGBA,Eigen::aligned_allocator<pcl::PointXYZRGBA> >::resize(unsigned 

int new_size, const pcl::PointXYZRGBA & x) Line 85  C++
    TestDVO.exe!std::vector<pcl::PointXYZRGBA,Eigen::aligned_allocator<pcl::PointXYZRGBA> >::resize(unsigned 

int new_size) Line 78   C++
    TestDVO.exe!pcl::PointCloud<pcl::PointXYZRGBA>::operator+=(const pcl::PointCloud<pcl::PointXYZRGBA> & rhs) 

Line 255    C++
    TestDVO.exe!dvo_viewer::JoinPointCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> > 

oldpointclouds, dvo_framedata::FrameRGBD & newframe, Eigen::Transform<double,3,2,0> & transform) Line 87    C++
    TestDVO.exe!main(int argc, char * * argv) Line 71   C++

0 个答案:

没有答案