我是靠谱客的博主 刻苦短靴,最近开发中收集的这篇文章主要介绍Point Cloud Library(PCL) 环境配置,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1:

:warning: This is a issue tracker, please use our mailing list for questions:
www.pcl-users.org. :warning:


I am new to the point cloud library and all of its dependencies.  All I want
to do is compile something simple like  pcd_read.cpp
<http://www.pointclouds.org/documentation/tutorials/reading_pcd.php#reading-pcd>
.  Whenever I run cmake, it gives me an error about the VTK not being found.
I have attached the pcd_read.cpp, CMakeLists.txt, and the build output from
running "cmake .." inside the build folder.

What started out as a warning turned into an error towards the end of the
build:
<http://www.pcl-users.org/file/t499130/33582190-e461581e-d908-11e7-8807-c86905b0d14c.png>

## Your Environment

* Operating System and version: Windows 10 Insider Preview 17064 and Windows
8.1 Version 6.3 (Build 9600)
* Compiler: Microsoft Visual Studio 2017 and Microsoft Visual Studio 2015
compilers
* PCL Version:  1.8.1
<https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.8.1>  ,
specifically installed PCL-1.8.1-AllInOne-msvc2017-win64.exe on a Windows 10
machine and PCL-1.8.1-AllInOne-msvc2015-win64 on a Windows 8.1 machine
* CMake Version:  3.10.0
<https://cmake.org/files/v3.10/cmake-3.10.0-win64-x64.msi>   (x64 version)

## Expected Behavior
I followed the  instructions on creating the CMakeLists.txt file
<http://www.pointclouds.org/documentation/tutorials/reading_pcd.php#reading-pcd>
and running cmake for the pcd_read example, and I expected the build to
complete successfully.  

## Current Behavior
However, on both a Windows 10 and Windows 8.1 system, I get a VTK
warning/error saying that it can't resolve VTK (details are in the attached
build logs and the above screenshot).  I assume the VTK is installed as part
of the PCL-1.8.1-AllInOne-msvc2017-win64.exe all-in-one executable.

## Possible Solution
I need help with this

## Code to Reproduce
Code and cmake build output can be found in the attached zip here:
https://github.com/PointCloudLibrary/pcl/files/1529158/PcdConverter.zip


## Context

I really want to make use of the point cloud library but I can't even get it
to compile a simple console app.  All I want it to do is compile something,
anything.


N/A




--
Sent from: http://www.pcl-users.org/
_______________________________________________
http://pointclouds.org/mailman/listinfo/pcl-users

2:

So I went another way, and got it to compile using Visual Studio 2017 instead
of the command line approach.  In case anyone else needs this, I'll leave
the instructions here below.

PCL 1.8.1 All-In-One Installer 64-bit:
https://github.com/PointCloudLibrary/pcl/releases/download/pcl-1.8.1/PCL-1.8.1-AllInOne-msvc2017-win64.exe
<https://github.com/PointCloudLibrary/pcl/releases/download/pcl-1.8.1/PCL-1.8.1-AllInOne-msvc2017-win64.exe>  

Create a VC++ Console App Project, then add this code to the main cpp file:
http://pointclouds.org/documentation/tutorials/reading_pcd.php#reading-pcd
<http://pointclouds.org/documentation/tutorials/reading_pcd.php#reading-pcd>  
        #include <iostream>
        #include <pcl/io/pcd_io.h>
        #include <pcl/point_types.h>

        int main (int argc, char** argv)
        {
          pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new
pcl::PointCloud<pcl::PointXYZ>);

          if (pcl::io::loadPCDFile<pcl::PointXYZ> ("test_pcd.pcd", *cloud) == -1)
//* load the file
          {
                PCL_ERROR ("Couldn't read file test_pcd.pcd n");
                return (-1);
          }
          std::cout << "Loaded "
                                << cloud->width * cloud->height
                                << " data points from test_pcd.pcd with the following fields: "
                                << std::endl;
          for (size_t i = 0; i < cloud->points.size (); ++i)
                std::cout << "    " << cloud->points[i].x
                                  << " "    << cloud->points[i].y
                                  << " "    << cloud->points[i].z << std::endl;

          return (0);
        }

Make sure you are compiling as "Release" "x64".

Right-click on the project in Solution Explorer and choose Properties, then
set the following
Project Configuration Properties:
VC++ Directories:
• Include Directories:
  o C:Program FilesPCL 1.8.13rdPartyVTKinclude
  o C:Program FilesPCL 1.8.13rdPartyQhullinclude
  o C:Program FilesPCL 1.8.13rdPartyFLANNinclude
  o C:Program FilesPCL 1.8.13rdPartyEigeneigen3
  o C:Program FilesPCL 1.8.13rdPartyBoostincludeboost-1_64
  o C:Program FilesPCL 1.8.1includepcl-1.8
• Library Directories:
  o C:Program FilesPCL 1.8.1lib
  o C:Program FilesPCL 1.8.13rdPartyVTKlib
  o C:Program FilesPCL 1.8.13rdPartyFLANNlib
  o C:Program FilesPCL 1.8.13rdPartyBoostlib
C/C++:
• Additional Include Directories:
  o C:Program FilesPCL 1.8.13rdPartyVTKinclude
  o C:Program FilesPCL 1.8.13rdPartyQhullinclude
  o C:Program FilesPCL 1.8.13rdPartyFLANNinclude
  o C:Program FilesPCL 1.8.13rdPartyEigeneigen3
  o C:Program FilesPCL 1.8.13rdPartyBoostincludeboost-1_64
  o C:Program FilesPCL 1.8.1includepcl-1.8
• Precompile Headers
  o Precompile Header: Not Using Precompiled Headers
Linker:
• Input:
  o Additional Dependencies
     pcl_common_release.lib
     pcl_io_release.lib
     libboost_thread-vc141-mt-1_64.lib
     libboost_system-vc141-mt-1_64.lib
     libboost_date_time-vc141-mt-1_64.lib
     libboost_chrono_vc141-m5-1_64.lib
     libboost_filesystem-vc141-mt-1_64.lib
     libboost_iostreams-vc141-mt-1_64.lib

Compile the code and it should work.




--
Sent from: http://www.pcl-users.org/
_______________________________________________
http://pointclouds.org/mailman/listinfo/pcl-users

最后

以上就是刻苦短靴为你收集整理的Point Cloud Library(PCL) 环境配置的全部内容,希望文章能够帮你解决Point Cloud Library(PCL) 环境配置所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(70)

评论列表共有 0 条评论

立即
投稿
返回
顶部