-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'IntelRealSense:master' into fix_d457_rgb_exp_range
- Loading branch information
Showing
635 changed files
with
24,798 additions
and
28,853 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- | ||
Pull requests should go to the development branch: | ||
https://github.com/IntelRealSense/librealsense/tree/development/ | ||
If this is still a work-in-progress, please open it as DRAFT. | ||
For further details, please see our contribution guidelines: | ||
https://github.com/IntelRealSense/librealsense/blob/master/CONTRIBUTING.md | ||
--> |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
pull_request: | ||
branches: ['**'] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
|
||
build_lrs_ros2_package: | ||
|
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,53 @@ | ||
# License: Apache 2.0. See LICENSE file in root directory. | ||
# Copyright(c) 2023 Intel Corporation. All Rights Reserved. | ||
cmake_minimum_required( VERSION 3.15 ) | ||
|
||
# | ||
# This tests whether we can link with realsense2-all and not have any missing external symbols. | ||
# Without realsense2-all, we'd need to link with: | ||
# realsense2 realsense-file rsutils | ||
# Or, if DDS was enabled: | ||
# realsense2 realsense-file rsutils fastcdr fastrtps foonathan_memory realdds | ||
# And the list gets longer if we add libraries. | ||
# | ||
# On Windows, no additional special libraries are needed. | ||
# On Linux, we have other dependencies: | ||
# libusb udev | ||
# These are not part of realsense2-all, even though we depend on them! | ||
# | ||
|
||
project( rs-all-client ) | ||
|
||
option( BUILD_SHARED_LIBS "Build using shared libraries" OFF ) | ||
|
||
if( WIN32 ) | ||
# Take away the other configurations because they'd require we picked another link | ||
# directory and target... keep it simple... | ||
set( CMAKE_CONFIGURATION_TYPES "Release" ) | ||
endif() | ||
|
||
add_executable( ${PROJECT_NAME} main.cpp ) | ||
set_target_properties( ${PROJECT_NAME} PROPERTIES | ||
CXX_STANDARD 14 | ||
MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug> # New in version 3.15; ignored in Linux | ||
) | ||
|
||
target_include_directories( ${PROJECT_NAME} PRIVATE | ||
../../../include | ||
../../../third-party/rsutils/include | ||
) | ||
target_link_directories( ${PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}/../Release ) | ||
|
||
target_link_libraries( ${PROJECT_NAME} PRIVATE realsense2-all ) | ||
|
||
if( NOT WIN32 ) | ||
find_library( LIBUSB NAMES usb-1.0 ) | ||
target_link_libraries( ${PROJECT_NAME} PRIVATE pthread ${LIBUSB} ) | ||
if( NOT FORCE_RSUSB_BACKEND ) | ||
target_link_libraries( ${PROJECT_NAME} PRIVATE udev ) | ||
endif() | ||
if( BUILD_WITH_DDS ) | ||
target_link_libraries( ${PROJECT_NAME} PRIVATE ssl crypto rt ) | ||
endif() | ||
endif() | ||
|
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,56 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2023 Intel Corporation. All Rights Reserved. | ||
|
||
#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API | ||
|
||
#include <rsutils/time/timer.h> | ||
#include <iostream> // for cout | ||
#include <chrono> | ||
#include <thread> | ||
|
||
int main(int argc, char * argv[]) try | ||
{ | ||
rs2::log_to_console( RS2_LOG_SEVERITY_DEBUG ); | ||
|
||
rs2::context context; | ||
auto devices = context.query_devices(); | ||
if( devices.size() ) | ||
{ | ||
// This can run under GHA, too -- so we don't always have devices | ||
// Run for just a little bit, count the frames | ||
size_t n_frames = 0; | ||
{ | ||
rs2::pipeline p( context ); | ||
auto profile = p.start(); | ||
auto device = profile.get_device(); | ||
std::cout << "Streaming on " << device.get_info( RS2_CAMERA_INFO_NAME ) << std::endl; | ||
|
||
rsutils::time::timer timer( std::chrono::seconds( 3 ) ); | ||
while( ! timer.has_expired() ) | ||
{ | ||
// Block program until frames arrive | ||
rs2::frameset frames = p.wait_for_frames(); | ||
++n_frames; | ||
} | ||
} | ||
|
||
std::cout << "Got " << n_frames << " frames" << std::endl; | ||
} | ||
else | ||
{ | ||
// Allow enough time for DDS enumeration | ||
std::this_thread::sleep_for( std::chrono::seconds( 3 ) ); | ||
} | ||
|
||
return EXIT_SUCCESS; | ||
} | ||
catch (const rs2::error & e) | ||
{ | ||
std::cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n " << e.what() << std::endl; | ||
return EXIT_FAILURE; | ||
} | ||
catch (const std::exception& e) | ||
{ | ||
std::cerr << e.what() << std::endl; | ||
return EXIT_FAILURE; | ||
} |
Oops, something went wrong.