2017-07-30 8 views
1

RANSACを適用し、必要な部分をシーンから正しく分割しました。 問題は、例外をスローした後にクラッシュしたカメラの前に、必要な部分が長時間存在していないことが原因です。 どのようにしてオブジェクトがシーン内に見つからない場合でも、この例外を最良の方法で扱うことができますか?入力ポイントクラウドにデータがありません

[pcl::SampleConsensusModel::getSamples] Can not select 0 unique points out of 0! 
[pcl::RandomSampleConsensus::computeModel] No samples could be selected! 
[pcl::SACSegmentation::segment] Error segmenting the model! No solution found. 
Could not find any points that fitted the model. 
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud! 
terminate called after throwing an instance of 'pcl::IOException' 
    what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 
Aborted (core dumped) 

答えて

1

書き込み機能を呼び出す前に、クラウドのサイズを確認してください。

if(cloud->size() > 0)

+0

ありがとうございます:) –

関連する問題