-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenNI 2 grabber #276
Merged
jspricke
merged 12 commits into
PointCloudLibrary:master
from
kwaegel:openni2_pullrequest
May 12, 2014
Merged
OpenNI 2 grabber #276
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
551c9e9
Added libboost-chrono1.53-dev to Travis CI script.
kwaegel 0733d47
Added boost::chrono to dependency list
kwaegel e8e641e
Added FindOpenNI2.cmake search module.
kwaegel f780d48
Created abstract Image interface for OpenNI grabbers.
kwaegel 50b50af
Added OpenNI 2 grabber.
kwaegel 7da8ed5
Stopped throwing exception on frame sync failure.
kwaegel ebd82de
Fixed data race problem with multiple sensors
kwaegel c9c80e0
Fixed warnings in OpenNI 2 grabberModeToOpenniMode
kwaegel 2a06fc1
Added OpenNI 2 viewer app to visualization module.
kwaegel 24a24c9
Added HAVE_OPENNI check to people_app
kwaegel 9a89c29
Move common image files to pcl/io/ during the installation; fix block…
fralik 0a7a0f3
Added common search path for deb packages.
kwaegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
############################################################################### | ||
# Find OpenNI 2 | ||
# | ||
# This sets the following variables: | ||
# OPENNI2_FOUND - True if OPENNI 2 was found. | ||
# OPENNI2_INCLUDE_DIRS - Directories containing the OPENNI 2 include files. | ||
# OPENNI2_LIBRARIES - Libraries needed to use OPENNI 2. | ||
# OPENNI2_DEFINITIONS - Compiler flags for OPENNI 2. | ||
# | ||
# For libusb-1.0, add USB_10_ROOT if not found | ||
|
||
find_package(PkgConfig QUIET) | ||
|
||
# Find LibUSB | ||
if(NOT WIN32) | ||
pkg_check_modules(PC_USB_10 libusb-1.0) | ||
find_path(USB_10_INCLUDE_DIR libusb-1.0/libusb.h | ||
HINTS ${PC_USB_10_INCLUDEDIR} ${PC_USB_10_INCLUDE_DIRS} "${USB_10_ROOT}" "$ENV{USB_10_ROOT}" | ||
PATH_SUFFIXES libusb-1.0) | ||
|
||
find_library(USB_10_LIBRARY | ||
NAMES usb-1.0 | ||
HINTS ${PC_USB_10_LIBDIR} ${PC_USB_10_LIBRARY_DIRS} "${USB_10_ROOT}" "$ENV{USB_10_ROOT}" | ||
PATH_SUFFIXES lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(USB_10 DEFAULT_MSG USB_10_LIBRARY USB_10_INCLUDE_DIR) | ||
|
||
if(NOT USB_10_FOUND) | ||
message(STATUS "OpenNI 2 disabled because libusb-1.0 not found.") | ||
return() | ||
else() | ||
include_directories(SYSTEM ${USB_10_INCLUDE_DIR}) | ||
endif() | ||
endif(NOT WIN32) | ||
|
||
if(${CMAKE_VERSION} VERSION_LESS 2.8.2) | ||
pkg_check_modules(PC_OPENNI2 openni2-dev) | ||
else() | ||
pkg_check_modules(PC_OPENNI2 QUIET openni2-dev) | ||
endif() | ||
|
||
set(OPENNI2_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER}) | ||
|
||
set(OPENNI2_SUFFIX) | ||
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set(OPENNI2_SUFFIX 64) | ||
endif(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
|
||
find_path(OPENNI2_INCLUDE_DIRS OpenNI.h | ||
PATHS | ||
"$ENV{OPENNI2_INCLUDE${OPENNI2_SUFFIX}}" # Win64 needs '64' suffix | ||
/usr/include/openni2 # common path for deb packages | ||
) | ||
|
||
find_library(OPENNI2_LIBRARY | ||
NAMES OpenNI2 # No suffix needed on Win64 | ||
libOpenNI2 # Linux | ||
PATHS "$ENV{OPENNI2_LIB${OPENNI2_SUFFIX}}" # Windows default path, Win64 needs '64' suffix | ||
"$ENV{OPENNI2_REDIST}" # Linux install does not use a separate 'lib' directory | ||
) | ||
|
||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} ${LIBUSB_1_LIBRARIES}) | ||
else() | ||
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY}) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(OpenNI2 DEFAULT_MSG OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) | ||
|
||
mark_as_advanced(OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) | ||
|
||
if(OPENNI2_FOUND) | ||
# Add the include directories | ||
set(OPENNI2_INCLUDE_DIRS ${OPENNI2_INCLUDE_DIR}) | ||
set(OPENNI2_REDIST_DIR $ENV{OPENNI2_REDIST${OPENNI2_SUFFIX}}) | ||
message(STATUS "OpenNI 2 found (include: ${OPENNI2_INCLUDE_DIRS}, lib: ${OPENNI2_LIBRARY}, redist: ${OPENNI2_REDIST_DIR})") | ||
endif(OPENNI2_FOUND) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/openni2-dev/libopenni2/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kwaegel can you please fix this as well, or should I send a pull request?