Skip to content

Commit 86f3ec9

Browse files
authored
PR realsenseai#15054 from AviaAv: Support playback of native ROS2 .db3 recordings
2 parents c5a6089 + f31b5ba commit 86f3ec9

15 files changed

Lines changed: 2766 additions & 308 deletions

common/stream-model.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,13 +1001,20 @@ namespace rs2
10011001

10021002

10031003
//add_descriptions_for_d500_metadata_fields(descriptions);
1004-
std::string pid = this->dev->dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID);
1005-
if (pid == "0B6B")
1006-
add_d585S_metadata_descriptions(descriptions);
1007-
1008-
std::string connection_type = this->dev->dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
1009-
if (connection_type == "DDS")
1010-
add_dds_metadata_descriptions(descriptions);
1004+
std::string pid;
1005+
if (dev)
1006+
{
1007+
pid = dev->dev.get_info(RS2_CAMERA_INFO_PRODUCT_ID);
1008+
if (pid == "0B6B")
1009+
add_d585S_metadata_descriptions(descriptions);
1010+
1011+
if (dev->dev.supports(RS2_CAMERA_INFO_CONNECTION_TYPE))
1012+
{
1013+
std::string connection_type = dev->dev.get_info(RS2_CAMERA_INFO_CONNECTION_TYPE);
1014+
if (connection_type == "DDS")
1015+
add_dds_metadata_descriptions(descriptions);
1016+
}
1017+
}
10111018

10121019
for (auto i = 0; i < RS2_FRAME_METADATA_COUNT; i++)
10131020
{

src/media/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ if(BUILD_ROSBAG2)
3333
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_file_format.h"
3434
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_writer.h"
3535
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_writer.cpp"
36+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_reader_base.h"
37+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_reader_base.cpp"
3638
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_reader.h"
3739
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_reader.cpp"
40+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_native_reader.h"
41+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2_native_reader.cpp"
3842
# ROS2 message types for CDR serialization
3943
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/builtin_interfaces/msg/Time.h"
4044
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/builtin_interfaces/msg/Time.cpp"
@@ -48,5 +52,9 @@ if(BUILD_ROSBAG2)
4852
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/Image.cpp"
4953
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/Imu.h"
5054
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/Imu.cpp"
55+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/RegionOfInterest.h"
56+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/RegionOfInterest.cpp"
57+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/CameraInfo.h"
58+
"${CMAKE_CURRENT_LIST_DIR}/ros2/ros2-msg-types/sensor_msgs/msg/CameraInfo.cpp"
5159
)
5260
endif()

0 commit comments

Comments
 (0)