PointCloudLibrary / PointCloudLibrary/pcl

[compile error] "Compile PCL with librealsense support"

Open
#5,427 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: compile error status: triage
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Hello everyone,

I have a problem regarding the Intel RealSense module.

I know that there are differences between the first librealsense and the librealsense2 versions: The former supports several old cameras that are not supported by the newer librealsense2 releases and newer cameras are only supported by the librealsense2 releases. Hence, I have to select the appropriate version. However at least according to my understanding for the CMake options WITH_RSSDK and WITH_RSSDK2, PCL should support both. I have different cameras available and some are only supported by the first librealsense version, thus my tests aimed particularly at this version. I also tried the same with the latest librealsense2 release with mainly the same results, still for explained reasoning my main aim is the old librealsense version.

In preparation to use it with PCL, I downloaded the latest version 1.12.4 from the librealsense GitHub repository and compiled it (Windows 10, Visual Studio 2022, 64 bit). Running the Install target creates a usual library structure containing header files, import libraries (*.lib), the DLL and a few programs that open the camera and show a live image. This verifies that the installation worked and that the SDK is usable.

Next, I tried to compile PCL with support for this library and this is where my problems start. I know how to setup PCL and compile its dependencies from source. I have a working VS solution to compile PCL and its included apps (still without Qt support for the moment, i.e. some sample programs are missing, but this is also independent from my problem). My problem is only: How to get PCL working with my build of the librealsense library?

I activated the WITH_RSSDK flag and defined RSSDK_LIBRARY as well as RSSDK_DIR accordingly: The former I set to the fully qualified path to the import library realsense.lib, the latter I tried different options but I think it should point to the include path. Still, none of them worked. Whatever I select here, the solution contains no RealSense bindings. Next I inspected the FindRSSDK.cmake script and it expects a file pcxversion.h that contains a definition of a library version. Still, this file is not contained in the build / install output of the librealsense library. To proceed somehow, I created it only containing the content #define PCX_VERSION_1 inside the librealsense include directory. Thereafter, running Configure / Generate in the CMake GUI creates a solution that seems to contain RealSense bindings, at least there is a pcl_real_sense_viewer project in the solution. However, this does not compile. It tries to include the files pcximage.h and pcxsession.h which do not exist.

Therefore I would like to ask: How can I use the librealsense build in combination with PCL or what else is missing here?

Your Environment (please complete the following information):

  • OS: Windows 10
  • Compiler: VS2022
  • PCL Version: 1.12.1
  • PCL Type: compiled from source

If PCL was compiled from source or failure in compiling PCL itself:

  • GPU, Kinfu, CUDA enabled? No
  • librealrense 1.12.4, Boost 1.80, Eigen 3.40, FLANN 1.9.1, VTK 9.1.0, Qhull 2020.2
  • Compilation flags are used: default

Possible Solution

Unknown.

Additional context

Compilation errors only refer to the librealsense integration. PCL itself (i.e. without librealsense support) compiles and runs fine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with FindRSSDK.cmake and the WITH_RSSDK and WITH_RSSDK2 configuration paths described in the issue. Reproduce the Windows build using the reported librealsense, PCL, and Visual Studio versions, then inspect the pcl_real_sense_viewer target and its missing pcximage.h and pcxsession.h includes. Done means the supported RealSense configuration is documented or compiles without those missing headers.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.