Robotics StackExchange | Archived questions

Illegal Instruction for pcd_viewer and voxel_grid

Hey,

after a longtime search session I cannot find a solution to this error-message:

illegal instruction (core dumped)

I faced this issue during the PCL-Tutorials when I ran

pcdviewer anypcd_file.pcd

or

./voxel_grid

PointCloud before filtering: 460400 data points (x y z).Ungültiger Maschinenbefehl (Speicherabzug geschrieben)

Well, "Ungültiger Maschinenbefehl" is german for illegal instruction....

Original Code:

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/filters/voxel_grid.h>

int
main (int argc, char** argv)
{
  sensor_msgs::PointCloud2::Ptr cloud (new sensor_msgs::PointCloud2 ());
  sensor_msgs::PointCloud2::Ptr cloud_filtered (new sensor_msgs::PointCloud2 ());

  // Fill in the cloud data
  pcl::PCDReader reader;
  // Replace the path below with the path where you saved your file
  reader.read ("table_scene_lms400.pcd", *cloud); // Remember to download the file first!

  std::cerr << "PointCloud before filtering: " << cloud->width * cloud->height 
       << " data points (" << pcl::getFieldsList (*cloud) << ").";

  // Create the filtering object
  pcl::VoxelGrid<sensor_msgs::PointCloud2> sor;
  sor.setInputCloud (cloud);
  sor.setLeafSize (0.01f, 0.01f, 0.01f);
  sor.filter (*cloud_filtered);

  std::cerr << "PointCloud after filtering: " << cloud_filtered->width * cloud_filtered->height 
       << " data points (" << pcl::getFieldsList (*cloud_filtered) << ").";

  pcl::PCDWriter writer;
  writer.write ("table_scene_lms400_downsampled.pcd", *cloud_filtered, 
         Eigen::Vector4f::Zero (), Eigen::Quaternionf::Identity (), false);

  return (0);
}

Based on various suggestions I tried to exchange sensor_msgs::PointCloud2 for pcl::PointXYZ without any improvement of the issue.

Any more suggestions?

My System: Ubuntu 12.04 LTS 64 Bit ROS Groovy Intel® Core™2 Duo CPU E6550 @ 2.33GHz × 2 with 4GB RAM

Recently updated.

Pls HLP! :-)

Asked by Josef on 2013-06-26 02:47:27 UTC

Comments

Answers