Skip to content
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

Add librealsense2 support for OSX #2

Merged
merged 3 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmake/FindRealSense2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ else()

list(APPEND REALSENSE2_INC_SEARCH_PATH $ENV{REALSENSE2_HOME}/include)
list(APPEND REALSENSE2_LIB_SEARCH_PATH $ENV{REALSENSE2_HOME}/lib)
list(APPEND REALSENSE2_INC_SEARCH_PATH $ENV{REALSENSE2_DIR}/include)
list(APPEND REALSENSE2_LIB_SEARCH_PATH $ENV{REALSENSE2_DIR}/lib)
endif()

find_path(REALSENSE2_INCLUDE_DIRS librealsense2/rs.hpp
Expand Down
5 changes: 5 additions & 0 deletions modules/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ if(USE_REALSENSE)
# Add specific build flag to turn off warnings coming from RealSense 3rd party
vp_set_source_file_compile_flag(src/rgb-depth/realsense/vpRealSense.cpp -Wno-strict-aliasing -Wno-pessimizing-move -Wno-unused-parameter)
endif()
if(USE_REALSENSE2)
# Add specific build flag to turn off warnings coming from RealSense2 3rd party
vp_set_source_file_compile_flag(src/rgb-depth/realsense/vpRealSense2.cpp -Wno-reorder -Wno-unused-function)
vp_set_source_file_compile_flag(test/rgb-depth/testRealSense2_SR300.cpp -Wno-reorder -Wno-unused-function)
endif()

vp_module_include_directories(${opt_incs})
vp_create_module(${opt_libs})
Expand Down
2 changes: 1 addition & 1 deletion modules/sensor/test/rgb-depth/testRealSense2_SR300.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ int main(int argc, char *argv[]) {
auto infrared_frame = data.first(RS2_STREAM_INFRARED);
getNativeFrame(infrared_frame, (unsigned char *) infrared_raw.bitmap);

#ifdef VISP_HAVE_PCL
getPointcloud(depth_frame, pointcloud_colvector);

#ifdef VISP_HAVE_PCL
{
std::lock_guard<std::mutex> lock(mutex);

Expand Down