nmellado/Super4PCS

PCL Wrapper

OgnjenMilicevic opened this issue · 4 comments

I understand that the PCL wrapper is a relatively new feature, but I am not finding sufficient instructions to use Super4PCS from within PCL (I am very basic at C++, so it might be me). You have provided an example that makes automatically, but I cannot use that code anywhere, as the code compiled in the manner explained at Compiling doesn't work with your example for the wrapper. Among other things, I cannot find the pcl::Super4PCS defined anywhere, and many other compiler errors.

Is there anyway you can provide an example for the PCL Wrapper but included in the external project, with CMakeLists required? Sort of a combination between help pages Compiling and Wrapper ?

Thanks in advance!!

Hi,

If you can't see the PCLWrapper in your IDE project, if might means that PCL is not found and the PCLWrapper project not configured.
Could you post here the cmake command you run, and its output ?
Also, how did you install PCL ?

Cheers

Hi
I am having problem to get PCLWrapper too.
Cmake output is below

Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17134.
Eigen3 root path: C:/Program Files/Eigen
[Deps] Use OpenCV 3.4.2 for image loading
CMake Warning (dev) at tests/CMakeLists.txt:97 (find_package):
Policy CMP0074 is not set: find_package uses PackageName_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

Environment variable Boost_ROOT is set to:

C:\Program Files\boost\boost_1_67_0\lib64-msvc-14.0

For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at demos/MeshlabPlugin/CMakeLists.txt:36 (message):
Skipping Meshlab plugin preparation - Meshlab not found

CMake Warning (dev) at demos/CMakeLists.txt:7 (find_package):
Policy CMP0074 is not set: find_package uses PackageName_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

Environment variable PCL_ROOT is set to:

C:\PCL

For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/PCL/cmake/PCLConfig.cmake:133 (find_package):
Policy CMP0074 is not set: find_package uses PackageName_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

Environment variable Boost_ROOT is set to:

C:\Program Files\boost\boost_1_67_0\lib64-msvc-14.0

For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
C:/PCL/cmake/PCLConfig.cmake:643 (find_boost)
C:/PCL/cmake/PCLConfig.cmake:865 (find_external_library)
demos/CMakeLists.txt:7 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

Could NOT find openni (missing: OPENNI_LIBRARY OPENNI_INCLUDE_DIRS)
Could NOT find openni (missing: OPENNI_LIBRARY OPENNI_INCLUDE_DIRS)
Could NOT find PCL_CUDA_SAMPLE_CONSENSUS (missing: PCL_CUDA_SAMPLE_CONSENSUS_LIBRARY PCL_CUDA_SAMPLE_CONSENSUS_INCLUDE_DIR)
Configuring done

Are these missing libraries prevent the Super4PCS to create wrapper for PCL?

I finally get Super4PCS into PCL with the CMakeLists.txt below

project (Super4PCS-Demos)
add_subdirectory(Super4PCS)
add_subdirectory(MeshlabPlugin)
add_subdirectory(PCLWrapper)


project(PCLWrapper)

find_package( PCL 1.8 QUIET COMPONENTS common io search visualization)
if( PCL_FOUND )
    message (STATUS "[Demos] PCL found, creating target PCLWrapper")
    file(GLOB_RECURSE Demo_PCL_headers
                      ${CMAKE_CURRENT_SOURCE_DIR}/*.h
                      ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)      
    set(Demo_PCL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
    include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
    add_executable(${PROJECT_NAME} ${Demo_PCL_SRC} ${Demo_PCL_headers})
    target_link_libraries(${PROJECT_NAME} super4pcs_algo super4pcs_utils ${PCL_LIBRARIES})
    include_directories( ${PCL_INCLUDE_DIRS} )
    add_definitions( ${PCL_DEFINITIONS} )
    link_directories( ${PCL_LIBRARY_DIRS} )
    install( TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin  )
endif( PCL_FOUND )

And then copied PCL related headers to PCL registration folder.

Ok great.
I've update OpenGR accordingly (see merged PR STORM-IRIT#17)