question:push points to pcl::PointCloud when size big than 4 Million,crashed.

classic Classic list List threaded Threaded
3 messages Options
xam
Reply | Threaded
Open this post in threaded view
|

question:push points to pcl::PointCloud when size big than 4 Million,crashed.

xam
This post has NOT been accepted by the mailing list yet.
push points to pcl::PointCloud when point cloud size big than 4 Million,crashed.
How odd!

who can tell me  Where is the mistake made by me on earth

code:

for(it=pPts->begin();it!=pPts->end();++it){
       const CPoint3D & tmpPt = it->second;
       tmpPclPt.x = tmpPt.x;
       tmpPclPt.y = tmpPt.y;
       tmpPclPt.z = tmpPt.z;
       tmpPclPt.label = it->first;
       m_pBasicCloud->push_back(tmpPclPt);  //here crash. when more than  4  Million points  }
//pPts: std map

pcl::PointCloud<pcl::PointXYZL>::Ptr  m_pBasicCloud;

os: win7 32位。
IDE:
Qt Creator 3.2.1 (opensource)
Based on Qt 5.3.2 (MSVC 2010, 32 bit)

Reply | Threaded
Open this post in threaded view
|

Re: question:push points to pcl::PointCloud when size big than 4 Million,crashed.

VictorL
This kind of question belongs to PCL-users. The dev board is for working on the PCL code itself.

You don't check whether the allocation is fine or not; at some point you will lack memory behind your point cloud and the allocation will fail.

http://www.wikiwand.com/en/Memory_management
Reply | Threaded
Open this post in threaded view
|

Re: question:push points to pcl::PointCloud when size big than 4 Million,crashed.

Bruno Martin
In reply to this post by xam
Hi,

It seems you just reach the limits of your 32bits system.  If you are to work frequently with data sets as big as that, I suggest rebuilding/installing PCL and all its dependencies to target 64bits systems(have a nice day).  That way, you will be able to address more memory within your process.

Of course, I assume your machine has sufficient RAM to run this.