Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Registration]ndt_omp running error #63

Open
kitzhongzhengqi opened this issue May 17, 2023 · 1 comment
Open

[Registration]ndt_omp running error #63

kitzhongzhengqi opened this issue May 17, 2023 · 1 comment

Comments

@kitzhongzhengqi
Copy link

kitzhongzhengqi commented May 17, 2023

@kkoide3 Hello,when I use ndt_omp a running error occurs,but it doesn't show up with original ndt ,the issue I proposed in PCL is here:PointCloudLibrary/pcl#5714, thanks a lot for your help!

@HyeonnSeo
Copy link

HyeonnSeo commented May 19, 2023

I had same error.
Did you try to test the follow example code?
$ roscd ndt_omp/data
$ rosrun ndt_omp align 251370668.pcd 251371071.pcd

I changed my CMakeLists.txt.


cmake_minimum_required(VERSION 3.10)
project(ndt_omp)

add_definitions(-std=c++14)
set(CMAKE_CXX_FLAGS "-std=c++14 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")

set(CMAKE_BUILD_TYPE "RELEASE")

find_package(catkin REQUIRED COMPONENTS
roscpp
pcl_ros
)

find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

message(STATUS "PCL_INCLUDE_DIRS:" ${PCL_INCLUDE_DIRS})
message(STATUS "PCL_LIBRARY_DIRS:" ${PCL_LIBRARY_DIRS})
message(STATUS "PCL_DEFINITIONS:" ${PCL_DEFINITIONS})

find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()

catkin_package(
INCLUDE_DIRS include
LIBRARIES ndt_omp
)

include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
)

add_library(ndt_omp
src/pclomp/voxel_grid_covariance_omp.cpp
src/pclomp/ndt_omp.cpp
src/pclomp/gicp_omp.cpp
)

add_executable(align
apps/align.cpp
)
add_dependencies(align
ndt_omp
)
target_link_libraries(align
${catkin_LIBRARIES}
${PCL_LIBRARIES}
ndt_omp
)

install(
TARGETS
ndt_omp
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

install(DIRECTORY include/pclomp
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})

if(OpenMP_CXX_FOUND)
target_link_libraries(ndt_omp OpenMP::OpenMP_CXX)
else()
message(WARNING "OpenMP not found")
endif()

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants