From f26e59cc61c7866f3be26e19aafd9d50138326df Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Tue, 16 May 2023 11:21:00 +0300 Subject: [PATCH 01/19] trigger build From e04fc73cae0e1424d831af12643210992fb76b86 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Sun, 21 May 2023 14:02:06 +0300 Subject: [PATCH 02/19] DDS formats conversion at host, first working version --- src/dds/rs-dds-device-proxy.cpp | 48 ++++++ src/dds/rs-dds-internal-data.cpp | 267 +++++++++++++++++++++++++++++++ src/dds/rs-dds-internal-data.h | 21 +++ src/dds/rs-dds-sensor-proxy.cpp | 105 +++++++++++- src/dds/rs-dds-sensor-proxy.h | 15 +- src/dds/sid_index.h | 1 + src/software-device.h | 9 +- 7 files changed, 453 insertions(+), 13 deletions(-) create mode 100644 src/dds/rs-dds-internal-data.cpp create mode 100644 src/dds/rs-dds-internal-data.h diff --git a/src/dds/rs-dds-device-proxy.cpp b/src/dds/rs-dds-device-proxy.cpp index 34e4e8477e..853beb8e81 100644 --- a/src/dds/rs-dds-device-proxy.cpp +++ b/src/dds/rs-dds-device-proxy.cpp @@ -207,6 +207,54 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ { sensor_info.proxy->add_processing_block( filter_name ); } + + sensor_info.proxy->initialization_done( dev->device_info().product_id, dev->device_info().product_line ); + + // Set profile's ID and index based on the dds_stream. Connect the profile to the extrinsics graph. + // TODO - Need to override intrinsics function? + for( auto & profile : sensor_info.proxy->get_stream_profiles() ) + { + profile->set_unique_id( sidx.sid ); + profile->set_stream_index( sidx.index ); + _stream_name_to_profiles[stream->name()].push_back( profile ); // for extrinsics + + // Handle intrinsics + if( video_stream ) + { + auto vsp = std::dynamic_pointer_cast< video_stream_profile >( profile ); + auto & stream_intrinsics = video_stream->get_intrinsics(); + auto it = std::find_if( stream_intrinsics.begin(), + stream_intrinsics.end(), + [vsp]( const realdds::video_intrinsics & intr ) { + return vsp->get_width() == intr.width && vsp->get_height() == intr.height; + } ); + if( it != stream_intrinsics.end() ) // Some profiles don't have intrinsics + { + rs2_intrinsics intr; + intr.width = it->width; + intr.height = it->height; + intr.ppx = it->principal_point_x; + intr.ppy = it->principal_point_y; + intr.fx = it->focal_lenght_x; + intr.fy = it->focal_lenght_y; + intr.model = static_cast< rs2_distortion >( it->distortion_model ); + memcpy( intr.coeffs, it->distortion_coeffs.data(), sizeof( intr.coeffs ) ); + vsp->set_intrinsics( [intr]() { + return intr; + } ); + } + } + if( motion_stream ) + { + auto msp = std::dynamic_pointer_cast< motion_stream_profile >( profile ); + auto & stream_intrinsics = motion_stream->get_intrinsics(); + rs2_motion_device_intrinsic intr; + memcpy( intr.data, stream_intrinsics.data.data(), sizeof( intr.data ) ); + memcpy( intr.noise_variances, stream_intrinsics.noise_variances.data(), sizeof( intr.noise_variances ) ); + memcpy( intr.bias_variances, stream_intrinsics.bias_variances.data(), sizeof( intr.bias_variances ) ); + msp->set_intrinsics( [intr]() { return intr; } ); + } + } } ); // End foreach_stream lambda diff --git a/src/dds/rs-dds-internal-data.cpp b/src/dds/rs-dds-internal-data.cpp new file mode 100644 index 0000000000..92d3e03023 --- /dev/null +++ b/src/dds/rs-dds-internal-data.cpp @@ -0,0 +1,267 @@ +// License: Apache 2.0. See LICENSE file in root directory. +// Copyright(c) 2023 Intel Corporation. All Rights Reserved. + +#include "rs-dds-internal-data.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace librealsense { + +static const std::string RS405_PID = "0x0B5B"; +static const std::string RS415_PID = "0x0AD3"; +static const std::string RS435_RGB_PID = "0x0B07"; +static const std::string RS435I_PID = "0x0B3A"; +static const std::string RS455_PID = "0x0B5C"; +static const std::string RS457_PID = "0xABCD"; + + +std::vector< rs2_format > target_formats( rs2_format source_format ) +{ + // Mapping from source color format to all of the compatible target color formats. + std::vector< rs2_format > formats = { RS2_FORMAT_RGB8, RS2_FORMAT_RGBA8, RS2_FORMAT_BGR8, RS2_FORMAT_BGRA8 }; + + switch( source_format ) + { + case RS2_FORMAT_YUYV: + formats.push_back( RS2_FORMAT_YUYV ); + formats.push_back( RS2_FORMAT_Y16 ); + formats.push_back( RS2_FORMAT_Y8 ); + break; + case RS2_FORMAT_UYVY: + formats.push_back( RS2_FORMAT_UYVY ); + break; + default: + throw std::runtime_error( "Format is not supported for mapping" ); + } + + return formats; +} + +std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( std::string product_id, + std::string product_line ) +{ + std::vector tags; + + if( product_id == RS405_PID ) + { + tags.push_back( { RS2_STREAM_COLOR, -1, 848, 480, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, 848, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 848, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + } + else if( product_id == RS415_PID ) + { + tags.push_back( { RS2_STREAM_COLOR, -1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, 1280, 720, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 1280, 720, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + } + else if( product_id == RS435_RGB_PID ) + { + tags.push_back( { RS2_STREAM_COLOR, -1, 640, 480, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, 848, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 848, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + } + else if( product_id == RS435I_PID ) + { + tags.push_back( { RS2_STREAM_COLOR, -1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, 848, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 848, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + tags.push_back( { RS2_STREAM_GYRO, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 200, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_ACCEL, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 63, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_ACCEL, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 100, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + } + else if( product_id == RS455_PID ) + { + tags.push_back( { RS2_STREAM_COLOR, -1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, 848, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 848, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + tags.push_back( { RS2_STREAM_GYRO, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 200, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_ACCEL, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 63, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_ACCEL, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 100, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + } + else if( product_id == RS457_PID ) + { + tags.push_back( { RS2_STREAM_COLOR, -1, 640, 480, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + } + else if( product_line == "D400" ) + { + tags.push_back( { RS2_STREAM_DEPTH, -1, 1280, 720, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, 1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, 2, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + } + else if( product_line == "L500" ) + { + tags.push_back( { RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 640, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_CONFIDENCE, -1, 640, 480, RS2_FORMAT_RAW8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + tags.push_back( { RS2_STREAM_DEPTH, -1, -1, -1, RS2_FORMAT_FG, -1, profile_tag::PROFILE_TAG_DEBUG } ); + tags.push_back( { RS2_STREAM_COLOR, -1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_GYRO, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 200, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_ACCEL, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 200, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + } + else if( product_line == "SR300" ) + { + tags.push_back( { RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + tags.push_back( { RS2_STREAM_INFRARED, -1, 640, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); + tags.push_back( { RS2_STREAM_COLOR, -1, 1920, 1080, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); + } + else + throw std::runtime_error( "Unsupported product id or product line" ); + + return tags; +} + + +std::vector< processing_block_factory > dds_rs_internal_data::get_profile_converters( std::string product_id, + std::string product_line ) +{ + std::vector< processing_block_factory > factories; + std::vector< processing_block_factory > tmp; + + if( product_line == "D400" ) + { + if( product_id == RS457_PID ) + { + tmp = processing_block_factory::create_pbf_vector< uyvy_converter >( RS2_FORMAT_UYVY, + target_formats( RS2_FORMAT_UYVY ), + RS2_STREAM_COLOR ); + for( auto & it : tmp ) + factories.push_back( std::move( it ) ); + tmp = processing_block_factory::create_pbf_vector< uyvy_converter >( RS2_FORMAT_YUYV, + target_formats( RS2_FORMAT_YUYV ), + RS2_STREAM_COLOR ); + for( auto & it : tmp ) + factories.push_back( std::move( it ) ); + factories.push_back( { { { RS2_FORMAT_Y12I } }, + { { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 1 }, + { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 2 } }, + []() { return std::make_shared< y12i_to_y16y16_mipi >(); } } ); + } + else + { + tmp = processing_block_factory::create_pbf_vector< yuy2_converter >( + RS2_FORMAT_YUYV, + target_formats( RS2_FORMAT_YUYV ), + RS2_STREAM_COLOR ); + for( auto & it : tmp ) + factories.push_back( std::move( it ) ); + factories.push_back( processing_block_factory::create_id_pbf( RS2_FORMAT_RAW16, RS2_STREAM_COLOR ) ); + factories.push_back( { { { RS2_FORMAT_Y12I } }, + { { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 1 }, + { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 2 } }, + []() { return std::make_shared< y12i_to_y16y16 >(); } } ); + } + tmp = processing_block_factory::create_pbf_vector< uyvy_converter >( + RS2_FORMAT_UYVY, + target_formats( RS2_FORMAT_UYVY ), + RS2_STREAM_INFRARED ); + for( auto & it : tmp ) + factories.push_back( std::move( it ) ); + factories.push_back( processing_block_factory::create_id_pbf( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 ) ); + factories.push_back( processing_block_factory::create_id_pbf( RS2_FORMAT_Z16, RS2_STREAM_DEPTH ) ); + factories.push_back( { { { RS2_FORMAT_W10 } }, + { { RS2_FORMAT_RAW10, RS2_STREAM_INFRARED, 1 } }, + []() { return std::make_shared< w10_converter >( RS2_FORMAT_RAW10 ); } } ); + factories.push_back( { { { RS2_FORMAT_W10 } }, + { { RS2_FORMAT_Y10BPACK, RS2_STREAM_INFRARED, 1 } }, + []() { return std::make_shared< w10_converter >( RS2_FORMAT_Y10BPACK ); } } ); + factories.push_back( { { { RS2_FORMAT_Y8I } }, + { { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 }, + { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 2 } }, + []() { return std::make_shared< y8i_to_y8y8 >(); } } ); + + //factories.emplace( + // factories.end(), + // processing_block_factory( + // { { RS2_FORMAT_MOTION_XYZ32F } }, + // { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL }, { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, + // [&, mm_correct_opt]() + // { return std::make_shared< motion_to_accel_gyro >( _mm_calib, mm_correct_opt ); } ) ); + } + //else if( product_line == "L500" ) + //{ + // processing_block_factory::create_pbf_vector< yuy2_converter >( RS2_FORMAT_YUYV, map_supported_color_formats( RS2_FORMAT_YUYV ), RS2_STREAM_COLOR ); + // ( + // { {RS2_FORMAT_Z16}, {RS2_FORMAT_Y8} }, + // { {RS2_FORMAT_Z16, RS2_STREAM_DEPTH, 0, 0, 0, 0, &rotate_resolution} }, + // [=]() { + // auto z16rot = std::make_shared( RS2_FORMAT_Z16, RS2_STREAM_DEPTH, RS2_EXTENSION_DEPTH_FRAME ); + // auto y8rot = std::make_shared( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, RS2_EXTENSION_VIDEO_FRAME ); + // auto sync = std::make_shared( nullptr, false ); // disable logging on this internal syncer + + // auto cpb = std::make_shared(); + // cpb->add( z16rot ); + // cpb->add( y8rot ); + // cpb->add( sync ); + // cpb->add( std::make_shared< filtering_processing_block >( RS2_STREAM_DEPTH ) ); + // return cpb; + // } + // ); + // ( + // { {RS2_FORMAT_Z16}, {RS2_FORMAT_Y8}, {RS2_FORMAT_RAW8} }, + // { + // {RS2_FORMAT_Z16, RS2_STREAM_DEPTH, 0, 0, 0, 0, &rotate_resolution}, + // {RS2_FORMAT_RAW8, RS2_STREAM_CONFIDENCE, 0, 0, 0, 0, &l500_confidence_resolution} + // }, + // [=]() { + // auto z16rot = std::make_shared( RS2_FORMAT_Z16, RS2_STREAM_DEPTH, RS2_EXTENSION_DEPTH_FRAME ); + // auto y8rot = std::make_shared( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, RS2_EXTENSION_VIDEO_FRAME ); + // auto conf = std::make_shared(); + // auto sync = std::make_shared( nullptr, false ); // disable logging on this internal syncer + + // auto cpb = std::make_shared(); + // cpb->add( z16rot ); + // cpb->add( y8rot ); + // cpb->add( conf ); + // cpb->add( sync ); + // cpb->add( std::shared_ptr< filtering_processing_block >( + // new filtering_processing_block { RS2_STREAM_DEPTH, RS2_STREAM_CONFIDENCE } ) ); + // return cpb; + // } + // ); + // ( + // { {RS2_FORMAT_Y8} }, + // { {RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 0, 0, 0, 0, &rotate_resolution} }, + // []() { return std::make_shared( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, RS2_EXTENSION_VIDEO_FRAME ); } + // ); + // ( + // { {RS2_FORMAT_RAW8} }, + // { {RS2_FORMAT_RAW8, RS2_STREAM_CONFIDENCE, 0, 0, 0, 0, &l500_confidence_resolution} }, + // []() { return std::make_shared(); } + // ); + // ( processing_block_factory::create_id_pbf( RS2_FORMAT_FG, RS2_STREAM_DEPTH ) ); + // ( + // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL} }, + // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL} }, + // [&, mm_correct_opt]() { return std::make_shared( _mm_calib, mm_correct_opt ); } + // ); + // ( + // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO} }, + // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO} }, + // [&, mm_correct_opt]() { return std::make_shared( _mm_calib, mm_correct_opt ); } + // ); + //} + //else if( product_line == "SR300" ) + //{ + // processing_block_factory::create_pbf_vector( RS2_FORMAT_UYVY, map_supported_color_formats( RS2_FORMAT_UYVY ), RS2_STREAM_COLOR ); + // processing_block_factory::create_pbf_vector( RS2_FORMAT_YUYV, map_supported_color_formats( RS2_FORMAT_YUYV ), RS2_STREAM_COLOR ); + // ( { { RS2_FORMAT_INVI } }, { { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y8 ); } ); + // ( { { RS2_FORMAT_INVI } }, { { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y16 ); } ); + // ( { { RS2_FORMAT_INZI } }, { { RS2_FORMAT_Z16, RS2_STREAM_DEPTH }, { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y8 ); } ); + // ( { { RS2_FORMAT_INZI } }, { { RS2_FORMAT_Z16, RS2_STREAM_DEPTH }, { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y16 ); } ); + // processing_block_factory::create_id_pbf( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 ); + // processing_block_factory::create_id_pbf( RS2_FORMAT_Z16, RS2_STREAM_DEPTH ); + //} + else + throw std::runtime_error( "Unsupported product id or product line" ); + + return factories; +} + +} // namespace librealsense diff --git a/src/dds/rs-dds-internal-data.h b/src/dds/rs-dds-internal-data.h new file mode 100644 index 0000000000..cb81957977 --- /dev/null +++ b/src/dds/rs-dds-internal-data.h @@ -0,0 +1,21 @@ +// License: Apache 2.0. See LICENSE file in root directory. +// Copyright(c) 2023 Intel Corporation. All Rights Reserved. + +#pragma once + +#include +#include + + +namespace librealsense { + +class dds_rs_internal_data +{ +public: + static std::vector< tagged_profile > get_profiles_tags( std::string product_id, std::string product_line ); + static std::vector< processing_block_factory > get_profile_converters( std::string product_id, + std::string product_line ); +}; + + +} // namespace librealsense diff --git a/src/dds/rs-dds-sensor-proxy.cpp b/src/dds/rs-dds-sensor-proxy.cpp index e34f56f919..3a77537617 100644 --- a/src/dds/rs-dds-sensor-proxy.cpp +++ b/src/dds/rs-dds-sensor-proxy.cpp @@ -3,6 +3,7 @@ #include "rs-dds-sensor-proxy.h" #include "rs-dds-option.h" +#include "rs-dds-internal-data.h" #include #include @@ -60,6 +61,93 @@ void dds_sensor_proxy::add_dds_stream( sid_index sidx, std::shared_ptr< realdds: } +std::shared_ptr< stream_profile_interface > dds_sensor_proxy::add_video_stream( rs2_video_stream video_stream, + bool is_default ) +{ + auto profile = std::make_shared< video_stream_profile >( platform::stream_profile{ (uint32_t)video_stream.width, + (uint32_t)video_stream.height, + (uint32_t)video_stream.fps, + 0 } ); + profile->set_dims( video_stream.width, video_stream.height ); + profile->set_format( video_stream.fmt ); + profile->set_framerate( video_stream.fps ); + profile->set_stream_index( video_stream.index ); + profile->set_stream_type( video_stream.type ); + profile->set_unique_id( video_stream.uid ); + profile->set_intrinsics( [=]() { + return video_stream.intrinsics; + } ); + if( is_default ) + profile->tag_profile( profile_tag::PROFILE_TAG_DEFAULT ); + _raw_rs_profiles.push_back( profile ); + + return profile; +} + + +std::shared_ptr< stream_profile_interface > dds_sensor_proxy::add_motion_stream( rs2_motion_stream motion_stream, + bool is_default ) +{ + auto profile = std::make_shared< motion_stream_profile >( platform::stream_profile{ 0, + 0, + (uint32_t)motion_stream.fps, + 0 } ); + profile->set_format( motion_stream.fmt ); + profile->set_framerate( motion_stream.fps ); + profile->set_stream_index( motion_stream.index ); + profile->set_stream_type( motion_stream.type ); + profile->set_unique_id( motion_stream.uid ); + profile->set_intrinsics( [=]() { return motion_stream.intrinsics; } ); + if( is_default ) + profile->tag_profile( profile_tag::PROFILE_TAG_DEFAULT ); + _raw_rs_profiles.push_back( profile ); + + return profile; +} + + +void dds_sensor_proxy::initialization_done( std::string product_id, std::string product_line ) +{ + auto converters = dds_rs_internal_data::get_profile_converters( product_id, product_line ); + _formats_converter.register_converters( converters ); + _profiles = _formats_converter.get_all_possible_profiles( _raw_rs_profiles ); + + auto tags = dds_rs_internal_data::get_profiles_tags( product_id, product_line ); + for( auto & profile : _profiles ) + for( auto & tag : tags ) + if( ( tag.stream == RS2_STREAM_ANY || tag.stream == profile->get_stream_type() ) && + ( tag.format == RS2_FORMAT_ANY || tag.format == profile->get_format() ) && + ( tag.fps == -1 || tag.fps == profile->get_framerate() ) && + ( tag.stream_index == -1 || tag.stream_index == profile->get_stream_index() ) ) + { + if( auto vp = dynamic_cast< video_stream_profile_interface * >( profile.get() ) ) + { // For video the resolution should match as well + if( ( tag.width == -1 || tag.width == vp->get_width() ) && + ( tag.height == -1 || tag.height == vp->get_height() ) ) + profile->tag_profile( tag.tag ); + } + else + profile->tag_profile( tag.tag ); + } + + //// Add unique ID based on the dds_stream matching the profile. Connect the profile to the extrinsics graph. + //// TODO - Need to override intrinsics function? + //for( auto & profile : _profiles ) + // for( auto & stream : _streams ) + // { + // // Currently, stream names are based on profile type name and index + // std::string profile_type_str = get_string( profile->get_stream_type() ); + // std::string stream_name_substr = stream.second->name().substr( 0, profile_type_str.size() ); + // if( stream_name_substr == profile_type_str ) + // { + // profile->set_unique_id( stream.first.sid ); + // profile->set_stream_index( stream.first.index ); + // environment::get_instance().get_extrinsics_graph().register_same_extrinsics( *stream, *target ); + // } + // } +} + + std::shared_ptr< realdds::dds_video_stream_profile > dds_sensor_proxy::find_profile( sid_index sidx, realdds::dds_video_stream_profile const & profile ) const { @@ -111,14 +199,19 @@ dds_sensor_proxy::find_profile( sid_index sidx, realdds::dds_motion_stream_profi void dds_sensor_proxy::open( const stream_profiles & profiles ) { + _formats_converter.prepare_to_convert( profiles ); + + const auto & source_profiles = _formats_converter.get_active_source_profiles(); + // TODO - register processing block options? + realdds::dds_stream_profiles realdds_profiles; - for( size_t i = 0; i < profiles.size(); ++i ) + for( size_t i = 0; i < source_profiles.size(); ++i ) { - auto & sp = profiles[i]; + auto & sp = source_profiles[i]; sid_index sidx( sp->get_unique_id(), sp->get_stream_index() ); if( Is< video_stream_profile >( sp ) ) { - const auto && vsp = As< video_stream_profile >( profiles[i] ); + const auto && vsp = As< video_stream_profile >( source_profiles[i] ); auto video_profile = find_profile( sidx, realdds::dds_video_stream_profile( sp->get_framerate(), @@ -134,7 +227,7 @@ void dds_sensor_proxy::open( const stream_profiles & profiles ) { auto motion_profile = find_profile( sidx, - realdds::dds_motion_stream_profile( profiles[i]->get_framerate(), + realdds::dds_motion_stream_profile( source_profiles[i]->get_framerate(), realdds::dds_stream_format::from_rs2( sp->get_format() ) ) ); if( motion_profile ) realdds_profiles.push_back( motion_profile ); @@ -147,12 +240,12 @@ void dds_sensor_proxy::open( const stream_profiles & profiles ) } } - if( profiles.size() > 0 ) + if( source_profiles.size() > 0 ) { _dev->open( realdds_profiles ); } - software_sensor::open( profiles ); + software_sensor::open( source_profiles ); } diff --git a/src/dds/rs-dds-sensor-proxy.h b/src/dds/rs-dds-sensor-proxy.h index b688d6d489..c36874bee3 100644 --- a/src/dds/rs-dds-sensor-proxy.h +++ b/src/dds/rs-dds-sensor-proxy.h @@ -3,12 +3,13 @@ #pragma once + +#include "sid_index.h" #include +#include #include -#include "sid_index.h" - #include #include #include @@ -50,6 +51,11 @@ class dds_sensor_proxy : public software_sensor std::map< sid_index, std::shared_ptr< realdds::dds_stream > > _streams; std::map< std::string, streaming_impl > _streaming_by_name; + formats_converter _formats_converter; + // DDS profiles are stored in _streams, _source_rs_profiles stores librealsense representation of them, + // software_device::_profiles stores librealsense profiles after conversion + stream_profiles _raw_rs_profiles; + public: dds_sensor_proxy( std::string const & sensor_name, software_device * owner, @@ -58,6 +64,9 @@ class dds_sensor_proxy : public software_sensor const std::string & get_name() const { return _name; } void add_dds_stream( sid_index sidx, std::shared_ptr< realdds::dds_stream > const & stream ); + std::shared_ptr add_video_stream( rs2_video_stream video_stream, bool is_default ) override; + std::shared_ptr add_motion_stream( rs2_motion_stream motion_stream, bool is_default ) override; + void initialization_done( std::string product_id, std::string product_line ); // Not adding streams or profiles after this void open( const stream_profiles & profiles ) override; void start( frame_callback_ptr callback ) override; @@ -88,7 +97,7 @@ class dds_sensor_proxy : public software_sensor void add_frame_metadata( frame * const, nlohmann::json && metadata, streaming_impl & ); - friend class dds_device_proxy; // currently calls handle_new_metadata + friend class dds_device_proxy; // Currently calls handle_new_metadata }; diff --git a/src/dds/sid_index.h b/src/dds/sid_index.h index cd6c4d7105..0b50984fbb 100644 --- a/src/dds/sid_index.h +++ b/src/dds/sid_index.h @@ -3,6 +3,7 @@ #pragma once +#include namespace librealsense { diff --git a/src/software-device.h b/src/software-device.h index 409f0b2829..a09af6d484 100644 --- a/src/software-device.h +++ b/src/software-device.h @@ -96,9 +96,9 @@ namespace librealsense public: software_sensor(std::string name, software_device* owner); - std::shared_ptr add_video_stream(rs2_video_stream video_stream, bool is_default=false); - std::shared_ptr add_motion_stream(rs2_motion_stream motion_stream, bool is_default = false); - std::shared_ptr add_pose_stream(rs2_pose_stream pose_stream, bool is_default = false); + virtual std::shared_ptr add_video_stream(rs2_video_stream video_stream, bool is_default = false); + virtual std::shared_ptr add_motion_stream(rs2_motion_stream motion_stream, bool is_default = false); + virtual std::shared_ptr add_pose_stream(rs2_pose_stream pose_stream, bool is_default = false); bool extend_to(rs2_extension extension_type, void** ptr) override; @@ -134,9 +134,10 @@ namespace librealsense software_recommended_proccesing_blocks & get_software_recommended_proccesing_blocks() { return _pbs; } + stream_profiles _profiles; + private: friend class software_device; - stream_profiles _profiles; uint64_t _unique_id; class stereo_extension : public depth_stereo_sensor From d295f39e44f4b74e78cfc4a73cfe0606b7577f86 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Sun, 28 May 2023 12:01:20 +0300 Subject: [PATCH 03/19] Activated conversion in start. Handling multiple streams per sensor and motion. Some unit tests fail --- src/dds/rs-dds-device-proxy.cpp | 121 +++++++++++++++++-------------- src/dds/rs-dds-internal-data.cpp | 26 +++---- src/dds/rs-dds-sensor-proxy.cpp | 33 ++++----- src/dds/rs-dds-sensor-proxy.h | 2 + src/dds/sid_index.h | 2 +- src/proc/formats-converter.cpp | 10 ++- 6 files changed, 106 insertions(+), 88 deletions(-) diff --git a/src/dds/rs-dds-device-proxy.cpp b/src/dds/rs-dds-device-proxy.cpp index 853beb8e81..eba5c17e10 100644 --- a/src/dds/rs-dds-device-proxy.cpp +++ b/src/dds/rs-dds-device-proxy.cpp @@ -136,17 +136,8 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ int sensor_index = 0; }; std::map< std::string, sensor_info > sensor_name_to_info; - // We assign (sid,index) based on the stream type: - // LibRS assigns streams names based on the type followed by an index if it's not 0. - // I.e., sid is based on the type, and index is 0 unless there's more than 1 in which case it's 1-based. - int counts[RS2_STREAM_COUNT] = { 0 }; - // Count how many streams per type - _dds_dev->foreach_stream( [&]( std::shared_ptr< realdds::dds_stream > const & stream ) - { ++counts[to_rs2_stream_type( stream->type_string() )]; } ); - // Anything that's more than 1 stream starts the count at 1, otherwise 0 - for( int & count : counts ) - count = ( count > 1 ) ? 1 : 0; - // Now we can finally assign (sid,index): + std::map< sid_index, sid_index > type_and_index_to_dds_stream_sidx; + _dds_dev->foreach_stream( [&]( std::shared_ptr< realdds::dds_stream > const & stream ) { @@ -160,11 +151,20 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ _software_sensors.push_back( sensor_info.proxy ); } auto stream_type = to_rs2_stream_type( stream->type_string() ); - sid_index sidx( stream_type, counts[stream_type]++ ); + int index = 0; + auto delimiter_pos = stream->name().find( '_' ); + if( delimiter_pos != std::string::npos ) + { + std::string index_as_string = stream->name().substr( delimiter_pos + 1, stream->name().size() ); + index = std::stoi( index_as_string ); + } + sid_index sidx( environment::get_instance().generate_stream_id(), index); + sid_index type_and_index( stream_type, index ); _stream_name_to_librs_stream[stream->name()] = std::make_shared< librealsense::stream >( stream_type, sidx.index ); sensor_info.proxy->add_dds_stream( sidx, stream ); _stream_name_to_owning_sensor[stream->name()] = sensor_info.proxy; + type_and_index_to_dds_stream_sidx.insert( { type_and_index, sidx } ); LOG_DEBUG( sidx.to_string() << " " << stream->sensor_name() << " : " << stream->name() ); software_sensor & sensor = get_software_sensor( sensor_info.sensor_index ); @@ -207,56 +207,67 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ { sensor_info.proxy->add_processing_block( filter_name ); } + } ); // End foreach_stream lambda - sensor_info.proxy->initialization_done( dev->device_info().product_id, dev->device_info().product_line ); + for( auto & sensor_info : sensor_name_to_info ) + { + sensor_info.second.proxy->initialization_done( dev->device_info().product_id, dev->device_info().product_line ); - // Set profile's ID and index based on the dds_stream. Connect the profile to the extrinsics graph. - // TODO - Need to override intrinsics function? - for( auto & profile : sensor_info.proxy->get_stream_profiles() ) + // Set profile's ID based on the dds_stream's ID (index already set). Connect the profile to the extrinsics graph. + for( auto & profile : sensor_info.second.proxy->get_stream_profiles() ) + { + sid_index type_and_index( profile->get_stream_type(), profile->get_stream_index()); + + auto & streams = sensor_info.second.proxy->streams(); + + sid_index sidx = type_and_index_to_dds_stream_sidx[type_and_index]; + auto stream_iter = streams.find( sidx ); + if( stream_iter == streams.end() ) + continue; + + profile->set_unique_id( stream_iter->first.sid ); + _stream_name_to_profiles[stream_iter->second->name()].push_back( profile ); // for extrinsics + + // Handle intrinsics + auto video_stream = std::dynamic_pointer_cast< realdds::dds_video_stream >( stream_iter->second ); + auto motion_stream = std::dynamic_pointer_cast< realdds::dds_motion_stream >( stream_iter->second ); + if( video_stream ) { - profile->set_unique_id( sidx.sid ); - profile->set_stream_index( sidx.index ); - _stream_name_to_profiles[stream->name()].push_back( profile ); // for extrinsics - - // Handle intrinsics - if( video_stream ) + auto vsp = std::dynamic_pointer_cast< video_stream_profile >( profile ); + auto & stream_intrinsics = video_stream->get_intrinsics(); + auto it = std::find_if( stream_intrinsics.begin(), + stream_intrinsics.end(), + [vsp]( const realdds::video_intrinsics & intr ) { + return vsp->get_width() == intr.width && vsp->get_height() == intr.height; + } ); + if( it != stream_intrinsics.end() ) // Some profiles don't have intrinsics { - auto vsp = std::dynamic_pointer_cast< video_stream_profile >( profile ); - auto & stream_intrinsics = video_stream->get_intrinsics(); - auto it = std::find_if( stream_intrinsics.begin(), - stream_intrinsics.end(), - [vsp]( const realdds::video_intrinsics & intr ) { - return vsp->get_width() == intr.width && vsp->get_height() == intr.height; - } ); - if( it != stream_intrinsics.end() ) // Some profiles don't have intrinsics - { - rs2_intrinsics intr; - intr.width = it->width; - intr.height = it->height; - intr.ppx = it->principal_point_x; - intr.ppy = it->principal_point_y; - intr.fx = it->focal_lenght_x; - intr.fy = it->focal_lenght_y; - intr.model = static_cast< rs2_distortion >( it->distortion_model ); - memcpy( intr.coeffs, it->distortion_coeffs.data(), sizeof( intr.coeffs ) ); - vsp->set_intrinsics( [intr]() { - return intr; + rs2_intrinsics intr; + intr.width = it->width; + intr.height = it->height; + intr.ppx = it->principal_point_x; + intr.ppy = it->principal_point_y; + intr.fx = it->focal_lenght_x; + intr.fy = it->focal_lenght_y; + intr.model = static_cast< rs2_distortion >( it->distortion_model ); + memcpy( intr.coeffs, it->distortion_coeffs.data(), sizeof( intr.coeffs ) ); + vsp->set_intrinsics( [intr]() { + return intr; } ); - } - } - if( motion_stream ) - { - auto msp = std::dynamic_pointer_cast< motion_stream_profile >( profile ); - auto & stream_intrinsics = motion_stream->get_intrinsics(); - rs2_motion_device_intrinsic intr; - memcpy( intr.data, stream_intrinsics.data.data(), sizeof( intr.data ) ); - memcpy( intr.noise_variances, stream_intrinsics.noise_variances.data(), sizeof( intr.noise_variances ) ); - memcpy( intr.bias_variances, stream_intrinsics.bias_variances.data(), sizeof( intr.bias_variances ) ); - msp->set_intrinsics( [intr]() { return intr; } ); } } - } ); // End foreach_stream lambda - + if( motion_stream ) + { + auto msp = std::dynamic_pointer_cast< motion_stream_profile >( profile ); + auto & stream_intrinsics = motion_stream->get_intrinsics(); + rs2_motion_device_intrinsic intr; + memcpy( intr.data, stream_intrinsics.data.data(), sizeof( intr.data ) ); + memcpy( intr.noise_variances, stream_intrinsics.noise_variances.data(), sizeof( intr.noise_variances ) ); + memcpy( intr.bias_variances, stream_intrinsics.bias_variances.data(), sizeof( intr.bias_variances ) ); + msp->set_intrinsics( [intr]() { return intr; } ); + } + } + } if( _dds_dev->supports_metadata() ) { diff --git a/src/dds/rs-dds-internal-data.cpp b/src/dds/rs-dds-internal-data.cpp index 92d3e03023..52c640b89f 100644 --- a/src/dds/rs-dds-internal-data.cpp +++ b/src/dds/rs-dds-internal-data.cpp @@ -13,12 +13,12 @@ namespace librealsense { -static const std::string RS405_PID = "0x0B5B"; -static const std::string RS415_PID = "0x0AD3"; -static const std::string RS435_RGB_PID = "0x0B07"; -static const std::string RS435I_PID = "0x0B3A"; -static const std::string RS455_PID = "0x0B5C"; -static const std::string RS457_PID = "0xABCD"; +static const std::string RS405_PID = "0B5B"; +static const std::string RS415_PID = "0AD3"; +static const std::string RS435_RGB_PID = "0B07"; +static const std::string RS435I_PID = "0B3A"; +static const std::string RS455_PID = "0B5C"; +static const std::string RS457_PID = "ABCD"; std::vector< rs2_format > target_formats( rs2_format source_format ) @@ -176,13 +176,13 @@ std::vector< processing_block_factory > dds_rs_internal_data::get_profile_conver { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 2 } }, []() { return std::make_shared< y8i_to_y8y8 >(); } } ); - //factories.emplace( - // factories.end(), - // processing_block_factory( - // { { RS2_FORMAT_MOTION_XYZ32F } }, - // { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL }, { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, - // [&, mm_correct_opt]() - // { return std::make_shared< motion_to_accel_gyro >( _mm_calib, mm_correct_opt ); } ) ); + // Motion convertion is done on the camera side. + // Intrinsics table is being read from the camera flash and it is too much to set here, this file is ment as a + // temporary solution, the camera should send all this data in a designated topic. + factories.push_back( { { { RS2_FORMAT_MOTION_XYZ32F } }, + { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL }, + { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, + []() { return std::make_shared< identity_processing_block >(); } } ); } //else if( product_line == "L500" ) //{ diff --git a/src/dds/rs-dds-sensor-proxy.cpp b/src/dds/rs-dds-sensor-proxy.cpp index 3a77537617..038d27069a 100644 --- a/src/dds/rs-dds-sensor-proxy.cpp +++ b/src/dds/rs-dds-sensor-proxy.cpp @@ -129,22 +129,6 @@ void dds_sensor_proxy::initialization_done( std::string product_id, std::string else profile->tag_profile( tag.tag ); } - - //// Add unique ID based on the dds_stream matching the profile. Connect the profile to the extrinsics graph. - //// TODO - Need to override intrinsics function? - //for( auto & profile : _profiles ) - // for( auto & stream : _streams ) - // { - // // Currently, stream names are based on profile type name and index - // std::string profile_type_str = get_string( profile->get_stream_type() ); - // std::string stream_name_substr = stream.second->name().substr( 0, profile_type_str.size() ); - // if( stream_name_substr == profile_type_str ) - // { - // profile->set_unique_id( stream.first.sid ); - // profile->set_stream_index( stream.first.index ); - // environment::get_instance().get_extrinsics_graph().register_same_extrinsics( *stream, *target ); - // } - // } } @@ -396,6 +380,16 @@ void dds_sensor_proxy::add_frame_metadata( frame * const f, nlohmann::json && dd } +template +frame_callback_ptr make_callback( T callback ) +{ + return { + new internal_frame_callback( callback ), + []( rs2_frame_callback * p ) { p->release(); } + }; +} + + void dds_sensor_proxy::start( frame_callback_ptr callback ) { for( auto & profile : sensor_base::get_active_streams() ) @@ -439,7 +433,12 @@ void dds_sensor_proxy::start( frame_callback_ptr callback ) dds_stream->start_streaming(); } - software_sensor::start( callback ); + _formats_converter.set_frames_callback( callback ); + const auto && process_cb = make_callback( [&, this]( frame_holder f ) { + _formats_converter.convert_frame( f ); + } ); + + software_sensor::start( process_cb ); } diff --git a/src/dds/rs-dds-sensor-proxy.h b/src/dds/rs-dds-sensor-proxy.h index c36874bee3..f6f19a7aa3 100644 --- a/src/dds/rs-dds-sensor-proxy.h +++ b/src/dds/rs-dds-sensor-proxy.h @@ -80,6 +80,8 @@ class dds_sensor_proxy : public software_sensor bool processing_block_exists( processing_blocks const & blocks, std::string const & block_name ) const; void create_processing_block( std::string & filter_name ); + const std::map< sid_index, std::shared_ptr< realdds::dds_stream > > & streams() const { return _streams; } + private: std::shared_ptr< realdds::dds_video_stream_profile > find_profile( sid_index sidx, realdds::dds_video_stream_profile const & profile ) const; diff --git a/src/dds/sid_index.h b/src/dds/sid_index.h index 0b50984fbb..82ad5ac4fd 100644 --- a/src/dds/sid_index.h +++ b/src/dds/sid_index.h @@ -10,7 +10,7 @@ namespace librealsense { struct sid_index { - int sid; // Stream ID; assigned based on the stream TYPE, really + int sid; // Stream ID; assigned based on an atomic counter int index; // Used to distinguish similar streams like IR L / R, 0 otherwise sid_index( int sid_, int index_ ) diff --git a/src/proc/formats-converter.cpp b/src/proc/formats-converter.cpp index dac63073aa..c991d66a93 100644 --- a/src/proc/formats-converter.cpp +++ b/src/proc/formats-converter.cpp @@ -70,7 +70,7 @@ stream_profiles formats_converter::get_all_possible_profiles( const stream_profi // Cache mapping of each target profile to profiles it is converting from. _target_profiles_to_raw_profiles[target].push_back( raw_profile ); - // TODO - Duplicates in the list happen when 2 from_profiles have conversion to same target. + // TODO - Duplicates in the list happen when 2 raw_profiles have conversion to same target. // In this case it is faster to check if( _target_to_source_profiles_map[target].size() > 1 ) // rather then if( is_profile_in_list( cloned_profile, to_profiles ) ), but L500 unit-tests // fail if we change. Need to understand difference @@ -173,7 +173,7 @@ void formats_converter::prepare_to_convert( stream_profiles from_profiles ) } // Retrieve source profile from cached map and generate the relevant processing block. - std::unordered_set> current_resolved_reqs; + std::unordered_set< std::shared_ptr< stream_profile_interface > > current_resolved_reqs; auto best_pb = factory_of_best_match->generate(); for( const auto & from_profile : from_profiles_of_best_match ) { @@ -183,6 +183,12 @@ void formats_converter::prepare_to_convert( stream_profiles from_profiles ) { if( factory_of_best_match->has_source( raw_profile ) ) { + // When using DDS the server may split one stream of data into multiple dds_streams, e.g. Y8I + // infrared data. When grouping these dds_streams under one sensor we get multiple instances of the + // same profile, but the server should only open one to streaming + if( is_profile_in_list( raw_profile, { current_resolved_reqs.begin(), current_resolved_reqs.end() } ) ) + continue; + current_resolved_reqs.insert( raw_profile ); // Caching converters to invoke appropriate converters for received frames From 43395e6cb5079247d6482bc134a91a530d7a68fa Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Sun, 28 May 2023 12:44:17 +0300 Subject: [PATCH 04/19] CLEANer code (extracted to functions) --- src/dds/rs-dds-device-proxy.cpp | 119 ++++++++++++++++++++------------ src/dds/rs-dds-device-proxy.h | 11 +++ src/dds/rs-dds-sensor-proxy.cpp | 6 ++ src/dds/rs-dds-sensor-proxy.h | 2 + 4 files changed, 92 insertions(+), 46 deletions(-) diff --git a/src/dds/rs-dds-device-proxy.cpp b/src/dds/rs-dds-device-proxy.cpp index eba5c17e10..b3cfd72462 100644 --- a/src/dds/rs-dds-device-proxy.cpp +++ b/src/dds/rs-dds-device-proxy.cpp @@ -151,13 +151,7 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ _software_sensors.push_back( sensor_info.proxy ); } auto stream_type = to_rs2_stream_type( stream->type_string() ); - int index = 0; - auto delimiter_pos = stream->name().find( '_' ); - if( delimiter_pos != std::string::npos ) - { - std::string index_as_string = stream->name().substr( delimiter_pos + 1, stream->name().size() ); - index = std::stoi( index_as_string ); - } + int index = get_index_from_stream_name( stream->name() ); sid_index sidx( environment::get_instance().generate_stream_id(), index); sid_index type_and_index( stream_type, index ); _stream_name_to_librs_stream[stream->name()] @@ -226,46 +220,9 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ continue; profile->set_unique_id( stream_iter->first.sid ); - _stream_name_to_profiles[stream_iter->second->name()].push_back( profile ); // for extrinsics + set_profile_intrinsics( profile, stream_iter->second ); - // Handle intrinsics - auto video_stream = std::dynamic_pointer_cast< realdds::dds_video_stream >( stream_iter->second ); - auto motion_stream = std::dynamic_pointer_cast< realdds::dds_motion_stream >( stream_iter->second ); - if( video_stream ) - { - auto vsp = std::dynamic_pointer_cast< video_stream_profile >( profile ); - auto & stream_intrinsics = video_stream->get_intrinsics(); - auto it = std::find_if( stream_intrinsics.begin(), - stream_intrinsics.end(), - [vsp]( const realdds::video_intrinsics & intr ) { - return vsp->get_width() == intr.width && vsp->get_height() == intr.height; - } ); - if( it != stream_intrinsics.end() ) // Some profiles don't have intrinsics - { - rs2_intrinsics intr; - intr.width = it->width; - intr.height = it->height; - intr.ppx = it->principal_point_x; - intr.ppy = it->principal_point_y; - intr.fx = it->focal_lenght_x; - intr.fy = it->focal_lenght_y; - intr.model = static_cast< rs2_distortion >( it->distortion_model ); - memcpy( intr.coeffs, it->distortion_coeffs.data(), sizeof( intr.coeffs ) ); - vsp->set_intrinsics( [intr]() { - return intr; - } ); - } - } - if( motion_stream ) - { - auto msp = std::dynamic_pointer_cast< motion_stream_profile >( profile ); - auto & stream_intrinsics = motion_stream->get_intrinsics(); - rs2_motion_device_intrinsic intr; - memcpy( intr.data, stream_intrinsics.data.data(), sizeof( intr.data ) ); - memcpy( intr.noise_variances, stream_intrinsics.noise_variances.data(), sizeof( intr.noise_variances ) ); - memcpy( intr.bias_variances, stream_intrinsics.bias_variances.data(), sizeof( intr.bias_variances ) ); - msp->set_intrinsics( [intr]() { return intr; } ); - } + _stream_name_to_profiles[stream_iter->second->name()].push_back( profile ); // For extrinsics } } @@ -320,6 +277,76 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ } +int dds_device_proxy::get_index_from_stream_name( const std::string & name ) const +{ + int index = 0; + + auto delimiter_pos = name.find( '_' ); + if( delimiter_pos != std::string::npos ) + { + std::string index_as_string = name.substr( delimiter_pos + 1, name.size() ); + index = std::stoi( index_as_string ); + } + + return index; +} + + +void dds_device_proxy::set_profile_intrinsics( std::shared_ptr< stream_profile_interface > & profile, + const std::shared_ptr< realdds::dds_stream > & stream ) const +{ + auto video_stream = std::dynamic_pointer_cast< realdds::dds_video_stream >( stream ); + auto motion_stream = std::dynamic_pointer_cast< realdds::dds_motion_stream >( stream ); + if( video_stream ) + { + set_video_profile_intrinsics( profile, video_stream ); + } + if( motion_stream ) + { + set_motion_profile_intrinsics( profile, motion_stream ); + } +} + + +void dds_device_proxy::set_video_profile_intrinsics( std::shared_ptr< stream_profile_interface > profile, + std::shared_ptr< realdds::dds_video_stream > stream ) const +{ + auto vsp = std::dynamic_pointer_cast< video_stream_profile >( profile ); + auto & stream_intrinsics = stream->get_intrinsics(); + auto it = std::find_if( stream_intrinsics.begin(), + stream_intrinsics.end(), + [vsp]( const realdds::video_intrinsics & intr ) + { return vsp->get_width() == intr.width && vsp->get_height() == intr.height; } ); + + if( it != stream_intrinsics.end() ) // Some profiles don't have intrinsics + { + rs2_intrinsics intr; + intr.width = it->width; + intr.height = it->height; + intr.ppx = it->principal_point_x; + intr.ppy = it->principal_point_y; + intr.fx = it->focal_lenght_x; + intr.fy = it->focal_lenght_y; + intr.model = static_cast< rs2_distortion >( it->distortion_model ); + memcpy( intr.coeffs, it->distortion_coeffs.data(), sizeof( intr.coeffs ) ); + vsp->set_intrinsics( [intr]() { return intr; } ); + } +} + + +void dds_device_proxy::set_motion_profile_intrinsics( std::shared_ptr< stream_profile_interface > profile, + std::shared_ptr< realdds::dds_motion_stream > stream ) const +{ + auto msp = std::dynamic_pointer_cast< motion_stream_profile >( profile ); + auto & stream_intrinsics = stream->get_intrinsics(); + rs2_motion_device_intrinsic intr; + memcpy( intr.data, stream_intrinsics.data.data(), sizeof( intr.data ) ); + memcpy( intr.noise_variances, stream_intrinsics.noise_variances.data(), sizeof( intr.noise_variances ) ); + memcpy( intr.bias_variances, stream_intrinsics.bias_variances.data(), sizeof( intr.bias_variances ) ); + msp->set_intrinsics( [intr]() { return intr; } ); +} + + std::shared_ptr< dds_sensor_proxy > dds_device_proxy::create_sensor( const std::string & sensor_name ) { if( sensor_name.compare( "RGB Camera" ) == 0 ) diff --git a/src/dds/rs-dds-device-proxy.h b/src/dds/rs-dds-device-proxy.h index a6e7b2cd27..3505f6b3b8 100644 --- a/src/dds/rs-dds-device-proxy.h +++ b/src/dds/rs-dds-device-proxy.h @@ -12,6 +12,9 @@ namespace realdds { class dds_device; +class dds_stream; +class dds_video_stream; +class dds_motion_stream; } // namespace realdds @@ -37,6 +40,14 @@ class dds_device_proxy : public software_device std::map< std::string, std::shared_ptr< librealsense::stream > > _stream_name_to_librs_stream; std::map< std::string, std::shared_ptr< dds_sensor_proxy > > _stream_name_to_owning_sensor; + int get_index_from_stream_name( const std::string & name ) const; + void set_profile_intrinsics( std::shared_ptr< stream_profile_interface > & profile, + const std::shared_ptr< realdds::dds_stream > & stream ) const; + void set_video_profile_intrinsics( std::shared_ptr< stream_profile_interface > profile, + std::shared_ptr< realdds::dds_video_stream > stream ) const; + void set_motion_profile_intrinsics( std::shared_ptr< stream_profile_interface > profile, + std::shared_ptr< realdds::dds_motion_stream > stream ) const; + public: dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ptr< realdds::dds_device > const & dev ); diff --git a/src/dds/rs-dds-sensor-proxy.cpp b/src/dds/rs-dds-sensor-proxy.cpp index 038d27069a..473b83c1a4 100644 --- a/src/dds/rs-dds-sensor-proxy.cpp +++ b/src/dds/rs-dds-sensor-proxy.cpp @@ -113,6 +113,12 @@ void dds_sensor_proxy::initialization_done( std::string product_id, std::string _profiles = _formats_converter.get_all_possible_profiles( _raw_rs_profiles ); auto tags = dds_rs_internal_data::get_profiles_tags( product_id, product_line ); + tag_profiles( tags ); +} + + +void dds_sensor_proxy::tag_profiles( const std::vector & tags ) +{ for( auto & profile : _profiles ) for( auto & tag : tags ) if( ( tag.stream == RS2_STREAM_ANY || tag.stream == profile->get_stream_type() ) && diff --git a/src/dds/rs-dds-sensor-proxy.h b/src/dds/rs-dds-sensor-proxy.h index f6f19a7aa3..91f4ea6956 100644 --- a/src/dds/rs-dds-sensor-proxy.h +++ b/src/dds/rs-dds-sensor-proxy.h @@ -83,6 +83,8 @@ class dds_sensor_proxy : public software_sensor const std::map< sid_index, std::shared_ptr< realdds::dds_stream > > & streams() const { return _streams; } private: + void tag_profiles( const std::vector & tags ); + std::shared_ptr< realdds::dds_video_stream_profile > find_profile( sid_index sidx, realdds::dds_video_stream_profile const & profile ) const; From 8387927a5feb4875837d4065c82d2fd787125a03 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Sun, 28 May 2023 16:32:28 +0300 Subject: [PATCH 05/19] Fix test-dds-librs-device-properties --- src/dds/rs-dds-internal-data.cpp | 15 +- unit-tests/dds/d405.py | 568 ++++++++-------- unit-tests/dds/d435i.py | 392 +++++------ unit-tests/dds/d455.py | 616 +++++++++--------- .../dds/test-librs-device-properties.py | 15 +- 5 files changed, 804 insertions(+), 802 deletions(-) diff --git a/src/dds/rs-dds-internal-data.cpp b/src/dds/rs-dds-internal-data.cpp index 52c640b89f..09ac156830 100644 --- a/src/dds/rs-dds-internal-data.cpp +++ b/src/dds/rs-dds-internal-data.cpp @@ -145,10 +145,9 @@ std::vector< processing_block_factory > dds_rs_internal_data::get_profile_conver } else { - tmp = processing_block_factory::create_pbf_vector< yuy2_converter >( - RS2_FORMAT_YUYV, - target_formats( RS2_FORMAT_YUYV ), - RS2_STREAM_COLOR ); + tmp = processing_block_factory::create_pbf_vector< yuy2_converter >( RS2_FORMAT_YUYV, + target_formats( RS2_FORMAT_YUYV ), + RS2_STREAM_COLOR ); for( auto & it : tmp ) factories.push_back( std::move( it ) ); factories.push_back( processing_block_factory::create_id_pbf( RS2_FORMAT_RAW16, RS2_STREAM_COLOR ) ); @@ -179,9 +178,11 @@ std::vector< processing_block_factory > dds_rs_internal_data::get_profile_conver // Motion convertion is done on the camera side. // Intrinsics table is being read from the camera flash and it is too much to set here, this file is ment as a // temporary solution, the camera should send all this data in a designated topic. - factories.push_back( { { { RS2_FORMAT_MOTION_XYZ32F } }, - { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL }, - { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, + factories.push_back( { { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL } }, + { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL } }, + []() { return std::make_shared< identity_processing_block >(); } } ); + factories.push_back( { { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, + { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, []() { return std::make_shared< identity_processing_block >(); } } ); } //else if( product_line == "L500" ) diff --git a/unit-tests/dds/d405.py b/unit-tests/dds/d405.py index cc28324757..a43820678f 100644 --- a/unit-tests/dds/d405.py +++ b/unit-tests/dds/d405.py @@ -38,145 +38,146 @@ def colored_infrared_stream(): def colored_infrared_stream_profiles(): return [ dds.video_stream_profile( 30, dds.stream_format("UYVY"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), dds.video_stream_profile( 5, dds.stream_format("UYVY"), 1280, 720 ), - dds.video_stream_profile( 5, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 5, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 5, dds.stream_format("RGB2"), 1280, 720 ), - dds.video_stream_profile( 5, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 5, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 5, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 5, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 5, dds.stream_format("rgb8"), 1280, 720 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 5, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 5, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 5, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 5, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 5, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 5, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 5, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 5, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 5, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 5, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 5, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 5, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 5, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 5, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 5, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 5, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 5, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 5, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 5, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 5, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 5, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 5, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 5, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 5, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 5, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 5, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 5, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 5, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 5, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 5, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 5, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 5, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 5, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 5, dds.stream_format("rgb8"), 424, 240 ) + # dds.video_stream_profile( 5, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 5, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 5, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 5, dds.stream_format("rgb8"), 424, 240 ), + dds.video_stream_profile( 5, dds.stream_format("UYVY"), 256, 144 ) ] @@ -224,36 +225,37 @@ def depth_stream(): def ir_stream_profiles(): return [ - dds.video_stream_profile( 25, dds.stream_format("Y16"), 1288, 808 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1288, 808 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 1280, 720 ), - dds.video_stream_profile( 5, dds.stream_format("mono8"), 1280, 720 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 5, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 5, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 5, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 5, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 5, dds.stream_format("mono8"), 424, 240 ) + dds.video_stream_profile( 25, dds.stream_format("Y12I"), 1288, 808 ), + dds.video_stream_profile( 15, dds.stream_format("Y12I"), 1288, 808 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 1280, 720 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 1280, 720 ), + dds.video_stream_profile( 5, dds.stream_format("Y8I"), 1280, 720 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 5, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 5, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 5, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 5, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 5, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 5, dds.stream_format("mono8"), 256, 148 ) ] @@ -267,180 +269,180 @@ def ir_stream( number ): def color_stream_profiles(): return [ - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 424, 240 ) ] def color_stream(): stream = dds.color_stream_server( "Color", "Stereo Module" ) - stream.init_profiles( color_stream_profiles(), 30 ) + stream.init_profiles( color_stream_profiles(), 5 ) stream.init_options( stereo_module_options() ) stream.set_intrinsics( color_stream_intrinsics() ) return stream diff --git a/unit-tests/dds/d435i.py b/unit-tests/dds/d435i.py index fb9843f2ee..e6dbb3e255 100644 --- a/unit-tests/dds/d435i.py +++ b/unit-tests/dds/d435i.py @@ -123,42 +123,42 @@ def depth_stream(): def ir_stream_profiles(): return [ - dds.video_stream_profile( 30, dds.stream_format("mono8"), 1280,800 ), - dds.video_stream_profile( 25, dds.stream_format("Y16"), 1280,800 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280,800 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 1280,800 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 1280,720 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 1280,720 ), - dds.video_stream_profile( 6, dds.stream_format("mono8"), 1280,720 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 848,480 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 848,480 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 848,480 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 848,480 ), - dds.video_stream_profile( 6, dds.stream_format("mono8"), 848,480 ), - dds.video_stream_profile( 300, dds.stream_format("mono8"), 848,100 ), - dds.video_stream_profile( 100, dds.stream_format("mono8"), 848,100 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 640,480 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 640,480 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 640,480 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 640,480 ), - dds.video_stream_profile( 6, dds.stream_format("mono8"), 640,480 ), - dds.video_stream_profile( 25, dds.stream_format("Y16"), 640,400 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640,400 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 640,360 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 640,360 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 640,360 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 640,360 ), - dds.video_stream_profile( 6, dds.stream_format("mono8"), 640,360 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 480,270 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 480,270 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 480,270 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 480,270 ), - dds.video_stream_profile( 6, dds.stream_format("mono8"), 480,270 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 424,240 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 424,240 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 424,240 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 424,240 ), - dds.video_stream_profile( 6, dds.stream_format("mono8"), 424,240 ) + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 1280,800 ), + dds.video_stream_profile( 25, dds.stream_format("Y12I"), 1280,800 ), + dds.video_stream_profile( 15, dds.stream_format("Y12I"), 1280,800 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 1280,800 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 1280,720 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 1280,720 ), + dds.video_stream_profile( 6, dds.stream_format("Y8I"), 1280,720 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 848,480 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 848,480 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 848,480 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 848,480 ), + dds.video_stream_profile( 6, dds.stream_format("Y8I"), 848,480 ), + dds.video_stream_profile( 300, dds.stream_format("Y8I"), 848,100 ), + dds.video_stream_profile( 100, dds.stream_format("Y8I"), 848,100 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 640,480 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 640,480 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 640,480 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 640,480 ), + dds.video_stream_profile( 6, dds.stream_format("Y8I"), 640,480 ), + dds.video_stream_profile( 25, dds.stream_format("Y12I"), 640,400 ), + dds.video_stream_profile( 15, dds.stream_format("Y12I"), 640,400 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 640,360 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 640,360 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 640,360 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 640,360 ), + dds.video_stream_profile( 6, dds.stream_format("Y8I"), 640,360 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 480,270 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 480,270 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 480,270 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 480,270 ), + dds.video_stream_profile( 6, dds.stream_format("Y8I"), 480,270 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 424,240 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 424,240 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 424,240 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 424,240 ), + dds.video_stream_profile( 6, dds.stream_format("Y8I"), 424,240 ) ] @@ -172,198 +172,198 @@ def ir_stream( number ): def color_stream_profiles(): return [ - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1920,1080 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1920,1080 ), dds.video_stream_profile( 30, dds.stream_format("BYR2"), 1920,1080 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 1920,1080 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1920,1080 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1920,1080 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1920,1080 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 1920,1080 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1920,1080 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1920,1080 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1920,1080 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 1920,1080 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1920,1080 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1920,1080 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1920,1080 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1920,1080 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1920,1080 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1920,1080 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 1920,1080 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1920,1080 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1920,1080 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1920,1080 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 1920,1080 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 1920,1080 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 1920,1080 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 1920,1080 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 1920,1080 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 1920,1080 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 1920,1080 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 1920,1080 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 1920,1080 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 1920,1080 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 1920,1080 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 1920,1080 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280,720 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280,720 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280,720 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280,720 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280,720 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280,720 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280,720 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280,720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280,720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280,720 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 1280,720 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280,720 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280,720 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280,720 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280,720 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280,720 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280,720 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280,720 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280,720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280,720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280,720 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 1280,720 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 1280,720 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 1280,720 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 1280,720 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 1280,720 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 1280,720 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 1280,720 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 1280,720 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 1280,720 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 1280,720 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 1280,720 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 1280,720 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 960,540 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 960,540 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 960,540 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 960,540 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 960,540 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 960,540 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 960,540 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 960,540 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 960,540 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 960,540 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 960,540 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 960,540 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 960,540 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 960,540 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 960,540 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 960,540 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 960,540 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 960,540 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 960,540 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 960,540 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 960,540 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 960,540 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 960,540 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 960,540 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 960,540 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 960,540 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 960,540 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 960,540 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 960,540 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 960,540 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 960,540 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 960,540 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 960,540 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 960,540 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 960,540 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 960,540 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 960,540 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 960,540 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 960,540 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 960,540 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 960,540 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 960,540 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 960,540 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 960,540 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848,480 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 848,480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848,480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848,480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848,480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848,480 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 848,480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848,480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848,480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848,480 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 848,480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848,480 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 848,480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848,480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848,480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848,480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848,480 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 848,480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848,480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848,480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848,480 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 848,480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848,480 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 848,480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848,480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848,480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848,480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848,480 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 848,480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848,480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848,480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848,480 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 848,480 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 848,480 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 848,480 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 848,480 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 848,480 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 848,480 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 848,480 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 848,480 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 848,480 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 848,480 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 848,480 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 848,480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640,480 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 640,480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640,480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640,480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640,480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640,480 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 640,480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640,480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640,480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640,480 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 640,480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640,480 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 640,480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640,480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640,480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640,480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640,480 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 640,480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640,480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640,480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640,480 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 640,480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640,480 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640,480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640,480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640,480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640,480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640,480 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 640,480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640,480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640,480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640,480 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 640,480 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 640,480 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 640,480 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 640,480 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 640,480 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 640,480 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 640,480 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 640,480 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 640,480 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 640,480 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 640,480 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 640,480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640,360 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 640,360 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640,360 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640,360 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640,360 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640,360 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 640,360 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640,360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640,360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640,360 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 640,360 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640,360 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 640,360 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640,360 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640,360 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640,360 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640,360 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 640,360 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640,360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640,360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640,360 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 640,360 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640,360 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640,360 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640,360 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640,360 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640,360 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640,360 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 640,360 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640,360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640,360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640,360 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 640,360 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 640,360 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 640,360 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 640,360 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 640,360 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 640,360 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 640,360 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 640,360 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 640,360 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 640,360 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 640,360 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 640,360 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424,240 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 424,240 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424,240 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424,240 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424,240 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424,240 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 424,240 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424,240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424,240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424,240 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 424,240 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424,240 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 424,240 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424,240 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424,240 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424,240 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424,240 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 424,240 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424,240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424,240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424,240 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 424,240 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424,240 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 424,240 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424,240 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424,240 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424,240 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424,240 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 424,240 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424,240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424,240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424,240 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 424,240 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 424,240 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 424,240 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 424,240 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 424,240 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 424,240 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 424,240 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 424,240 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 424,240 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 424,240 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 424,240 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 424,240 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 320,240 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 320,240 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 320,240 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 320,240 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 320,240 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 320,240 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 320,240 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 320,240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 320,240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 320,240 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 320,240 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 320,240 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 320,240 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 320,240 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 320,240 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 320,240 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 320,240 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 320,240 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 320,240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 320,240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 320,240 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 320,240 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 320,240 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 320,240 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 320,240 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 320,240 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 320,240 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 320,240 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 320,240 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 320,240 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 320,240 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 320,240 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 320,240 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 320,180 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 320,180 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 320,180 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 320,180 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 320,180 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 320,180 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 320,180 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 320,180 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 320,180 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 320,180 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 320,180 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 320,180 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 320,180 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 320,180 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 320,180 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 320,180 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 320,180 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 320,180 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 320,180 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 320,180 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 320,180 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 320,180 ), - dds.video_stream_profile( 6, dds.stream_format("rgb8"), 320,180 ), - dds.video_stream_profile( 6, dds.stream_format("Y16"), 320,180 ), - dds.video_stream_profile( 6, dds.stream_format("BGRA"), 320,180 ), - dds.video_stream_profile( 6, dds.stream_format("RGBA"), 320,180 ), - dds.video_stream_profile( 6, dds.stream_format("RGB2"), 320,180 ), + # dds.video_stream_profile( 6, dds.stream_format("rgb8"), 320,180 ), + # dds.video_stream_profile( 6, dds.stream_format("Y16"), 320,180 ), + # dds.video_stream_profile( 6, dds.stream_format("BGRA"), 320,180 ), + # dds.video_stream_profile( 6, dds.stream_format("RGBA"), 320,180 ), + # dds.video_stream_profile( 6, dds.stream_format("RGB2"), 320,180 ), dds.video_stream_profile( 6, dds.stream_format("yuv422_yuy2"), 320,180 ) ] diff --git a/unit-tests/dds/d455.py b/unit-tests/dds/d455.py index 48e45495d8..ba702ec633 100644 --- a/unit-tests/dds/d455.py +++ b/unit-tests/dds/d455.py @@ -68,150 +68,150 @@ def colored_infrared_stream(): def colored_infrared_stream_profiles(): return [ dds.video_stream_profile( 30, dds.stream_format("UYVY"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 720 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 848, 480 ), dds.video_stream_profile( 100, dds.stream_format("UYVY"), 848, 100 ), - dds.video_stream_profile( 100, dds.stream_format("BGRA"), 848, 100 ), - dds.video_stream_profile( 100, dds.stream_format("RGBA"), 848, 100 ), - dds.video_stream_profile( 100, dds.stream_format("RGB2"), 848, 100 ), - dds.video_stream_profile( 100, dds.stream_format("rgb8"), 848, 100 ), + # dds.video_stream_profile( 100, dds.stream_format("BGRA"), 848, 100 ), + # dds.video_stream_profile( 100, dds.stream_format("RGBA"), 848, 100 ), + # dds.video_stream_profile( 100, dds.stream_format("RGB2"), 848, 100 ), + # dds.video_stream_profile( 100, dds.stream_format("rgb8"), 848, 100 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 480 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 360 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 480, 270 ), dds.video_stream_profile( 90, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 60, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 30, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), dds.video_stream_profile( 15, dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 424, 240 ) + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), + dds.video_stream_profile( 5 , dds.stream_format("UYVY"), 424, 240 ) #, + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 424, 240 ) ] @@ -259,41 +259,41 @@ def depth_stream(): def ir_stream_profiles(): return [ - dds.video_stream_profile( 30, dds.stream_format("mono8"), 1280, 800 ), - dds.video_stream_profile( 25, dds.stream_format("Y16"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 1280, 800 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("mono8"), 1280, 720 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("mono8"), 848, 480 ), - dds.video_stream_profile( 100, dds.stream_format("mono8"), 848, 100 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("mono8"), 640, 480 ), - dds.video_stream_profile( 25, dds.stream_format("Y16"), 640, 400 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 400 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("mono8"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("mono8"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("mono8"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("mono8"), 424, 240 ) + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 1280, 800 ), + dds.video_stream_profile( 25, dds.stream_format("Y12I"), 1280, 800 ), + dds.video_stream_profile( 15, dds.stream_format("Y12I"), 1280, 800 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 1280, 800 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 1280, 720 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 1280, 720 ), + dds.video_stream_profile( 5 , dds.stream_format("Y8I"), 1280, 720 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 5 , dds.stream_format("Y8I"), 848, 480 ), + dds.video_stream_profile( 100, dds.stream_format("Y8I"), 848, 100 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 5 , dds.stream_format("Y8I"), 640, 480 ), + dds.video_stream_profile( 25, dds.stream_format("Y12I"), 640, 400 ), + dds.video_stream_profile( 15, dds.stream_format("Y12I"), 640, 400 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 5 , dds.stream_format("Y8I"), 640, 360 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 5 , dds.stream_format("Y8I"), 480, 270 ), + dds.video_stream_profile( 90, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 60, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 30, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 15, dds.stream_format("Y8I"), 424, 240 ), + dds.video_stream_profile( 5 , dds.stream_format("Y8I"), 424, 240 ) ] @@ -306,199 +306,199 @@ def ir_stream( number ): def color_stream_profiles(): return [ - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 800 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 800 ), dds.video_stream_profile( 30, dds.stream_format("BYR2"), 1280, 800 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280, 800 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 800 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 800 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 800 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280, 800 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 800 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 800 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 800 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 800 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 800 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 800 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 800 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 800 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 800 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 800 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 1280, 800 ), - dds.video_stream_profile( 10, dds.stream_format("rgb8"), 1280, 800 ), - dds.video_stream_profile( 10, dds.stream_format("Y16"), 1280, 800 ), - dds.video_stream_profile( 10, dds.stream_format("BGRA"), 1280, 800 ), - dds.video_stream_profile( 10, dds.stream_format("RGBA"), 1280, 800 ), - dds.video_stream_profile( 10, dds.stream_format("RGB2"), 1280, 800 ), + # dds.video_stream_profile( 10, dds.stream_format("rgb8"), 1280, 800 ), + # dds.video_stream_profile( 10, dds.stream_format("Y16"), 1280, 800 ), + # dds.video_stream_profile( 10, dds.stream_format("BGRA"), 1280, 800 ), + # dds.video_stream_profile( 10, dds.stream_format("RGBA"), 1280, 800 ), + # dds.video_stream_profile( 10, dds.stream_format("RGB2"), 1280, 800 ), dds.video_stream_profile( 10, dds.stream_format("yuv422_yuy2"), 1280, 800 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 800 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 1280, 800 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 800 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 800 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 800 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 800 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 1280, 800 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 800 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 800 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 800 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 1280, 800 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 10, dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 10, dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 10, dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 10, dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 10, dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 10, dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 10, dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 10, dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 10, dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 10, dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 10, dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 720 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 1280, 720 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 1280, 720 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 1280, 720 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 848, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 848, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 848, 480 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 848, 480 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 480 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 480 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 480 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 640, 480 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 360 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 640, 360 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 640, 360 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 640, 360 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 480, 270 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 480, 270 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 480, 270 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 480, 270 ), - dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 90, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 90, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 60, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 60, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 30, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 30, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 15, dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 15, dds.stream_format("yuv422_yuy2"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("Y16"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 424, 240 ), - dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("rgb8"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("Y16"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("BGRA"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGBA"), 424, 240 ), + # dds.video_stream_profile( 5 , dds.stream_format("RGB2"), 424, 240 ), dds.video_stream_profile( 5 , dds.stream_format("yuv422_yuy2"), 424, 240 ) ] def color_stream(): stream = dds.color_stream_server( "Color", "RGB Camera" ) - stream.init_profiles( color_stream_profiles(), 25 ) + stream.init_profiles( color_stream_profiles(), 5 ) stream.init_options( rgb_camera_options() ) return stream diff --git a/unit-tests/dds/test-librs-device-properties.py b/unit-tests/dds/test-librs-device-properties.py index 29f26ae93c..8a0fd00b7c 100644 --- a/unit-tests/dds/test-librs-device-properties.py +++ b/unit-tests/dds/test-librs-device-properties.py @@ -41,13 +41,13 @@ test.check_equal( len(sensors), 3 ) if test.check( 'Stereo Module' in sensors ): sensor = sensors.get('Stereo Module') - test.check_equal( len(sensor.get_stream_profiles()), len(d435i.depth_stream_profiles())+2*len(d435i.ir_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 104 ) # As mesured running rs-sensor-control example if test.check( 'RGB Camera' in sensors ): sensor = sensors['RGB Camera'] - test.check_equal( len(sensor.get_stream_profiles()), len(d435i.color_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 225 ) # As mesured running rs-sensor-control example if test.check( 'Motion Module' in sensors ): sensor = sensors['Motion Module'] - test.check_equal( len(sensor.get_stream_profiles()), len(d435i.accel_stream_profiles())+len(d435i.gyro_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 4 ) # As mesured running rs-sensor-control example remote.run( 'close_server( instance )' ) except: test.unexpected_exception() @@ -70,8 +70,7 @@ test.check_equal( len(sensors), 1 ) if test.check( 'Stereo Module' in sensors ): sensor = sensors.get('Stereo Module') - test.check_equal( len(sensor.get_stream_profiles()), - len(d405.depth_stream_profiles())+2*len(d405.ir_stream_profiles())+len(d405.color_stream_profiles())+len(d405.colored_infrared_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 431 ) # As mesured running rs-sensor-control example remote.run( 'close_server( instance )' ) except: test.unexpected_exception() @@ -94,13 +93,13 @@ test.check_equal( len(sensors), 3 ) if test.check( 'Stereo Module' in sensors ): sensor = sensors.get('Stereo Module') - test.check_equal( len(sensor.get_stream_profiles()), len(d455.depth_stream_profiles())+2*len(d455.ir_stream_profiles())+len(d455.colored_infrared_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 245 ) # As mesured running rs-sensor-control example if test.check( 'RGB Camera' in sensors ): sensor = sensors['RGB Camera'] - test.check_equal( len(sensor.get_stream_profiles()), len(d455.color_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 218 ) # As mesured running rs-sensor-control example if test.check( 'Motion Module' in sensors ): sensor = sensors['Motion Module'] - test.check_equal( len(sensor.get_stream_profiles()), len(d455.accel_stream_profiles())+len(d455.gyro_stream_profiles()) ) + test.check_equal( len(sensor.get_stream_profiles()), 4 ) # As mesured running rs-sensor-control example remote.run( 'close_server( instance )' ) except: test.unexpected_exception() From 319740ec56adff283951690a848015d795f406be Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Sun, 28 May 2023 22:59:31 +0300 Subject: [PATCH 06/19] Fix test-dds-librs-extrinsics --- .../dds/dds-server/lrs-device-controller.cpp | 2 +- unit-tests/dds/d405.py | 30 ++++++------ unit-tests/dds/d435i.py | 38 +++++++-------- unit-tests/dds/d455.py | 46 +++++++++---------- 4 files changed, 58 insertions(+), 58 deletions(-) diff --git a/tools/dds/dds-server/lrs-device-controller.cpp b/tools/dds/dds-server/lrs-device-controller.cpp index 6a1bbf53d5..8539c7ff6e 100644 --- a/tools/dds/dds-server/lrs-device-controller.cpp +++ b/tools/dds/dds-server/lrs-device-controller.cpp @@ -275,7 +275,7 @@ extrinsics_map get_extrinsics_map( const rs2::device & dev ) { auto stream_profiles = sensor.get_stream_profiles(); std::for_each( stream_profiles.begin(), stream_profiles.end(), [&]( const rs2::stream_profile & sp ) { - std::string stream_name = sp.stream_name(); + std::string stream_name = stream_name_from_rs2( sp ); if( stream_name_to_rs2_stream_profile.count( stream_name ) == 0 ) stream_name_to_rs2_stream_profile[stream_name] = sp; // Any profile of this stream will do, take the first } ); diff --git a/unit-tests/dds/d405.py b/unit-tests/dds/d405.py index a43820678f..92f2debfd7 100644 --- a/unit-tests/dds/d405.py +++ b/unit-tests/dds/d405.py @@ -260,7 +260,7 @@ def ir_stream_profiles(): def ir_stream( number ): - stream = dds.ir_stream_server( "Infrared " + str(number), "Stereo Module" ) + stream = dds.ir_stream_server( "Infrared_" + str(number), "Stereo Module" ) stream.init_profiles( ir_stream_profiles(), 0 ) stream.init_options( stereo_module_options() ) stream.set_intrinsics( ir_stream_intrinsics() ) @@ -889,11 +889,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (0.9999844431877136,0.0014127078466117382,0.0053943851962685585,-0.001408747979439795,0.9999987483024597,-0.0007378021255135536,-0.005395420826971531,0.000730191299226135,0.9999851584434509) extr.translation = (6.110243703005835e-05,1.1573569281608798e-05,6.581118213944137e-06) - extrinsics[("Color","Infrared 1")] = extr + extrinsics[("Color","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999844431877136,0.0014127078466117382,0.0053943851962685585,-0.001408747979439795,0.9999987483024597,-0.0007378021255135536,-0.005395420826971531,0.000730191299226135,0.9999851584434509) extr.translation = (-0.017938679084181786,1.1573569281608798e-05,6.581118213944137e-06) - extrinsics[("Color","Infrared 2")] = extr + extrinsics[("Color","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999844431877136,-0.001408747979439795,-0.005395420826971531,0.0014127078466117382,0.9999987483024597,0.000730191299226135,0.0053943851962685585,-0.0007378021255135536,0.9999851584434509) extr.translation = (-6.115333235356957e-05,-1.1482620720926207e-05,-6.2597978285339195e-06) @@ -905,11 +905,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Depth","Infrared 1")] = extr + extrinsics[("Depth","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.017999781295657158,0.0,0.0) - extrinsics[("Depth","Infrared 2")] = extr + extrinsics[("Depth","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999844431877136,-0.001408747979439795,-0.005395420826971531,0.0014127078466117382,0.9999987483024597,0.000730191299226135,0.0053943851962685585,-0.0007378021255135536,0.9999851584434509) extr.translation = (-6.115333235356957e-05,-1.1482620720926207e-05,-6.2597978285339195e-06) @@ -921,43 +921,43 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared","Infrared 1")] = extr + extrinsics[("Infrared","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.017999781295657158,0.0,0.0) - extrinsics[("Infrared","Infrared 2")] = extr + extrinsics[("Infrared","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999844431877136,-0.001408747979439795,-0.005395420826971531,0.0014127078466117382,0.9999987483024597,0.000730191299226135,0.0053943851962685585,-0.0007378021255135536,0.9999851584434509) extr.translation = (-6.115333235356957e-05,-1.1482620720926207e-05,-6.2597978285339195e-06) - extrinsics[("Infrared 1","Color")] = extr + extrinsics[("Infrared_1","Color")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared 1","Depth")] = extr + extrinsics[("Infrared_1","Depth")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared 1","Infrared")] = extr + extrinsics[("Infrared_1","Infrared")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.017999781295657158,0.0,0.0) - extrinsics[("Infrared 1","Infrared 2")] = extr + extrinsics[("Infrared_1","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999844431877136,-0.001408747979439795,-0.005395420826971531,0.0014127078466117382,0.9999987483024597,0.000730191299226135,0.0053943851962685585,-0.0007378021255135536,0.9999851584434509) extr.translation = (0.01793834939599037,-3.683977774926461e-05,-0.00010337619460187852) - extrinsics[("Infrared 2","Color")] = extr + extrinsics[("Infrared_2","Color")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.017999781295657158,0.0,0.0) - extrinsics[("Infrared 2","Depth")] = extr + extrinsics[("Infrared_2","Depth")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.017999781295657158,0.0,0.0) - extrinsics[("Infrared 2","Infrared")] = extr + extrinsics[("Infrared_2","Infrared")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.017999781295657158,0.0,0.0) - extrinsics[("Infrared 2","Infrared 1")] = extr + extrinsics[("Infrared_2","Infrared_1")] = extr return extrinsics diff --git a/unit-tests/dds/d435i.py b/unit-tests/dds/d435i.py index e6dbb3e255..3640628723 100644 --- a/unit-tests/dds/d435i.py +++ b/unit-tests/dds/d435i.py @@ -163,7 +163,7 @@ def ir_stream_profiles(): def ir_stream( number ): - stream = dds.ir_stream_server( "Infrared " + str(number), "Stereo Module" ) + stream = dds.ir_stream_server( "Infrared_" + str(number), "Stereo Module" ) stream.init_profiles( ir_stream_profiles(), 0 ) stream.init_options( stereo_module_options() ) stream.set_intrinsics( ir_stream_intrinsics() ) @@ -1020,11 +1020,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.005520000122487545,-0.005100000184029341,-0.011739999987185001) - extrinsics[("Accel","Infrared 1")] = extr + extrinsics[("Accel","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.04434395954012871,-0.005100000184029341,-0.011739999987185001) - extrinsics[("Accel","Infrared 2")] = extr + extrinsics[("Accel","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999951720237732,0.00040659401565790176,0.0030847808811813593,-0.0004076171899214387,0.9999998807907104,0.0003310548490844667,-0.00308464583940804,-0.0003323106502648443,0.9999951720237732) extr.translation = (-0.02059810981154442,0.0050893244333565235,0.011522269807755947) @@ -1040,11 +1040,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (0.9999951720237732,0.00040659401565790176,0.0030847808811813593,-0.0004076171899214387,0.9999998807907104,0.0003310548490844667,-0.00308464583940804,-0.0003323106502648443,0.9999951720237732) extr.translation = (-0.015078110620379448,-1.0675736120902002e-05,-0.00021772991749458015) - extrinsics[("Color","Infrared 1")] = extr + extrinsics[("Color","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999951720237732,0.00040659401565790176,0.0030847808811813593,-0.0004076171899214387,0.9999998807907104,0.0003310548490844667,-0.00308464583940804,-0.0003323106502648443,0.9999951720237732) extr.translation = (-0.06494206935167313,-1.0675736120902002e-05,-0.00021772991749458015) - extrinsics[("Color","Infrared 2")] = extr + extrinsics[("Color","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.005520000122487545,0.005100000184029341,0.011739999987185001) @@ -1060,11 +1060,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Depth","Infrared 1")] = extr + extrinsics[("Depth","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.04986396059393883,0.0,0.0) - extrinsics[("Depth","Infrared 2")] = extr + extrinsics[("Depth","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) @@ -1080,51 +1080,51 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.005520000122487545,-0.005100000184029341,-0.011739999987185001) - extrinsics[("Gyro","Infrared 1")] = extr + extrinsics[("Gyro","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.04434395954012871,-0.005100000184029341,-0.011739999987185001) - extrinsics[("Gyro","Infrared 2")] = extr + extrinsics[("Gyro","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.005520000122487545,0.005100000184029341,0.011739999987185001) - extrinsics[("Infrared 1","Accel")] = extr + extrinsics[("Infrared_1","Accel")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999951720237732,-0.0004076171899214387,-0.00308464583940804,0.00040659401565790176,0.9999998807907104,-0.0003323106502648443,0.0030847808811813593,0.0003310548490844667,0.9999951720237732) extr.translation = (0.015078714117407799,4.601718956109835e-06,0.00017121469136327505) - extrinsics[("Infrared 1","Color")] = extr + extrinsics[("Infrared_1","Color")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared 1","Depth")] = extr + extrinsics[("Infrared_1","Depth")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.005520000122487545,0.005100000184029341,0.011739999987185001) - extrinsics[("Infrared 1","Gyro")] = extr + extrinsics[("Infrared_1","Gyro")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.04986396059393883,0.0,0.0) - extrinsics[("Infrared 1","Infrared 2")] = extr + extrinsics[("Infrared_1","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.04434395954012871,0.005100000184029341,0.011739999987185001) - extrinsics[("Infrared 2","Accel")] = extr + extrinsics[("Infrared_2","Accel")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999951720237732,-0.0004076171899214387,-0.00308464583940804,0.00040659401565790176,0.9999998807907104,-0.0003323106502648443,0.0030847808811813593,0.0003310548490844667,0.9999951720237732) extr.translation = (0.06494243443012238,-1.5723688193247654e-05,1.7402038793079555e-05) - extrinsics[("Infrared 2","Color")] = extr + extrinsics[("Infrared_2","Color")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.04986396059393883,0.0,0.0) - extrinsics[("Infrared 2","Depth")] = extr + extrinsics[("Infrared_2","Depth")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.04434395954012871,0.005100000184029341,0.011739999987185001) - extrinsics[("Infrared 2","Gyro")] = extr + extrinsics[("Infrared_2","Gyro")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.04986396059393883,0.0,0.0) - extrinsics[("Infrared 2","Infrared 1")] = extr + extrinsics[("Infrared_2","Infrared_1")] = extr return extrinsics diff --git a/unit-tests/dds/d455.py b/unit-tests/dds/d455.py index ba702ec633..6686285586 100644 --- a/unit-tests/dds/d455.py +++ b/unit-tests/dds/d455.py @@ -298,7 +298,7 @@ def ir_stream_profiles(): def ir_stream( number ): - stream = dds.ir_stream_server( "Infrared " + str(number), "Stereo Module" ) + stream = dds.ir_stream_server( "Infrared_" + str(number), "Stereo Module" ) stream.init_profiles( ir_stream_profiles(), 0 ) stream.init_options( stereo_module_options() ) return stream @@ -935,11 +935,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.030220000073313713,-0.007400000002235174,-0.016019999980926514) - extrinsics[("Accel","Infrared 1")] = extr + extrinsics[("Accel","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.06474092602729797,-0.007400000002235174,-0.016019999980926514) - extrinsics[("Accel","Infrared 2")] = extr + extrinsics[("Accel","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999990463256836,-0.0011767612304538488,0.0007593693444505334,0.0011775976745411754,0.9999986886978149,-0.0011019925586879253,-0.0007580715464428067,0.0011028856970369816,0.9999991059303284) extr.translation = (0.028874816372990608,0.007493271958082914,0.015854692086577415) @@ -959,11 +959,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (0.9999990463256836,-0.0011767612304538488,0.0007593693444505334,0.0011775976745411754,0.9999986886978149,-0.0011019925586879253,-0.0007580715464428067,0.0011028856970369816,0.9999991059303284) extr.translation = (0.05909481644630432,9.327199222752824e-05,-0.00016530796710867435) - extrinsics[("Color","Infrared 1")] = extr + extrinsics[("Color","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999990463256836,-0.0011767612304538488,0.0007593693444505334,0.0011775976745411754,0.9999986886978149,-0.0011019925586879253,-0.0007580715464428067,0.0011028856970369816,0.9999991059303284) extr.translation = (-0.035866111516952515,9.327199222752824e-05,-0.00016530796710867435) - extrinsics[("Color","Infrared 2")] = extr + extrinsics[("Color","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.030220000073313713,0.007400000002235174,0.016019999980926514) @@ -983,11 +983,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Depth","Infrared 1")] = extr + extrinsics[("Depth","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.09496092796325684,0.0,0.0) - extrinsics[("Depth","Infrared 2")] = extr + extrinsics[("Depth","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) @@ -1007,11 +1007,11 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.030220000073313713,-0.007400000002235174,-0.016019999980926514) - extrinsics[("Gyro","Infrared 1")] = extr + extrinsics[("Gyro","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.06474092602729797,-0.007400000002235174,-0.016019999980926514) - extrinsics[("Gyro","Infrared 2")] = extr + extrinsics[("Gyro","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.030220000073313713,0.007400000002235174,0.016019999980926514) @@ -1031,59 +1031,59 @@ def get_extrinsics(): extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared","Infrared 1")] = extr + extrinsics[("Infrared","Infrared_1")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.09496092796325684,0.0,0.0) - extrinsics[("Infrared","Infrared 2")] = extr + extrinsics[("Infrared","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.030220000073313713,0.007400000002235174,0.016019999980926514) - extrinsics[("Infrared 1","Accel")] = extr + extrinsics[("Infrared_1","Accel")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999990463256836,0.0011775976745411754,-0.0007580715464428067,-0.0011767612304538488,0.9999986886978149,0.0011028856970369816,0.0007593693444505334,-0.0011019925586879253,0.9999991059303284) extr.translation = (-0.05909452587366104,-0.0001630439655855298,0.00021000305423513055) - extrinsics[("Infrared 1","Color")] = extr + extrinsics[("Infrared_1","Color")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared 1","Depth")] = extr + extrinsics[("Infrared_1","Depth")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.030220000073313713,0.007400000002235174,0.016019999980926514) - extrinsics[("Infrared 1","Gyro")] = extr + extrinsics[("Infrared_1","Gyro")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.0,0.0,0.0) - extrinsics[("Infrared 1","Infrared")] = extr + extrinsics[("Infrared_1","Infrared")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (-0.09496092796325684,0.0,0.0) - extrinsics[("Infrared 1","Infrared 2")] = extr + extrinsics[("Infrared_1","Infrared_2")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.06474092602729797,0.007400000002235174,0.016019999980926514) - extrinsics[("Infrared 2","Accel")] = extr + extrinsics[("Infrared_2","Accel")] = extr extr = dds.extrinsics(); extr.rotation = (0.9999990463256836,0.0011775976745411754,-0.0007580715464428067,-0.0011767612304538488,0.9999986886978149,0.0011028856970369816,0.0007593693444505334,-0.0011019925586879253,0.9999991059303284) extr.translation = (0.03586631268262863,-5.1218194130342454e-05,0.00013801587920170277) - extrinsics[("Infrared 2","Color")] = extr + extrinsics[("Infrared_2","Color")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.09496092796325684,0.0,0.0) - extrinsics[("Infrared 2","Depth")] = extr + extrinsics[("Infrared_2","Depth")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.06474092602729797,0.007400000002235174,0.016019999980926514) - extrinsics[("Infrared 2","Gyro")] = extr + extrinsics[("Infrared_2","Gyro")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.09496092796325684,0.0,0.0) - extrinsics[("Infrared 2","Infrared")] = extr + extrinsics[("Infrared_2","Infrared")] = extr extr = dds.extrinsics(); extr.rotation = (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0) extr.translation = (0.09496092796325684,0.0,0.0) - extrinsics[("Infrared 2","Infrared 1")] = extr + extrinsics[("Infrared_2","Infrared_1")] = extr return extrinsics From 4988217d6c4ec13c4d06c2e41b822ee809598619 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Mon, 29 May 2023 09:03:51 +0300 Subject: [PATCH 07/19] Fix test-stream-sensor-bridge --- unit-tests/dds/test-stream-sensor-bridge.py | 66 ++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/unit-tests/dds/test-stream-sensor-bridge.py b/unit-tests/dds/test-stream-sensor-bridge.py index eba5a0c4cb..080b3fb6f0 100644 --- a/unit-tests/dds/test-stream-sensor-bridge.py +++ b/unit-tests/dds/test-stream-sensor-bridge.py @@ -203,7 +203,7 @@ def find_server_profile( stream_name, profile_string ): ) # IR1 and IR2 are not open test.check_throws( lambda: - bridge.open( servers['Infrared 1'].default_profile() ), + bridge.open( servers['Infrared_1'].default_profile() ), RuntimeError, "sensor 'Stereo Module' was committed and cannot be changed" ) except Exception: test.unexpected_exception() @@ -218,9 +218,9 @@ def find_server_profile( stream_name, profile_string ): bridge.open( servers['Depth'].default_profile() ) # 1280x720 16UC1 @ 30 Hz bridge.add_implicit_profiles() # adds IR1, IR2 test.check_throws( lambda: - bridge.open( servers['Infrared 1'].default_profile() ), - RuntimeError, "profile <'Infrared 1' 1280x800 mono8 @ 30 Hz> is incompatible with already-open <'Depth' 1280x720 16UC1 @ 30 Hz>" ) - bridge.open( find_server_profile( 'Infrared 1', '1280x720 mono8 @ 30 Hz' )) # same profile, makes it explicit! + bridge.open( servers['Infrared_1'].default_profile() ), + RuntimeError, "profile <'Infrared_1' 1280x800 Y8I @ 30 Hz> is incompatible with already-open <'Depth' 1280x720 16UC1 @ 30 Hz>" ) + bridge.open( find_server_profile( 'Infrared_1', '1280x720 Y8I @ 30 Hz' )) # same profile, makes it explicit! bridge.commit() test.check_equal( len(active_sensors), 0 ) # not streaming yet start_stream( 'Depth' ) @@ -228,8 +228,8 @@ def find_server_profile( stream_name, profile_string ): and test.check_equal( next(iter(active_sensors)), 'Stereo Module' ) and test.check_equal( len(active_sensors['Stereo Module']), 3 ) ) - bridge.open( find_active_profile( 'Infrared 1' )) # already explicit, same profile: does nothing - start_stream( 'Infrared 2' ) # starts it implicitly + bridge.open( find_active_profile( 'Infrared_1' )) # already explicit, same profile: does nothing + start_stream( 'Infrared_2' ) # starts it implicitly except Exception: test.unexpected_exception() finally: @@ -240,31 +240,31 @@ def find_server_profile( stream_name, profile_string ): # test.start( "stream profiles reset" ) try: - bridge.open( find_server_profile( 'Infrared 1', '640x480 mono8 @ 60 Hz' )) + bridge.open( find_server_profile( 'Infrared_1', '640x480 Y8I @ 60 Hz' )) bridge.add_implicit_profiles() # adds Depth, IR2 bridge.commit() test.check_equal( len(active_sensors), 0 ) # not streaming yet - start_stream( 'Infrared 1' ) + start_stream( 'Infrared_1' ) ( test.check_equal( len(active_sensors), 1 ) and test.check_equal( next(iter(active_sensors)), 'Stereo Module' ) and test.check_equal( len(active_sensors['Stereo Module']), 3 ) ) - test.check_equal( find_active_profile( 'Infrared 2' ).to_string(), "<'Infrared 2' 640x480 mono8 @ 60 Hz>" ) - stop_stream( 'Infrared 1' ) + test.check_equal( find_active_profile( 'Infrared_2' ).to_string(), "<'Infrared_2' 640x480 Y8I @ 60 Hz>" ) + stop_stream( 'Infrared_1' ) test.check_equal( len(active_sensors), 0 ) # not streaming again # We don't reset - last commit should still stand! - start_stream( 'Infrared 2' ) + start_stream( 'Infrared_2' ) ( test.check_equal( len(active_sensors), 1 ) and test.check_equal( next(iter(active_sensors)), 'Stereo Module' ) and test.check_equal( len(active_sensors['Stereo Module']), 3 ) ) - test.check_equal( find_active_profile( 'Infrared 2' ).to_string(), "<'Infrared 2' 640x480 mono8 @ 60 Hz>" ) - stop_stream( 'Infrared 2' ) + test.check_equal( find_active_profile( 'Infrared_2' ).to_string(), "<'Infrared_2' 640x480 Y8I @ 60 Hz>" ) + stop_stream( 'Infrared_2' ) test.check_equal( len(active_sensors), 0 ) # not streaming again # Now reset - commit should be lost and we should be back to the default profile bridge.reset() - start_stream( 'Infrared 2' ) - test.check_equal( find_active_profile( 'Infrared 2' ).to_string(), servers['Infrared 2'].default_profile().to_string() ) + start_stream( 'Infrared_2' ) + test.check_equal( find_active_profile( 'Infrared_2' ).to_string(), servers['Infrared_2'].default_profile().to_string() ) except Exception: test.unexpected_exception() finally: @@ -344,22 +344,22 @@ def find_server_profile( stream_name, profile_string ): # test.start( "incompatible streams" ) try: - bridge.open( servers['Infrared 1'].default_profile() ) # 1280x800 mono8 @ 30 Hz + bridge.open( servers['Infrared_1'].default_profile() ) # 1280x800 Y8I @ 30 Hz bridge.add_implicit_profiles() # IR2 test.check_equal( len(active_sensors), 0 ) # not streaming yet - with bridge_error_expected( "failure trying to start/stop 'Depth': profile <'Depth' 1280x720 16UC1 @ 30 Hz> is incompatible with already-open <'Infrared 1' 1280x800 mono8 @ 30 Hz>" ): + with bridge_error_expected( "failure trying to start/stop 'Depth': profile <'Depth' 1280x720 16UC1 @ 30 Hz> is incompatible with already-open <'Infrared_1' 1280x800 Y8I @ 30 Hz>" ): start_stream( 'Depth' ) # no depth at 1280x800, so no stream! test.check_equal( len(active_sensors), 0 ) test.check_throws( lambda: bridge.open( servers['Depth'].default_profile() ), - RuntimeError, "profile <'Depth' 1280x720 16UC1 @ 30 Hz> is incompatible with already-open <'Infrared 1' 1280x800 mono8 @ 30 Hz>" ) + RuntimeError, "profile <'Depth' 1280x720 16UC1 @ 30 Hz> is incompatible with already-open <'Infrared_1' 1280x800 Y8I @ 30 Hz>" ) test.check_throws( lambda: - bridge.open( find_server_profile( 'Infrared 2', '848x480 mono8 @ 30 Hz' )), - RuntimeError, "profile <'Infrared 2' 848x480 mono8 @ 30 Hz> is incompatible with already-open <'Infrared 1' 1280x800 mono8 @ 30 Hz>" ) + bridge.open( find_server_profile( 'Infrared_2', '848x480 Y8I @ 30 Hz' )), + RuntimeError, "profile <'Infrared_2' 848x480 Y8I @ 30 Hz> is incompatible with already-open <'Infrared_1' 1280x800 Y8I @ 30 Hz>" ) test.check_throws( lambda: - bridge.open( find_server_profile( 'Infrared 2', '1280x800 mono8 @ 15 Hz' )), - RuntimeError, "profile <'Infrared 2' 1280x800 mono8 @ 15 Hz> is incompatible with already-open <'Infrared 1' 1280x800 mono8 @ 30 Hz>" ) - start_stream( 'Infrared 2' ) + bridge.open( find_server_profile( 'Infrared_2', '1280x800 Y8I @ 15 Hz' )), + RuntimeError, "profile <'Infrared_2' 1280x800 Y8I @ 15 Hz> is incompatible with already-open <'Infrared_1' 1280x800 Y8I @ 30 Hz>" ) + start_stream( 'Infrared_2' ) ( test.check_equal( len(active_sensors), 1 ) and test.check_equal( next(iter(active_sensors)), 'Stereo Module' ) and test.check_equal( len(active_sensors['Stereo Module']), 2 ) # IR1, IR2 @@ -377,18 +377,18 @@ def find_server_profile( stream_name, profile_string ): # test.start( "open and close" ) try: - bridge.open( servers['Infrared 1'].default_profile() ) # 1280x800 mono8 @ 30 Hz - bridge.open( servers['Infrared 1'].default_profile() ) # "compatible" - bridge.close( servers['Infrared 1'] ) - bridge.open( find_server_profile( 'Infrared 1', '1280x800 mono8 @ 30 Hz' )) - bridge.close( servers['Infrared 1'] ) - bridge.close( servers['Infrared 1'] ) - bridge.open( find_server_profile( 'Infrared 1', '1280x800 Y16 @ 25 Hz' )) + bridge.open( servers['Infrared_1'].default_profile() ) # 1280x800 Y8I @ 30 Hz + bridge.open( servers['Infrared_1'].default_profile() ) # "compatible" + bridge.close( servers['Infrared_1'] ) + bridge.open( find_server_profile( 'Infrared_1', '1280x800 Y8I @ 30 Hz' )) + bridge.close( servers['Infrared_1'] ) + bridge.close( servers['Infrared_1'] ) + bridge.open( find_server_profile( 'Infrared_1', '1280x800 Y12I @ 25 Hz' )) bridge.reset() - bridge.open( find_server_profile( 'Infrared 1', '1280x800 Y16 @ 15 Hz' )) + bridge.open( find_server_profile( 'Infrared_1', '1280x800 Y12I @ 15 Hz' )) test.check_throws( lambda: - bridge.open( find_server_profile( 'Infrared 1', '1280x800 Y16 @ 25 Hz' )), - RuntimeError, "profile <'Infrared 1' 1280x800 Y16 @ 25 Hz> is incompatible with already-open <'Infrared 1' 1280x800 Y16 @ 15 Hz>" ) + bridge.open( find_server_profile( 'Infrared_1', '1280x800 Y12I @ 25 Hz' )), + RuntimeError, "profile <'Infrared_1' 1280x800 Y12I @ 25 Hz> is incompatible with already-open <'Infrared_1' 1280x800 Y12I @ 15 Hz>" ) except Exception: test.unexpected_exception() finally: From 8a6e6de5e1950bd16fc45ac505c30d2f5f05db11 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Mon, 29 May 2023 22:12:49 +0300 Subject: [PATCH 08/19] Add formats conversion unit test --- unit-tests/dds/formats-conversion-server.py | 166 +++++++++++ .../dds/test-librs-formats-converison.py | 258 ++++++++++++++++++ 2 files changed, 424 insertions(+) create mode 100644 unit-tests/dds/formats-conversion-server.py create mode 100644 unit-tests/dds/test-librs-formats-converison.py diff --git a/unit-tests/dds/formats-conversion-server.py b/unit-tests/dds/formats-conversion-server.py new file mode 100644 index 0000000000..113cc15847 --- /dev/null +++ b/unit-tests/dds/formats-conversion-server.py @@ -0,0 +1,166 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2023 Intel Corporation. All Rights Reserved. + +import pyrealdds as dds +from rspy import log, test +import pyrealsense2 as rs + +dds.debug( True, log.nested ) + + +participant = dds.participant() +participant.init( 123, "formats-conversion-server" ) + +device_info = dds.device_info() +device_info.name = "formats-coversion-device" +device_info.serial = "123" +device_info.product_line = "D400" +device_info.topic_root = "root_" + device_info.serial + + +def test_one_video_profile_per_stream( format_strings ): + profiles = [] + stream_servers = [] + counter = 0 + for format_string in format_strings: + profile = dds.video_stream_profile( 30, dds.stream_format( format_string ), 1280, 720 ) + profiles.append( profile ) + if format_string == "16UC1": + stream_server = dds.depth_stream_server( "server" + str( counter ), "sensor" ) + elif format_string == "yuv422_yuy2" or format_string == "UYVY": + stream_server = dds.color_stream_server( "server" + str( counter ), "sensor" ) + else: + stream_server = dds.ir_stream_server( "server" + str( counter ), "sensor" ) + stream_server.init_profiles( profiles, 0 ) + log.d( stream_server.profiles() ) + stream_servers.append( stream_server ) + counter = counter + 1 + + global dev_server + dev_server = dds.device_server( participant, device_info.topic_root ) + dev_server.init( stream_servers, [], {} ) + dev_server.broadcast( device_info ) + + +def test_multiple_video_profiles_per_stream( format_strings, frequencies, stream_type = "depth" ): + profiles = [] + stream_servers = [] + counter = 0 + for format_string in format_strings: + profile = dds.video_stream_profile( frequencies[counter], dds.stream_format( format_string ), 1280, 720 ) + profiles.append( profile ) + counter = counter + 1 + + if stream_type == "depth": + stream_server = dds.depth_stream_server( "server", "sensor" ) + elif stream_type == "color": + stream_server = dds.color_stream_server( "server", "sensor" ) + else: + stream_server = dds.ir_stream_server( "server", "sensor" ) + + stream_server.init_profiles( profiles, 0 ) + log.d( stream_server.profiles() ) + stream_servers.append( stream_server ) + + global dev_server + dev_server = dds.device_server( participant, device_info.topic_root ) + dev_server.init( stream_servers, [], {} ) + dev_server.broadcast( device_info ) + + +def test_one_motion_profile_per_stream( format_strings, stream_type = "accel" ): + profiles = [] + stream_servers = [] + counter = 0 + for format_string in format_strings: + profile = dds.motion_stream_profile( 30, dds.stream_format( format_string ) ) + profiles.append( profile ) + if stream_type == "accel": + stream_server = dds.accel_stream_server( "server" + str( counter ), "sensor" ) + else: + stream_server = dds.gyro_stream_server( "server" + str( counter ), "sensor" ) + stream_server.init_profiles( profiles, 0 ) + log.d( stream_server.profiles() ) + stream_servers.append( stream_server ) + counter = counter + 1 + + global dev_server + dev_server = dds.device_server( participant, device_info.topic_root ) + dev_server.init( stream_servers, [], {} ) + dev_server.broadcast( device_info ) + + +def test_multiple_motion_profiles_per_stream( format_strings, frequencies, stream_type = "accel" ): + profiles = [] + stream_servers = [] + counter = 0 + for format_string in format_strings: + profile = dds.motion_stream_profile( frequencies[counter], dds.stream_format( format_string ) ) + profiles.append( profile ) + counter = counter + 1 + + if stream_type == "accel": + stream_server = dds.accel_stream_server( "server", "sensor" ) + else: + stream_server = dds.gyro_stream_server( "server", "sensor" ) + stream_server.init_profiles( profiles, 0 ) + log.d( stream_server.profiles() ) + stream_servers.append( stream_server ) + + global dev_server + dev_server = dds.device_server( participant, device_info.topic_root ) + dev_server.init( stream_servers, [], {} ) + dev_server.broadcast( device_info ) + + +def test_Y8I_stream(): + test_one_video_profile_per_stream( { "Y8I" } ) + + +def test_Y12I_stream(): + test_one_video_profile_per_stream( { "Y12I" } ) + + +def test_Y8_stream(): + test_one_video_profile_per_stream( { "mono8" } ) + + +def test_YUYV_stream(): + test_one_video_profile_per_stream( { "yuv422_yuy2" } ) + + +def test_UYVY_stream(): + test_one_video_profile_per_stream( { "UYVY" } ) + + +def test_Z16_stream(): + test_one_video_profile_per_stream( { "16UC1" } ) + + +def test_accel_stream(): + test_one_motion_profile_per_stream( { "MXYZ" }, "accel" ) + + +def test_gyro_stream(): + test_one_motion_profile_per_stream( { "MXYZ" }, "gyro" ) + + +def test_multiple_accel_profiles(): + test_multiple_motion_profiles_per_stream( [ "MXYZ", "MXYZ", "MXYZ", "MXYZ" ], [ 63, 200, 250, 400 ], "accel" ) + + +def test_multiple_color_profiles(): + test_multiple_video_profiles_per_stream( [ "yuv422_yuy2", "yuv422_yuy2", "yuv422_yuy2" ], [ 5, 15, 30 ], "color" ) + + +def test_multiple_depth_profiles(): + test_multiple_video_profiles_per_stream( [ "16UC1", "16UC1", "16UC1", "16UC1", "16UC1" ], [ 5, 10, 15, 20, 30 ], "depth" ) + + +def close_server(): + global dev_server + dev_server = None + + +# From here down, we're in "interactive" mode (see test-device-init.py) +# ... diff --git a/unit-tests/dds/test-librs-formats-converison.py b/unit-tests/dds/test-librs-formats-converison.py new file mode 100644 index 0000000000..ee992539a6 --- /dev/null +++ b/unit-tests/dds/test-librs-formats-converison.py @@ -0,0 +1,258 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +#test:donotrun:!dds + +from rspy import log, test +import pyrealsense2 as rs +import dds + +rs.log_to_console( rs.log_severity.debug ) +log.nested = 'C ' + +context = rs.context( '{"dds-domain":123,"dds-participant-name":"test-formats-conversion"}' ) +only_sw_devices = int(rs.product_line.sw_only) | int(rs.product_line.any_intel) + +import os.path +cwd = os.path.dirname(os.path.realpath(__file__)) +remote_script = os.path.join( cwd, 'formats-conversion-server.py' ) +with test.remote( remote_script, nested_indent=" S" ) as remote: + remote.wait_until_ready() + # + ############################################################################################# + # + with test.closure( "Test Y8 conversion", on_fail=test.ABORT ): + remote.run( 'test_Y8_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 1 ) # Y8 stays Y8, for infrared stream indexed 1 + test.check_equal( profiles[0].format(), rs.format.y8 ) + test.check_equal( profiles[0].stream_index(), 1 ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test Y8I conversion", on_fail=test.ABORT ): + remote.run( 'test_Y8I_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 2 ) # Y8I is converted into two Y8 streams + test.check_equal( profiles[0].format(), rs.format.y8 ) + test.check_equal( profiles[0].stream_index(), 1 ) + test.check_equal( profiles[1].format(), rs.format.y8 ) + test.check_equal( profiles[1].stream_index(), 2 ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test Y12I conversion", on_fail=test.ABORT ): + remote.run( 'test_Y12I_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 2 ) # Y12I is converted into two Y162 streams + test.check_equal( profiles[0].format(), rs.format.y16 ) + test.check_equal( profiles[0].stream_index(), 1 ) + test.check_equal( profiles[1].format(), rs.format.y16 ) + test.check_equal( profiles[1].stream_index(), 2 ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test YUYV conversion", on_fail=test.ABORT ): + remote.run( 'test_YUYV_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 7 ) # YUYV is converted into 7 streams - RGB8, RGBA8, BGR8, BGRA8, YUYV, Y16, Y8 + test.check_equal( profiles[0].format(), rs.format.rgb8 ) + test.check_equal( profiles[1].format(), rs.format.rgba8 ) + test.check_equal( profiles[2].format(), rs.format.bgr8 ) + test.check_equal( profiles[3].format(), rs.format.bgra8 ) + test.check_equal( profiles[4].format(), rs.format.yuyv ) + test.check_equal( profiles[5].format(), rs.format.y16 ) + test.check_equal( profiles[6].format(), rs.format.y8 ) + + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test UYVY conversion", on_fail=test.ABORT ): + remote.run( 'test_UYVY_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 5 ) # UYVY is converted into 5 streams - RGB8, RGBA8, BGR8, BGRA8, UYVY + test.check_equal( profiles[0].format(), rs.format.rgb8 ) + test.check_equal( profiles[1].format(), rs.format.rgba8 ) + test.check_equal( profiles[2].format(), rs.format.bgr8 ) + test.check_equal( profiles[3].format(), rs.format.bgra8 ) + test.check_equal( profiles[4].format(), rs.format.uyvy ) + + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test Z16 conversion", on_fail=test.ABORT ): + remote.run( 'test_Z16_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 1 ) # Z16 stays Z16, for depth stream type + test.check_equal( profiles[0].format(), rs.format.z16 ) + test.check_equal( profiles[0].stream_type(), rs.stream.depth ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test accel conversion", on_fail=test.ABORT ): + remote.run( 'test_accel_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 1 ) # MXYZ stays MXYZ with type based on the dds_stream type + test.check_equal( profiles[0].format(), rs.format.motion_xyz32f ) + test.check_equal( profiles[0].stream_type(), rs.stream.accel ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test gyro conversion", on_fail=test.ABORT ): + remote.run( 'test_gyro_stream()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 1 ) # MXYZ stays MXYZ with type based on the dds_stream type + test.check_equal( profiles[0].format(), rs.format.motion_xyz32f ) + test.check_equal( profiles[0].stream_type(), rs.stream.gyro ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test multiple accel profiles one stream", on_fail=test.ABORT ): + remote.run( 'test_multiple_accel_profiles()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 4 ) + for i in range( len( profiles ) ): + test.check_equal( profiles[i].format(), rs.format.motion_xyz32f ) + test.check_equal( profiles[i].stream_type(), rs.stream.accel ) + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test multiple color profiles one stream", on_fail=test.ABORT ): + remote.run( 'test_multiple_color_profiles()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 21 ) + for i in range(3): + test.check_equal( profiles[i * 7 + 0].format(), rs.format.rgb8 ) + test.check_equal( profiles[i * 7 + 1].format(), rs.format.rgba8 ) + test.check_equal( profiles[i * 7 + 2].format(), rs.format.bgr8 ) + test.check_equal( profiles[i * 7 + 3].format(), rs.format.bgra8 ) + test.check_equal( profiles[i * 7 + 4].format(), rs.format.yuyv ) + test.check_equal( profiles[i * 7 + 5].format(), rs.format.y16 ) + test.check_equal( profiles[i * 7 + 6].format(), rs.format.y8 ) + + + remote.run( 'close_server()' ) + # + ############################################################################################# + # + with test.closure( "Test multiple depth profiles one stream", on_fail=test.ABORT ): + remote.run( 'test_multiple_depth_profiles()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + + sensors = dev.query_sensors() + test.check_equal( len(sensors), 1 ) + + profiles = sensors[0].get_stream_profiles() + test.check_equal( len( profiles ), 5 ) + for i in range(5): + test.check_equal( profiles[i].format(), rs.format.z16 ) + + + remote.run( 'close_server()' ) + # + ############################################################################################# + + +context = None +test.print_results_and_exit() From 246daedb4cb8953217e265143b741cef3eae5efe Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Tue, 30 May 2023 14:21:56 +0300 Subject: [PATCH 09/19] Trigger build From 61b98cc91e576fe0e7e4526bf040a9ef69970dad Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Tue, 30 May 2023 16:20:09 +0300 Subject: [PATCH 10/19] Trigger build From 8eb143c9e582f8446a9fcbfb6cf742fa3fbeec4c Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 1 Jun 2023 10:13:51 +0300 Subject: [PATCH 11/19] Update formats conversion unit test to create a single device with multiple sensors, to avoid concurrent device discovery problem --- unit-tests/dds/formats-conversion-server.py | 187 ++++------- .../dds/test-librs-formats-converison.py | 296 +++++++----------- 2 files changed, 177 insertions(+), 306 deletions(-) diff --git a/unit-tests/dds/formats-conversion-server.py b/unit-tests/dds/formats-conversion-server.py index 113cc15847..2092d1f751 100644 --- a/unit-tests/dds/formats-conversion-server.py +++ b/unit-tests/dds/formats-conversion-server.py @@ -17,94 +17,89 @@ device_info.product_line = "D400" device_info.topic_root = "root_" + device_info.serial +# Used to created a device_server per test case, but it currently creates problems when creating a second device while +# the first did not yet close. Changing to one device_server with different sensor per test case. -def test_one_video_profile_per_stream( format_strings ): - profiles = [] +def create_server(): stream_servers = [] - counter = 0 - for format_string in format_strings: - profile = dds.video_stream_profile( 30, dds.stream_format( format_string ), 1280, 720 ) - profiles.append( profile ) - if format_string == "16UC1": - stream_server = dds.depth_stream_server( "server" + str( counter ), "sensor" ) - elif format_string == "yuv422_yuy2" or format_string == "UYVY": - stream_server = dds.color_stream_server( "server" + str( counter ), "sensor" ) - else: - stream_server = dds.ir_stream_server( "server" + str( counter ), "sensor" ) - stream_server.init_profiles( profiles, 0 ) - log.d( stream_server.profiles() ) - stream_servers.append( stream_server ) - counter = counter + 1 - - global dev_server - dev_server = dds.device_server( participant, device_info.topic_root ) - dev_server.init( stream_servers, [], {} ) - dev_server.broadcast( device_info ) + # Y8I + profile = dds.video_stream_profile( 30, dds.stream_format( "Y8I" ), 1280, 720 ) + stream_server = dds.ir_stream_server( "Y8I-stream", "Y8I-sensor" ) # Stream name is assumed to contain only index after '_', cannot use "Y8I_stream" + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) -def test_multiple_video_profiles_per_stream( format_strings, frequencies, stream_type = "depth" ): - profiles = [] - stream_servers = [] - counter = 0 - for format_string in format_strings: - profile = dds.video_stream_profile( frequencies[counter], dds.stream_format( format_string ), 1280, 720 ) - profiles.append( profile ) - counter = counter + 1 - - if stream_type == "depth": - stream_server = dds.depth_stream_server( "server", "sensor" ) - elif stream_type == "color": - stream_server = dds.color_stream_server( "server", "sensor" ) - else: - stream_server = dds.ir_stream_server( "server", "sensor" ) + # Y12I + profile = dds.video_stream_profile( 30, dds.stream_format( "Y12I" ), 1280, 720 ) + stream_server = dds.ir_stream_server( "Y12I-stream", "Y12I-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) - stream_server.init_profiles( profiles, 0 ) - log.d( stream_server.profiles() ) + # Y8 + profile = dds.video_stream_profile( 30, dds.stream_format( "mono8" ), 1280, 720 ) + stream_server = dds.ir_stream_server( "Y8-stream", "Y8-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) stream_servers.append( stream_server ) - global dev_server - dev_server = dds.device_server( participant, device_info.topic_root ) - dev_server.init( stream_servers, [], {} ) - dev_server.broadcast( device_info ) + # YUYV + profile = dds.video_stream_profile( 30, dds.stream_format( "yuv422_yuy2" ), 1280, 720 ) + stream_server = dds.color_stream_server( "YUYV-stream", "YUYV-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) + # UYVY + profile = dds.video_stream_profile( 30, dds.stream_format( "UYVY" ), 1280, 720 ) + stream_server = dds.color_stream_server( "UYVY-stream", "UYVY-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) -def test_one_motion_profile_per_stream( format_strings, stream_type = "accel" ): - profiles = [] - stream_servers = [] - counter = 0 - for format_string in format_strings: - profile = dds.motion_stream_profile( 30, dds.stream_format( format_string ) ) - profiles.append( profile ) - if stream_type == "accel": - stream_server = dds.accel_stream_server( "server" + str( counter ), "sensor" ) - else: - stream_server = dds.gyro_stream_server( "server" + str( counter ), "sensor" ) - stream_server.init_profiles( profiles, 0 ) - log.d( stream_server.profiles() ) - stream_servers.append( stream_server ) - counter = counter + 1 + # Z16 + profile = dds.video_stream_profile( 30, dds.stream_format( "16UC1" ), 1280, 720 ) + stream_server = dds.depth_stream_server( "Z16-stream", "Z16-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) - global dev_server - dev_server = dds.device_server( participant, device_info.topic_root ) - dev_server.init( stream_servers, [], {} ) - dev_server.broadcast( device_info ) + # MXYZ Accel + profile = dds.motion_stream_profile( 30, dds.stream_format( "MXYZ" ) ) + stream_server = dds.accel_stream_server( "accel-stream", "accel-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) + # MXYZ Gyro + profile = dds.motion_stream_profile( 30, dds.stream_format( "MXYZ" ) ) + stream_server = dds.gyro_stream_server( "gyro-stream", "gyro-sensor" ) + stream_server.init_profiles( [ profile ], 0 ) + stream_servers.append( stream_server ) -def test_multiple_motion_profiles_per_stream( format_strings, frequencies, stream_type = "accel" ): + + # multiple MXYZ Accel profiles = [] - stream_servers = [] - counter = 0 - for format_string in format_strings: - profile = dds.motion_stream_profile( frequencies[counter], dds.stream_format( format_string ) ) - profiles.append( profile ) - counter = counter + 1 - - if stream_type == "accel": - stream_server = dds.accel_stream_server( "server", "sensor" ) - else: - stream_server = dds.gyro_stream_server( "server", "sensor" ) + profiles.append( dds.motion_stream_profile( 63, dds.stream_format( "MXYZ" ) ) ) + profiles.append( dds.motion_stream_profile( 200, dds.stream_format( "MXYZ" ) ) ) + profiles.append( dds.motion_stream_profile( 250, dds.stream_format( "MXYZ" ) ) ) + profiles.append( dds.motion_stream_profile( 400, dds.stream_format( "MXYZ" ) ) ) + stream_server = dds.accel_stream_server( "multiple-accel-stream", "multiple-accel-sensor" ) + stream_server.init_profiles( profiles, 0 ) + stream_servers.append( stream_server ) + + # multiple color profiles + profiles = [] + profiles.append( dds.video_stream_profile( 5, dds.stream_format( "yuv422_yuy2" ), 1280, 720 ) ) + profiles.append( dds.video_stream_profile( 15, dds.stream_format( "yuv422_yuy2" ), 1280, 720 ) ) + profiles.append( dds.video_stream_profile( 30, dds.stream_format( "yuv422_yuy2" ), 1280, 720 ) ) + stream_server = dds.color_stream_server( "multiple-color-stream", "multiple-color-sensor" ) + stream_server.init_profiles( profiles, 0 ) + stream_servers.append( stream_server ) + + # multiple depth profiles + profiles = [] + profiles.append( dds.video_stream_profile( 5, dds.stream_format( "16UC1" ), 1280, 720 ) ) + profiles.append( dds.video_stream_profile( 10, dds.stream_format( "16UC1" ), 1280, 720 ) ) + profiles.append( dds.video_stream_profile( 15, dds.stream_format( "16UC1" ), 1280, 720 ) ) + profiles.append( dds.video_stream_profile( 20, dds.stream_format( "16UC1" ), 1280, 720 ) ) + profiles.append( dds.video_stream_profile( 30, dds.stream_format( "16UC1" ), 1280, 720 ) ) + stream_server = dds.depth_stream_server( "multiple-depth-stream", "multiple-depth-sensor" ) stream_server.init_profiles( profiles, 0 ) - log.d( stream_server.profiles() ) stream_servers.append( stream_server ) global dev_server @@ -112,51 +107,7 @@ def test_multiple_motion_profiles_per_stream( format_strings, frequencies, strea dev_server.init( stream_servers, [], {} ) dev_server.broadcast( device_info ) - -def test_Y8I_stream(): - test_one_video_profile_per_stream( { "Y8I" } ) - - -def test_Y12I_stream(): - test_one_video_profile_per_stream( { "Y12I" } ) - - -def test_Y8_stream(): - test_one_video_profile_per_stream( { "mono8" } ) - - -def test_YUYV_stream(): - test_one_video_profile_per_stream( { "yuv422_yuy2" } ) - - -def test_UYVY_stream(): - test_one_video_profile_per_stream( { "UYVY" } ) - - -def test_Z16_stream(): - test_one_video_profile_per_stream( { "16UC1" } ) - - -def test_accel_stream(): - test_one_motion_profile_per_stream( { "MXYZ" }, "accel" ) - - -def test_gyro_stream(): - test_one_motion_profile_per_stream( { "MXYZ" }, "gyro" ) - - -def test_multiple_accel_profiles(): - test_multiple_motion_profiles_per_stream( [ "MXYZ", "MXYZ", "MXYZ", "MXYZ" ], [ 63, 200, 250, 400 ], "accel" ) - - -def test_multiple_color_profiles(): - test_multiple_video_profiles_per_stream( [ "yuv422_yuy2", "yuv422_yuy2", "yuv422_yuy2" ], [ 5, 15, 30 ], "color" ) - - -def test_multiple_depth_profiles(): - test_multiple_video_profiles_per_stream( [ "16UC1", "16UC1", "16UC1", "16UC1", "16UC1" ], [ 5, 10, 15, 20, 30 ], "depth" ) - def close_server(): global dev_server dev_server = None diff --git a/unit-tests/dds/test-librs-formats-converison.py b/unit-tests/dds/test-librs-formats-converison.py index ee992539a6..1b90cfcd9e 100644 --- a/unit-tests/dds/test-librs-formats-converison.py +++ b/unit-tests/dds/test-librs-formats-converison.py @@ -18,241 +18,161 @@ remote_script = os.path.join( cwd, 'formats-conversion-server.py' ) with test.remote( remote_script, nested_indent=" S" ) as remote: remote.wait_until_ready() + + # Tests setup + remote.run( 'create_server()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + sensors = {sensor.get_info( rs.camera_info.name ) : sensor for sensor in dev.query_sensors()} # ############################################################################################# # with test.closure( "Test Y8 conversion", on_fail=test.ABORT ): - remote.run( 'test_Y8_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 1 ) # Y8 stays Y8, for infrared stream indexed 1 - test.check_equal( profiles[0].format(), rs.format.y8 ) - test.check_equal( profiles[0].stream_index(), 1 ) - - remote.run( 'close_server()' ) + if test.check( 'Y8-sensor' in sensors ): + sensor = sensors.get('Y8-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 1 ) # Y8 stays Y8, for infrared stream indexed 1 + test.check_equal( profiles[0].format(), rs.format.y8 ) + test.check_equal( profiles[0].stream_index(), 1 ) # ############################################################################################# # with test.closure( "Test Y8I conversion", on_fail=test.ABORT ): - remote.run( 'test_Y8I_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 2 ) # Y8I is converted into two Y8 streams - test.check_equal( profiles[0].format(), rs.format.y8 ) - test.check_equal( profiles[0].stream_index(), 1 ) - test.check_equal( profiles[1].format(), rs.format.y8 ) - test.check_equal( profiles[1].stream_index(), 2 ) - - remote.run( 'close_server()' ) + if test.check( 'Y8I-sensor' in sensors ): + sensor = sensors.get('Y8I-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 2 ) # Y8I is converted into two Y8 streams + test.check_equal( profiles[0].format(), rs.format.y8 ) + test.check_equal( profiles[0].stream_index(), 1 ) + test.check_equal( profiles[1].format(), rs.format.y8 ) + test.check_equal( profiles[1].stream_index(), 2 ) # ############################################################################################# # with test.closure( "Test Y12I conversion", on_fail=test.ABORT ): - remote.run( 'test_Y12I_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 2 ) # Y12I is converted into two Y162 streams - test.check_equal( profiles[0].format(), rs.format.y16 ) - test.check_equal( profiles[0].stream_index(), 1 ) - test.check_equal( profiles[1].format(), rs.format.y16 ) - test.check_equal( profiles[1].stream_index(), 2 ) - - remote.run( 'close_server()' ) + if test.check( 'Y12I-sensor' in sensors ): + sensor = sensors.get('Y12I-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 2 ) # Y12I is converted into two Y162 streams + test.check_equal( profiles[0].format(), rs.format.y16 ) + test.check_equal( profiles[0].stream_index(), 1 ) + test.check_equal( profiles[1].format(), rs.format.y16 ) + test.check_equal( profiles[1].stream_index(), 2 ) # ############################################################################################# # with test.closure( "Test YUYV conversion", on_fail=test.ABORT ): - remote.run( 'test_YUYV_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 7 ) # YUYV is converted into 7 streams - RGB8, RGBA8, BGR8, BGRA8, YUYV, Y16, Y8 - test.check_equal( profiles[0].format(), rs.format.rgb8 ) - test.check_equal( profiles[1].format(), rs.format.rgba8 ) - test.check_equal( profiles[2].format(), rs.format.bgr8 ) - test.check_equal( profiles[3].format(), rs.format.bgra8 ) - test.check_equal( profiles[4].format(), rs.format.yuyv ) - test.check_equal( profiles[5].format(), rs.format.y16 ) - test.check_equal( profiles[6].format(), rs.format.y8 ) + if test.check( 'YUYV-sensor' in sensors ): + sensor = sensors.get('YUYV-sensor') + profiles = sensor.get_stream_profiles() - - remote.run( 'close_server()' ) + test.check_equal( len( profiles ), 7 ) # YUYV is converted into 7 streams - RGB8, RGBA8, BGR8, BGRA8, YUYV, Y16, Y8 + test.check_equal( profiles[0].format(), rs.format.rgb8 ) + test.check_equal( profiles[1].format(), rs.format.rgba8 ) + test.check_equal( profiles[2].format(), rs.format.bgr8 ) + test.check_equal( profiles[3].format(), rs.format.bgra8 ) + test.check_equal( profiles[4].format(), rs.format.yuyv ) + test.check_equal( profiles[5].format(), rs.format.y16 ) + test.check_equal( profiles[6].format(), rs.format.y8 ) # ############################################################################################# # with test.closure( "Test UYVY conversion", on_fail=test.ABORT ): - remote.run( 'test_UYVY_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 5 ) # UYVY is converted into 5 streams - RGB8, RGBA8, BGR8, BGRA8, UYVY - test.check_equal( profiles[0].format(), rs.format.rgb8 ) - test.check_equal( profiles[1].format(), rs.format.rgba8 ) - test.check_equal( profiles[2].format(), rs.format.bgr8 ) - test.check_equal( profiles[3].format(), rs.format.bgra8 ) - test.check_equal( profiles[4].format(), rs.format.uyvy ) + if test.check( 'UYVY-sensor' in sensors ): + sensor = sensors.get('UYVY-sensor') + profiles = sensor.get_stream_profiles() - - remote.run( 'close_server()' ) + test.check_equal( len( profiles ), 5 ) # UYVY is converted into 5 streams - RGB8, RGBA8, BGR8, BGRA8, UYVY + test.check_equal( profiles[0].format(), rs.format.rgb8 ) + test.check_equal( profiles[1].format(), rs.format.rgba8 ) + test.check_equal( profiles[2].format(), rs.format.bgr8 ) + test.check_equal( profiles[3].format(), rs.format.bgra8 ) + test.check_equal( profiles[4].format(), rs.format.uyvy ) # ############################################################################################# # with test.closure( "Test Z16 conversion", on_fail=test.ABORT ): - remote.run( 'test_Z16_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 1 ) # Z16 stays Z16, for depth stream type - test.check_equal( profiles[0].format(), rs.format.z16 ) - test.check_equal( profiles[0].stream_type(), rs.stream.depth ) - - remote.run( 'close_server()' ) + if test.check( 'Z16-sensor' in sensors ): + sensor = sensors.get('Z16-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 1 ) # Z16 stays Z16, for depth stream type + test.check_equal( profiles[0].format(), rs.format.z16 ) + test.check_equal( profiles[0].stream_type(), rs.stream.depth ) # ############################################################################################# # with test.closure( "Test accel conversion", on_fail=test.ABORT ): - remote.run( 'test_accel_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 1 ) # MXYZ stays MXYZ with type based on the dds_stream type - test.check_equal( profiles[0].format(), rs.format.motion_xyz32f ) - test.check_equal( profiles[0].stream_type(), rs.stream.accel ) - - remote.run( 'close_server()' ) + if test.check( 'accel-sensor' in sensors ): + sensor = sensors.get('accel-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 1 ) # MXYZ stays MXYZ with type based on the dds_stream type + test.check_equal( profiles[0].format(), rs.format.motion_xyz32f ) + test.check_equal( profiles[0].stream_type(), rs.stream.accel ) # ############################################################################################# # with test.closure( "Test gyro conversion", on_fail=test.ABORT ): - remote.run( 'test_gyro_stream()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 1 ) # MXYZ stays MXYZ with type based on the dds_stream type - test.check_equal( profiles[0].format(), rs.format.motion_xyz32f ) - test.check_equal( profiles[0].stream_type(), rs.stream.gyro ) - - remote.run( 'close_server()' ) + if test.check( 'gyro-sensor' in sensors ): + sensor = sensors.get('gyro-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 1 ) # MXYZ stays MXYZ with type based on the dds_stream type + test.check_equal( profiles[0].format(), rs.format.motion_xyz32f ) + test.check_equal( profiles[0].stream_type(), rs.stream.gyro ) # ############################################################################################# # with test.closure( "Test multiple accel profiles one stream", on_fail=test.ABORT ): - remote.run( 'test_multiple_accel_profiles()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 4 ) - for i in range( len( profiles ) ): - test.check_equal( profiles[i].format(), rs.format.motion_xyz32f ) - test.check_equal( profiles[i].stream_type(), rs.stream.accel ) - - remote.run( 'close_server()' ) + if test.check( 'multiple-accel-sensor' in sensors ): + sensor = sensors.get('multiple-accel-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 4 ) + for i in range( len( profiles ) ): + test.check_equal( profiles[i].format(), rs.format.motion_xyz32f ) + test.check_equal( profiles[i].stream_type(), rs.stream.accel ) # ############################################################################################# # with test.closure( "Test multiple color profiles one stream", on_fail=test.ABORT ): - remote.run( 'test_multiple_color_profiles()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 21 ) - for i in range(3): - test.check_equal( profiles[i * 7 + 0].format(), rs.format.rgb8 ) - test.check_equal( profiles[i * 7 + 1].format(), rs.format.rgba8 ) - test.check_equal( profiles[i * 7 + 2].format(), rs.format.bgr8 ) - test.check_equal( profiles[i * 7 + 3].format(), rs.format.bgra8 ) - test.check_equal( profiles[i * 7 + 4].format(), rs.format.yuyv ) - test.check_equal( profiles[i * 7 + 5].format(), rs.format.y16 ) - test.check_equal( profiles[i * 7 + 6].format(), rs.format.y8 ) - - - remote.run( 'close_server()' ) + if test.check( 'multiple-color-sensor' in sensors ): + sensor = sensors.get('multiple-color-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 21 ) + for i in range(3): + test.check_equal( profiles[i * 7 + 0].format(), rs.format.rgb8 ) + test.check_equal( profiles[i * 7 + 1].format(), rs.format.rgba8 ) + test.check_equal( profiles[i * 7 + 2].format(), rs.format.bgr8 ) + test.check_equal( profiles[i * 7 + 3].format(), rs.format.bgra8 ) + test.check_equal( profiles[i * 7 + 4].format(), rs.format.yuyv ) + test.check_equal( profiles[i * 7 + 5].format(), rs.format.y16 ) + test.check_equal( profiles[i * 7 + 6].format(), rs.format.y8 ) # ############################################################################################# # with test.closure( "Test multiple depth profiles one stream", on_fail=test.ABORT ): - remote.run( 'test_multiple_depth_profiles()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - - sensors = dev.query_sensors() - test.check_equal( len(sensors), 1 ) - - profiles = sensors[0].get_stream_profiles() - test.check_equal( len( profiles ), 5 ) - for i in range(5): - test.check_equal( profiles[i].format(), rs.format.z16 ) - - - remote.run( 'close_server()' ) + if test.check( 'multiple-depth-sensor' in sensors ): + sensor = sensors.get('multiple-depth-sensor') + profiles = sensor.get_stream_profiles() + + test.check_equal( len( profiles ), 5 ) + for i in range(5): + test.check_equal( profiles[i].format(), rs.format.z16 ) # ############################################################################################# - - + # + # Tests tear down + remote.run( 'close_server()' ) + dev = None + context = None + test.print_results_and_exit() From 29d7fbca16b1e53d4ae4674d1a5c0274ad5a0ee5 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 1 Jun 2023 11:02:58 +0300 Subject: [PATCH 12/19] Trigger build From 2e0c3f0a94169bf5f2a4e8b1684b3974c794d1df Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 1 Jun 2023 12:05:05 +0300 Subject: [PATCH 13/19] Trigger build From 2daa1791ee606c10b216b3f314ac3ec4faaa38cc Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 1 Jun 2023 12:18:05 +0300 Subject: [PATCH 14/19] Trigger build From e879e1ff7ce5b806a710f0f4d107473e4fbc7673 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Mon, 5 Jun 2023 12:41:51 +0300 Subject: [PATCH 15/19] Handle PR#11850 comments --- src/dds/rs-dds-device-proxy.cpp | 12 ++- src/dds/rs-dds-internal-data.cpp | 98 +------------------ src/dds/rs-dds-internal-data.h | 13 ++- src/dds/rs-dds-sensor-proxy.cpp | 2 +- src/dds/rs-dds-sensor-proxy.h | 7 +- unit-tests/dds/formats-conversion-server.py | 2 +- .../dds/test-librs-formats-converison.py | 24 ++--- 7 files changed, 40 insertions(+), 118 deletions(-) diff --git a/src/dds/rs-dds-device-proxy.cpp b/src/dds/rs-dds-device-proxy.cpp index b3cfd72462..fd2018eb0c 100644 --- a/src/dds/rs-dds-device-proxy.cpp +++ b/src/dds/rs-dds-device-proxy.cpp @@ -136,6 +136,12 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ int sensor_index = 0; }; std::map< std::string, sensor_info > sensor_name_to_info; + + // dds_streams bear stream type and index information, we add it to a dds_sensor_proxy mapped by a newly generated + // unique ID. After the sensor initialization we get all the "final" profiles from formats-converter with type and + // index but without IDs. We need to find the dds_stream that each profile was created from so we create a map from + // type and index to dds_stream ID and index, because the dds_sensor_proxy holds a map from sidx to dds_stream. We + // need both the ID from that map key and the stream itself (for intrinsics information) std::map< sid_index, sid_index > type_and_index_to_dds_stream_sidx; _dds_dev->foreach_stream( @@ -295,13 +301,11 @@ int dds_device_proxy::get_index_from_stream_name( const std::string & name ) con void dds_device_proxy::set_profile_intrinsics( std::shared_ptr< stream_profile_interface > & profile, const std::shared_ptr< realdds::dds_stream > & stream ) const { - auto video_stream = std::dynamic_pointer_cast< realdds::dds_video_stream >( stream ); - auto motion_stream = std::dynamic_pointer_cast< realdds::dds_motion_stream >( stream ); - if( video_stream ) + if( auto video_stream = std::dynamic_pointer_cast< realdds::dds_video_stream >( stream ) ) { set_video_profile_intrinsics( profile, video_stream ); } - if( motion_stream ) + else if( auto motion_stream = std::dynamic_pointer_cast< realdds::dds_motion_stream >( stream ) ) { set_motion_profile_intrinsics( profile, motion_stream ); } diff --git a/src/dds/rs-dds-internal-data.cpp b/src/dds/rs-dds-internal-data.cpp index 09ac156830..3451d2b197 100644 --- a/src/dds/rs-dds-internal-data.cpp +++ b/src/dds/rs-dds-internal-data.cpp @@ -43,8 +43,8 @@ std::vector< rs2_format > target_formats( rs2_format source_format ) return formats; } -std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( std::string product_id, - std::string product_line ) +std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( const std::string & product_id, + const std::string & product_line ) { std::vector tags; @@ -95,22 +95,6 @@ std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( std::stri tags.push_back( { RS2_STREAM_INFRARED, 1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); tags.push_back( { RS2_STREAM_INFRARED, 2, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); } - else if( product_line == "L500" ) - { - tags.push_back( { RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - tags.push_back( { RS2_STREAM_INFRARED, -1, 640, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - tags.push_back( { RS2_STREAM_CONFIDENCE, -1, 640, 480, RS2_FORMAT_RAW8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); - tags.push_back( { RS2_STREAM_DEPTH, -1, -1, -1, RS2_FORMAT_FG, -1, profile_tag::PROFILE_TAG_DEBUG } ); - tags.push_back( { RS2_STREAM_COLOR, -1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - tags.push_back( { RS2_STREAM_GYRO, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 200, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - tags.push_back( { RS2_STREAM_ACCEL, -1, 0, 0, RS2_FORMAT_MOTION_XYZ32F, 200, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - } - else if( product_line == "SR300" ) - { - tags.push_back( { RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - tags.push_back( { RS2_STREAM_INFRARED, -1, 640, 480, RS2_FORMAT_Y8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); - tags.push_back( { RS2_STREAM_COLOR, -1, 1920, 1080, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); - } else throw std::runtime_error( "Unsupported product id or product line" ); @@ -118,8 +102,8 @@ std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( std::stri } -std::vector< processing_block_factory > dds_rs_internal_data::get_profile_converters( std::string product_id, - std::string product_line ) +std::vector< processing_block_factory > dds_rs_internal_data::get_profile_converters( const std::string & product_id, + const std::string & product_line ) { std::vector< processing_block_factory > factories; std::vector< processing_block_factory > tmp; @@ -185,80 +169,6 @@ std::vector< processing_block_factory > dds_rs_internal_data::get_profile_conver { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, []() { return std::make_shared< identity_processing_block >(); } } ); } - //else if( product_line == "L500" ) - //{ - // processing_block_factory::create_pbf_vector< yuy2_converter >( RS2_FORMAT_YUYV, map_supported_color_formats( RS2_FORMAT_YUYV ), RS2_STREAM_COLOR ); - // ( - // { {RS2_FORMAT_Z16}, {RS2_FORMAT_Y8} }, - // { {RS2_FORMAT_Z16, RS2_STREAM_DEPTH, 0, 0, 0, 0, &rotate_resolution} }, - // [=]() { - // auto z16rot = std::make_shared( RS2_FORMAT_Z16, RS2_STREAM_DEPTH, RS2_EXTENSION_DEPTH_FRAME ); - // auto y8rot = std::make_shared( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, RS2_EXTENSION_VIDEO_FRAME ); - // auto sync = std::make_shared( nullptr, false ); // disable logging on this internal syncer - - // auto cpb = std::make_shared(); - // cpb->add( z16rot ); - // cpb->add( y8rot ); - // cpb->add( sync ); - // cpb->add( std::make_shared< filtering_processing_block >( RS2_STREAM_DEPTH ) ); - // return cpb; - // } - // ); - // ( - // { {RS2_FORMAT_Z16}, {RS2_FORMAT_Y8}, {RS2_FORMAT_RAW8} }, - // { - // {RS2_FORMAT_Z16, RS2_STREAM_DEPTH, 0, 0, 0, 0, &rotate_resolution}, - // {RS2_FORMAT_RAW8, RS2_STREAM_CONFIDENCE, 0, 0, 0, 0, &l500_confidence_resolution} - // }, - // [=]() { - // auto z16rot = std::make_shared( RS2_FORMAT_Z16, RS2_STREAM_DEPTH, RS2_EXTENSION_DEPTH_FRAME ); - // auto y8rot = std::make_shared( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, RS2_EXTENSION_VIDEO_FRAME ); - // auto conf = std::make_shared(); - // auto sync = std::make_shared( nullptr, false ); // disable logging on this internal syncer - - // auto cpb = std::make_shared(); - // cpb->add( z16rot ); - // cpb->add( y8rot ); - // cpb->add( conf ); - // cpb->add( sync ); - // cpb->add( std::shared_ptr< filtering_processing_block >( - // new filtering_processing_block { RS2_STREAM_DEPTH, RS2_STREAM_CONFIDENCE } ) ); - // return cpb; - // } - // ); - // ( - // { {RS2_FORMAT_Y8} }, - // { {RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 0, 0, 0, 0, &rotate_resolution} }, - // []() { return std::make_shared( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, RS2_EXTENSION_VIDEO_FRAME ); } - // ); - // ( - // { {RS2_FORMAT_RAW8} }, - // { {RS2_FORMAT_RAW8, RS2_STREAM_CONFIDENCE, 0, 0, 0, 0, &l500_confidence_resolution} }, - // []() { return std::make_shared(); } - // ); - // ( processing_block_factory::create_id_pbf( RS2_FORMAT_FG, RS2_STREAM_DEPTH ) ); - // ( - // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL} }, - // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_ACCEL} }, - // [&, mm_correct_opt]() { return std::make_shared( _mm_calib, mm_correct_opt ); } - // ); - // ( - // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO} }, - // { {RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO} }, - // [&, mm_correct_opt]() { return std::make_shared( _mm_calib, mm_correct_opt ); } - // ); - //} - //else if( product_line == "SR300" ) - //{ - // processing_block_factory::create_pbf_vector( RS2_FORMAT_UYVY, map_supported_color_formats( RS2_FORMAT_UYVY ), RS2_STREAM_COLOR ); - // processing_block_factory::create_pbf_vector( RS2_FORMAT_YUYV, map_supported_color_formats( RS2_FORMAT_YUYV ), RS2_STREAM_COLOR ); - // ( { { RS2_FORMAT_INVI } }, { { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y8 ); } ); - // ( { { RS2_FORMAT_INVI } }, { { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y16 ); } ); - // ( { { RS2_FORMAT_INZI } }, { { RS2_FORMAT_Z16, RS2_STREAM_DEPTH }, { RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y8 ); } ); - // ( { { RS2_FORMAT_INZI } }, { { RS2_FORMAT_Z16, RS2_STREAM_DEPTH }, { RS2_FORMAT_Y16, RS2_STREAM_INFRARED, 1 } }, []() {return std::make_shared( RS2_FORMAT_Y16 ); } ); - // processing_block_factory::create_id_pbf( RS2_FORMAT_Y8, RS2_STREAM_INFRARED, 1 ); - // processing_block_factory::create_id_pbf( RS2_FORMAT_Z16, RS2_STREAM_DEPTH ); - //} else throw std::runtime_error( "Unsupported product id or product line" ); diff --git a/src/dds/rs-dds-internal-data.h b/src/dds/rs-dds-internal-data.h index cb81957977..4c3e13f196 100644 --- a/src/dds/rs-dds-internal-data.h +++ b/src/dds/rs-dds-internal-data.h @@ -9,12 +9,19 @@ namespace librealsense { + +// librealsense initializes each device type with a device specific information - what are the device raw formats and +// to what profiles we can convert them, what are the default profiles, intrinsics information etc... +// This data is stored in the specific device and sensor classes constructor or initialization functions. +// Currently we did not want to send it as a realdds supported topic, so this class stores all the data needed for DDS +// devices in one place. class dds_rs_internal_data { public: - static std::vector< tagged_profile > get_profiles_tags( std::string product_id, std::string product_line ); - static std::vector< processing_block_factory > get_profile_converters( std::string product_id, - std::string product_line ); + static std::vector< tagged_profile > get_profiles_tags( const std::string & product_id, + const std::string & product_line ); + static std::vector< processing_block_factory > get_profile_converters( const std::string & product_id, + const std::string & product_line ); }; diff --git a/src/dds/rs-dds-sensor-proxy.cpp b/src/dds/rs-dds-sensor-proxy.cpp index 473b83c1a4..8a6fba7adf 100644 --- a/src/dds/rs-dds-sensor-proxy.cpp +++ b/src/dds/rs-dds-sensor-proxy.cpp @@ -106,7 +106,7 @@ std::shared_ptr< stream_profile_interface > dds_sensor_proxy::add_motion_stream( } -void dds_sensor_proxy::initialization_done( std::string product_id, std::string product_line ) +void dds_sensor_proxy::initialization_done( const std::string & product_id, const std::string & product_line ) { auto converters = dds_rs_internal_data::get_profile_converters( product_id, product_line ); _formats_converter.register_converters( converters ); diff --git a/src/dds/rs-dds-sensor-proxy.h b/src/dds/rs-dds-sensor-proxy.h index 91f4ea6956..191e6bf9a4 100644 --- a/src/dds/rs-dds-sensor-proxy.h +++ b/src/dds/rs-dds-sensor-proxy.h @@ -52,8 +52,8 @@ class dds_sensor_proxy : public software_sensor std::map< std::string, streaming_impl > _streaming_by_name; formats_converter _formats_converter; - // DDS profiles are stored in _streams, _source_rs_profiles stores librealsense representation of them, - // software_device::_profiles stores librealsense profiles after conversion + // DDS profiles are stored in _streams, _raw_rs_profiles stores librealsense representation of them, + // software_device::_profiles stores librealsense profiles after conversion from raw to a user friendly format. stream_profiles _raw_rs_profiles; public: @@ -66,7 +66,8 @@ class dds_sensor_proxy : public software_sensor void add_dds_stream( sid_index sidx, std::shared_ptr< realdds::dds_stream > const & stream ); std::shared_ptr add_video_stream( rs2_video_stream video_stream, bool is_default ) override; std::shared_ptr add_motion_stream( rs2_motion_stream motion_stream, bool is_default ) override; - void initialization_done( std::string product_id, std::string product_line ); // Not adding streams or profiles after this + // Not adding streams or profiles after this + void initialization_done( const std::string & product_id, const std::string & product_line ); void open( const stream_profiles & profiles ) override; void start( frame_callback_ptr callback ) override; diff --git a/unit-tests/dds/formats-conversion-server.py b/unit-tests/dds/formats-conversion-server.py index 2092d1f751..d07b7fbbb7 100644 --- a/unit-tests/dds/formats-conversion-server.py +++ b/unit-tests/dds/formats-conversion-server.py @@ -12,7 +12,7 @@ participant.init( 123, "formats-conversion-server" ) device_info = dds.device_info() -device_info.name = "formats-coversion-device" +device_info.name = "formats-conversion-device" device_info.serial = "123" device_info.product_line = "D400" device_info.topic_root = "root_" + device_info.serial diff --git a/unit-tests/dds/test-librs-formats-converison.py b/unit-tests/dds/test-librs-formats-converison.py index 1b90cfcd9e..6a17a82fd2 100644 --- a/unit-tests/dds/test-librs-formats-converison.py +++ b/unit-tests/dds/test-librs-formats-converison.py @@ -1,5 +1,5 @@ # License: Apache 2.0. See LICENSE file in root directory. -# Copyright(c) 2022 Intel Corporation. All Rights Reserved. +# Copyright(c) 2023 Intel Corporation. All Rights Reserved. #test:donotrun:!dds @@ -29,7 +29,7 @@ # ############################################################################################# # - with test.closure( "Test Y8 conversion", on_fail=test.ABORT ): + with test.closure( "Test Y8 conversion", on_fail=test.RAISE ): if test.check( 'Y8-sensor' in sensors ): sensor = sensors.get('Y8-sensor') profiles = sensor.get_stream_profiles() @@ -40,7 +40,7 @@ # ############################################################################################# # - with test.closure( "Test Y8I conversion", on_fail=test.ABORT ): + with test.closure( "Test Y8I conversion", on_fail=test.RAISE ): if test.check( 'Y8I-sensor' in sensors ): sensor = sensors.get('Y8I-sensor') profiles = sensor.get_stream_profiles() @@ -53,7 +53,7 @@ # ############################################################################################# # - with test.closure( "Test Y12I conversion", on_fail=test.ABORT ): + with test.closure( "Test Y12I conversion", on_fail=test.RAISE ): if test.check( 'Y12I-sensor' in sensors ): sensor = sensors.get('Y12I-sensor') profiles = sensor.get_stream_profiles() @@ -66,7 +66,7 @@ # ############################################################################################# # - with test.closure( "Test YUYV conversion", on_fail=test.ABORT ): + with test.closure( "Test YUYV conversion", on_fail=test.RAISE ): if test.check( 'YUYV-sensor' in sensors ): sensor = sensors.get('YUYV-sensor') profiles = sensor.get_stream_profiles() @@ -82,7 +82,7 @@ # ############################################################################################# # - with test.closure( "Test UYVY conversion", on_fail=test.ABORT ): + with test.closure( "Test UYVY conversion", on_fail=test.RAISE ): if test.check( 'UYVY-sensor' in sensors ): sensor = sensors.get('UYVY-sensor') profiles = sensor.get_stream_profiles() @@ -96,7 +96,7 @@ # ############################################################################################# # - with test.closure( "Test Z16 conversion", on_fail=test.ABORT ): + with test.closure( "Test Z16 conversion", on_fail=test.RAISE ): if test.check( 'Z16-sensor' in sensors ): sensor = sensors.get('Z16-sensor') profiles = sensor.get_stream_profiles() @@ -107,7 +107,7 @@ # ############################################################################################# # - with test.closure( "Test accel conversion", on_fail=test.ABORT ): + with test.closure( "Test accel conversion", on_fail=test.RAISE ): if test.check( 'accel-sensor' in sensors ): sensor = sensors.get('accel-sensor') profiles = sensor.get_stream_profiles() @@ -118,7 +118,7 @@ # ############################################################################################# # - with test.closure( "Test gyro conversion", on_fail=test.ABORT ): + with test.closure( "Test gyro conversion", on_fail=test.RAISE ): if test.check( 'gyro-sensor' in sensors ): sensor = sensors.get('gyro-sensor') profiles = sensor.get_stream_profiles() @@ -129,7 +129,7 @@ # ############################################################################################# # - with test.closure( "Test multiple accel profiles one stream", on_fail=test.ABORT ): + with test.closure( "Test multiple accel profiles one stream", on_fail=test.RAISE ): if test.check( 'multiple-accel-sensor' in sensors ): sensor = sensors.get('multiple-accel-sensor') profiles = sensor.get_stream_profiles() @@ -141,7 +141,7 @@ # ############################################################################################# # - with test.closure( "Test multiple color profiles one stream", on_fail=test.ABORT ): + with test.closure( "Test multiple color profiles one stream", on_fail=test.RAISE ): if test.check( 'multiple-color-sensor' in sensors ): sensor = sensors.get('multiple-color-sensor') profiles = sensor.get_stream_profiles() @@ -158,7 +158,7 @@ # ############################################################################################# # - with test.closure( "Test multiple depth profiles one stream", on_fail=test.ABORT ): + with test.closure( "Test multiple depth profiles one stream", on_fail=test.RAISE ): if test.check( 'multiple-depth-sensor' in sensors ): sensor = sensors.get('multiple-depth-sensor') profiles = sensor.get_stream_profiles() From 645cf35ef1f9bdb56e654bbe85fd54b3499991c4 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Mon, 5 Jun 2023 14:01:42 +0300 Subject: [PATCH 16/19] Handle devices other then D400 (use identity converters) --- src/dds/rs-dds-internal-data.cpp | 10 +++++----- src/dds/rs-dds-sensor-proxy.cpp | 12 ++++++++++++ src/dds/rs-dds-sensor-proxy.h | 2 ++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/dds/rs-dds-internal-data.cpp b/src/dds/rs-dds-internal-data.cpp index 3451d2b197..c7b6a72cc4 100644 --- a/src/dds/rs-dds-internal-data.cpp +++ b/src/dds/rs-dds-internal-data.cpp @@ -46,7 +46,7 @@ std::vector< rs2_format > target_formats( rs2_format source_format ) std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( const std::string & product_id, const std::string & product_line ) { - std::vector tags; + std::vector< tagged_profile > tags; if( product_id == RS405_PID ) { @@ -95,8 +95,8 @@ std::vector< tagged_profile > dds_rs_internal_data::get_profiles_tags( const std tags.push_back( { RS2_STREAM_INFRARED, 1, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT } ); tags.push_back( { RS2_STREAM_INFRARED, 2, 1280, 720, RS2_FORMAT_RGB8, 30, profile_tag::PROFILE_TAG_SUPERSET } ); } - else - throw std::runtime_error( "Unsupported product id or product line" ); + + // For other devices empty tags will be returned, no default profile defined. return tags; } @@ -169,8 +169,8 @@ std::vector< processing_block_factory > dds_rs_internal_data::get_profile_conver { { RS2_FORMAT_MOTION_XYZ32F, RS2_STREAM_GYRO } }, []() { return std::make_shared< identity_processing_block >(); } } ); } - else - throw std::runtime_error( "Unsupported product id or product line" ); + + // For other devices empty factories will be returned, raw profiles will be used. return factories; } diff --git a/src/dds/rs-dds-sensor-proxy.cpp b/src/dds/rs-dds-sensor-proxy.cpp index 8a6fba7adf..8ee7cdd61b 100644 --- a/src/dds/rs-dds-sensor-proxy.cpp +++ b/src/dds/rs-dds-sensor-proxy.cpp @@ -109,6 +109,7 @@ std::shared_ptr< stream_profile_interface > dds_sensor_proxy::add_motion_stream( void dds_sensor_proxy::initialization_done( const std::string & product_id, const std::string & product_line ) { auto converters = dds_rs_internal_data::get_profile_converters( product_id, product_line ); + handle_no_converters( converters ); _formats_converter.register_converters( converters ); _profiles = _formats_converter.get_all_possible_profiles( _raw_rs_profiles ); @@ -117,6 +118,17 @@ void dds_sensor_proxy::initialization_done( const std::string & product_id, cons } +void dds_sensor_proxy::handle_no_converters( std::vector & converters ) +{ + if( converters.empty() ) + // Create "identity converter" for each raw profile + for( auto & raw_profile : _raw_rs_profiles ) + converters.push_back( processing_block_factory::create_id_pbf( raw_profile->get_format(), + raw_profile->get_stream_type(), + raw_profile->get_stream_index() ) ); +} + + void dds_sensor_proxy::tag_profiles( const std::vector & tags ) { for( auto & profile : _profiles ) diff --git a/src/dds/rs-dds-sensor-proxy.h b/src/dds/rs-dds-sensor-proxy.h index 191e6bf9a4..fbac9f2fc3 100644 --- a/src/dds/rs-dds-sensor-proxy.h +++ b/src/dds/rs-dds-sensor-proxy.h @@ -84,6 +84,8 @@ class dds_sensor_proxy : public software_sensor const std::map< sid_index, std::shared_ptr< realdds::dds_stream > > & streams() const { return _streams; } private: + void handle_no_converters( std::vector & converters ); + void tag_profiles( const std::vector & tags ); std::shared_ptr< realdds::dds_video_stream_profile > From f823dabf68079ddd406da6a546f76cc30e7d6129 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Wed, 14 Jun 2023 10:53:38 +0300 Subject: [PATCH 17/19] handling some more PR#11850 comments --- src/dds/rs-dds-device-proxy.cpp | 4 ++ .../dds/test-librs-device-properties.py | 14 +++---- ...on.py => test-librs-formats-conversion.py} | 38 ++++++++++--------- 3 files changed, 31 insertions(+), 25 deletions(-) rename unit-tests/dds/{test-librs-formats-converison.py => test-librs-formats-conversion.py} (89%) diff --git a/src/dds/rs-dds-device-proxy.cpp b/src/dds/rs-dds-device-proxy.cpp index fd2018eb0c..67a8e82111 100644 --- a/src/dds/rs-dds-device-proxy.cpp +++ b/src/dds/rs-dds-device-proxy.cpp @@ -223,7 +223,11 @@ dds_device_proxy::dds_device_proxy( std::shared_ptr< context > ctx, std::shared_ sid_index sidx = type_and_index_to_dds_stream_sidx[type_and_index]; auto stream_iter = streams.find( sidx ); if( stream_iter == streams.end() ) + { + LOG_DEBUG( "Did not find dds_stream of profile (" << profile->get_stream_type() << ", " + << profile->get_stream_index() << ")" ); continue; + } profile->set_unique_id( stream_iter->first.sid ); set_profile_intrinsics( profile, stream_iter->second ); diff --git a/unit-tests/dds/test-librs-device-properties.py b/unit-tests/dds/test-librs-device-properties.py index 8a0fd00b7c..3bc2a6b12c 100644 --- a/unit-tests/dds/test-librs-device-properties.py +++ b/unit-tests/dds/test-librs-device-properties.py @@ -41,13 +41,13 @@ test.check_equal( len(sensors), 3 ) if test.check( 'Stereo Module' in sensors ): sensor = sensors.get('Stereo Module') - test.check_equal( len(sensor.get_stream_profiles()), 104 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 104 ) # As measured running rs-sensor-control example if test.check( 'RGB Camera' in sensors ): sensor = sensors['RGB Camera'] - test.check_equal( len(sensor.get_stream_profiles()), 225 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 225 ) # As measured running rs-sensor-control example if test.check( 'Motion Module' in sensors ): sensor = sensors['Motion Module'] - test.check_equal( len(sensor.get_stream_profiles()), 4 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 4 ) # As measured running rs-sensor-control example remote.run( 'close_server( instance )' ) except: test.unexpected_exception() @@ -70,7 +70,7 @@ test.check_equal( len(sensors), 1 ) if test.check( 'Stereo Module' in sensors ): sensor = sensors.get('Stereo Module') - test.check_equal( len(sensor.get_stream_profiles()), 431 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 431 ) # As measured running rs-sensor-control example remote.run( 'close_server( instance )' ) except: test.unexpected_exception() @@ -93,13 +93,13 @@ test.check_equal( len(sensors), 3 ) if test.check( 'Stereo Module' in sensors ): sensor = sensors.get('Stereo Module') - test.check_equal( len(sensor.get_stream_profiles()), 245 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 245 ) # As measured running rs-sensor-control example if test.check( 'RGB Camera' in sensors ): sensor = sensors['RGB Camera'] - test.check_equal( len(sensor.get_stream_profiles()), 218 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 218 ) # As measured running rs-sensor-control example if test.check( 'Motion Module' in sensors ): sensor = sensors['Motion Module'] - test.check_equal( len(sensor.get_stream_profiles()), 4 ) # As mesured running rs-sensor-control example + test.check_equal( len(sensor.get_stream_profiles()), 4 ) # As measured running rs-sensor-control example remote.run( 'close_server( instance )' ) except: test.unexpected_exception() diff --git a/unit-tests/dds/test-librs-formats-converison.py b/unit-tests/dds/test-librs-formats-conversion.py similarity index 89% rename from unit-tests/dds/test-librs-formats-converison.py rename to unit-tests/dds/test-librs-formats-conversion.py index 6a17a82fd2..c91fa3182b 100644 --- a/unit-tests/dds/test-librs-formats-converison.py +++ b/unit-tests/dds/test-librs-formats-conversion.py @@ -19,17 +19,19 @@ with test.remote( remote_script, nested_indent=" S" ) as remote: remote.wait_until_ready() - # Tests setup - remote.run( 'create_server()' ) - n_devs = 0 - for dev in dds.wait_for_devices( context, only_sw_devices ): - n_devs += 1 - test.check_equal( n_devs, 1 ) - sensors = {sensor.get_info( rs.camera_info.name ) : sensor for sensor in dev.query_sensors()} + ############################################################################################# + # + with test.closure( "Test setup", on_fail=test.ABORT ): + remote.run( 'create_server()' ) + n_devs = 0 + for dev in dds.wait_for_devices( context, only_sw_devices ): + n_devs += 1 + test.check_equal( n_devs, 1 ) + sensors = {sensor.get_info( rs.camera_info.name ) : sensor for sensor in dev.query_sensors()} # ############################################################################################# # - with test.closure( "Test Y8 conversion", on_fail=test.RAISE ): + with test.closure( "Test Y8 conversion"): if test.check( 'Y8-sensor' in sensors ): sensor = sensors.get('Y8-sensor') profiles = sensor.get_stream_profiles() @@ -40,7 +42,7 @@ # ############################################################################################# # - with test.closure( "Test Y8I conversion", on_fail=test.RAISE ): + with test.closure( "Test Y8I conversion"): if test.check( 'Y8I-sensor' in sensors ): sensor = sensors.get('Y8I-sensor') profiles = sensor.get_stream_profiles() @@ -53,7 +55,7 @@ # ############################################################################################# # - with test.closure( "Test Y12I conversion", on_fail=test.RAISE ): + with test.closure( "Test Y12I conversion"): if test.check( 'Y12I-sensor' in sensors ): sensor = sensors.get('Y12I-sensor') profiles = sensor.get_stream_profiles() @@ -66,7 +68,7 @@ # ############################################################################################# # - with test.closure( "Test YUYV conversion", on_fail=test.RAISE ): + with test.closure( "Test YUYV conversion"): if test.check( 'YUYV-sensor' in sensors ): sensor = sensors.get('YUYV-sensor') profiles = sensor.get_stream_profiles() @@ -82,7 +84,7 @@ # ############################################################################################# # - with test.closure( "Test UYVY conversion", on_fail=test.RAISE ): + with test.closure( "Test UYVY conversion"): if test.check( 'UYVY-sensor' in sensors ): sensor = sensors.get('UYVY-sensor') profiles = sensor.get_stream_profiles() @@ -96,7 +98,7 @@ # ############################################################################################# # - with test.closure( "Test Z16 conversion", on_fail=test.RAISE ): + with test.closure( "Test Z16 conversion"): if test.check( 'Z16-sensor' in sensors ): sensor = sensors.get('Z16-sensor') profiles = sensor.get_stream_profiles() @@ -107,7 +109,7 @@ # ############################################################################################# # - with test.closure( "Test accel conversion", on_fail=test.RAISE ): + with test.closure( "Test accel conversion"): if test.check( 'accel-sensor' in sensors ): sensor = sensors.get('accel-sensor') profiles = sensor.get_stream_profiles() @@ -118,7 +120,7 @@ # ############################################################################################# # - with test.closure( "Test gyro conversion", on_fail=test.RAISE ): + with test.closure( "Test gyro conversion"): if test.check( 'gyro-sensor' in sensors ): sensor = sensors.get('gyro-sensor') profiles = sensor.get_stream_profiles() @@ -129,7 +131,7 @@ # ############################################################################################# # - with test.closure( "Test multiple accel profiles one stream", on_fail=test.RAISE ): + with test.closure( "Test multiple accel profiles one stream"): if test.check( 'multiple-accel-sensor' in sensors ): sensor = sensors.get('multiple-accel-sensor') profiles = sensor.get_stream_profiles() @@ -141,7 +143,7 @@ # ############################################################################################# # - with test.closure( "Test multiple color profiles one stream", on_fail=test.RAISE ): + with test.closure( "Test multiple color profiles one stream"): if test.check( 'multiple-color-sensor' in sensors ): sensor = sensors.get('multiple-color-sensor') profiles = sensor.get_stream_profiles() @@ -158,7 +160,7 @@ # ############################################################################################# # - with test.closure( "Test multiple depth profiles one stream", on_fail=test.RAISE ): + with test.closure( "Test multiple depth profiles one stream"): if test.check( 'multiple-depth-sensor' in sensors ): sensor = sensors.get('multiple-depth-sensor') profiles = sensor.get_stream_profiles() From 4372d4e2fc3cf1cec9fbafd43c9c9cbc247da28e Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 15 Jun 2023 09:50:47 +0300 Subject: [PATCH 18/19] Trigger build From 3395e70964fe6bc5582d052a1295eb455e229b9a Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 15 Jun 2023 16:17:15 +0300 Subject: [PATCH 19/19] Trigger build