Skip to content

[Proposal] New tutorial for "How to install PCL for windows x64 Visual Studio 2019" #4462

@petrasvestartas

Description

@petrasvestartas

Hi,

We went through a painful process of PCL installation.
In order to save someone else time, I would strongly recommend to include these steps in PCL github ReadMe file.


TRYING TO INSTALL PCL FOR DAYS, WEEKS, MONTHS AND YEARS FOR WINDOWS X64 VISUAL STUDIO 2019?
READ CAREFULLY STEPS BELOW:

  1. Download All-in-One Installer
    https://github.com/PointCloudLibrary/pcl/releases
    Including OpenNi

We tried VCPKG packages, but it did not work because of Eigen, and the only way was to install via all in one installer.


  1. Set Environmental Variables and restart computer.
    We tried on two separate laptops and this was the full list needed. Because in one pc some references were ok and the other pc required more references.
    To find environmental variables in windows bottom left, type Environmental Variables.
name: PCL_ROOT
value: C:\Program Files\PCL 1.11.1

name:Path
C:\Program Files\OpenNI2
C:\Program Files\PCL 1.11.1\bin
C:\Program Files\PCL 1.11.1\3rdParty
C:\Program Files\PCL 1.11.1\3rdParty\VTK\bin
C:\Program Files\OpenNI2\Tools

name: OPENNI2_INCLUDE64
value: C:\Program Files\OpenNI2\Include\

name: OPENNI2_LIB64
value: C:\Program Files\OpenNI2\Lib\

name: OPENNI2_REDIST64
value: C:\Program Files\OpenNI2\Redist\

image


  1. Create Folder in whatever place (I used C:/lib/PCLTest drive) and add CMakeLists.txt and .cpp file following the online tutorial instructions: https://pcl.readthedocs.io/projects/tutorials/en/latest/cloud_viewer.html#cloud-viewer.
    Add text from this website into CMakeLists.txt and then add cloud_viewer.cpp with the code inside.

image

image


  1. In CMake (https://cmake.org/download/) reference the folder where those two files are and reference empty build file.
    Press configure and build.
    If the cpp file is named main.cpp it wont work because it must be cloud_viewer.cpp .
    Also do not forget to add code from the tutorial website (pointclouds.org) else the code wont build.
    Press Configure and then Generate. Do not forget to set compiler to x64 bit. Compile will create project file in build directory.
    image
    In my case I had some warning messages but it worked:
    image

  1. Open Visual Studio project and set to project to cloud_viewer.
    Build it.
    image

  1. Copy PointCloud.pcd file to project main folder, the pcd (pointcloud data sets) are in your program files, use search engine Everything to find these files faster:
    C:\DEV\PCL1_11_1_Test03\build
    image

  1. Change the name of the .pcd file in the cloud_viewer.cpp file, build it again and run it in debug mode.

image


PCL IS AWESOME

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions