Skip to content

Commit

Permalink
Merge pull request #510 from nizar-sallem/fix_ply
Browse files Browse the repository at this point in the history
Fix: set origin and orientation values to defaults before parsing
  • Loading branch information
jspricke committed Feb 17, 2014
2 parents a133e85 + 4909463 commit e4bafa6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion io/src/ply_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,15 @@ pcl::PLYReader::parse (const std::string& istream_filename)
////////////////////////////////////////////////////////////////////////////////////////
int
pcl::PLYReader::readHeader (const std::string &file_name, pcl::PCLPointCloud2 &cloud,
Eigen::Vector4f &, Eigen::Quaternionf &,
Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
int &, int &, unsigned int &, const int)
{
// Silence compiler warnings
cloud_ = &cloud;
range_grid_ = new std::vector<std::vector<int> >;
cloud_->width = cloud_->height = 0;
origin = Eigen::Vector4f::Zero ();
orientation = Eigen::Quaternionf::Identity ();
if (!parse (file_name))
{
PCL_ERROR ("[pcl::PLYReader::read] problem parsing header!\n");
Expand Down

0 comments on commit e4bafa6

Please sign in to comment.