23 using namespace device_serializer;
37 catch (
const std::exception&
e)
54 return std::make_shared<serialized_end_of_file>();
77 return std::make_shared<serialized_option>(
timestamp, sensor_id, option.first, option.second);
82 LOG_DEBUG(
"Next message is a notification");
86 return std::make_shared<serialized_notification>(
timestamp, sensor_id, notification);
90 std::string err_msg =
to_string() <<
"Unknown message type: " << next_msg.getDataType() <<
"(Topic: " << next_msg.getTopic() <<
")";
101 auto seek_time_as_secs = std::chrono::duration_cast<std::chrono::duration<double>>(seek_time);
118 std::vector<std::shared_ptr<serialized_data>>
result;
127 std::map<device_serializer::stream_identifier, rs2rosinternal::Time> last_frames;
128 for (
auto&&
m : view)
133 last_frames[
id] =
m.getTime();
136 for (
auto&&
kvp : last_frames)
140 auto msg = view.
begin();
142 result.push_back(new_frame);
177 start_time = sample_msg.
getTime();
198 for (
auto topic : currently_streaming)
220 curr_time = sample_msg.
getTime();
224 for (
auto topic : currently_streaming)
231 bool should_topic_remain = (
it == stream_ids.end());
232 if (should_topic_remain)
248 auto next_msg_topic = msg.
getTopic();
249 auto next_msg_time = msg.
getTime();
290 std::function<bool(rosbag::ConnectionInfo const* info)>
query;
307 assert(frame_metadata_view.size() <= 1);
308 for (
auto message_instance : frame_metadata_view)
310 auto info = instantiate_msg<realsense_legacy_msgs::frame_info>(message_instance);
311 for (
auto&& fmd :
info->frame_metadata)
327 if (total_md_size + size_of_enum + size_of_data > 255)
331 memcpy(additional_data.
metadata_blob.data() + total_md_size, &
type, size_of_enum);
332 total_md_size +=
static_cast<uint32_t>(size_of_enum);
334 total_md_size +=
static_cast<uint32_t>(size_of_data);
342 catch (
const std::exception&
e)
344 LOG_WARNING(
"Failed to get timestamp_domain. Error: " << e.what());
356 std::map<std::string, std::string> remaining;
359 for (
auto message_instance : frame_metadata_view)
361 auto key_val_msg = instantiate_msg<diagnostic_msgs::KeyValue>(message_instance);
366 remaining[key_val_msg->key] = key_val_msg->value;
373 remaining[key_val_msg->key] = key_val_msg->value;
381 remaining[key_val_msg->key] = key_val_msg->value;
387 remaining[key_val_msg->key] = key_val_msg->value;
392 if (total_md_size + size_of_enum + size_of_data > 255)
396 memcpy(additional_data.
metadata_blob.data() + total_md_size, &
type, size_of_enum);
397 total_md_size +=
static_cast<uint32_t>(size_of_enum);
398 memcpy(additional_data.
metadata_blob.data() + total_md_size, &md, size_of_data);
399 total_md_size +=
static_cast<uint32_t>(size_of_data);
408 LOG_DEBUG(
"Trying to create an image frame from message");
409 auto msg = instantiate_msg<sensor_msgs::Image>(
image_data);
411 std::chrono::duration<double, std::milli> timestamp_ms(std::chrono::duration<double>(msg->header.stamp.toSec()));
412 additional_data.timestamp = timestamp_ms.count();
413 additional_data.frame_number = msg->header.seq;
414 additional_data.fisheye_ae_mode =
false;
432 msg->data.size(), additional_data,
true);
433 if (frame ==
nullptr)
439 video_frame->
assign(msg->width, msg->height, msg->step, msg->step / msg->width * 8);
441 convert(msg->encoding, stream_format);
444 frame->
get_stream()->set_format(stream_format);
449 LOG_DEBUG(
"Created image frame: " << stream_id <<
" " << video_frame->
get_width() <<
"x" << video_frame->
get_height() <<
" " << stream_format);
456 LOG_DEBUG(
"Trying to create a motion frame from message");
458 auto msg = instantiate_msg<sensor_msgs::Imu>(motion_data);
461 std::chrono::duration<double, std::milli> timestamp_ms(std::chrono::duration<double>(msg->header.stamp.toSec()));
462 additional_data.timestamp = timestamp_ms.count();
463 additional_data.frame_number = msg->header.seq;
464 additional_data.fisheye_ae_mode =
false;
482 if (frame ==
nullptr)
495 auto data =
reinterpret_cast<float*
>(motion_frame->
data.data());
496 data[0] =
static_cast<float>(msg->linear_acceleration.x);
497 data[1] =
static_cast<float>(msg->linear_acceleration.y);
498 data[2] =
static_cast<float>(msg->linear_acceleration.z);
499 LOG_DEBUG(
"RS2_STREAM_ACCEL " << motion_frame);
503 auto data =
reinterpret_cast<float*
>(motion_frame->
data.data());
504 data[0] =
static_cast<float>(msg->angular_velocity.x);
505 data[1] =
static_cast<float>(msg->angular_velocity.y);
506 data[2] =
static_cast<float>(msg->angular_velocity.z);
507 LOG_DEBUG(
"RS2_STREAM_GYRO " << motion_frame);
514 LOG_DEBUG(
"Created motion frame: " << stream_id);
540 LOG_DEBUG(
"Trying to create a pose frame from message");
543 std::chrono::duration<double, std::milli> timestamp_ms;
544 size_t frame_size =
sizeof(
pose);
554 auto pose_msg = instantiate_msg<realsense_legacy_msgs::pose>(msg);
557 pose.angular_acceleration =
to_float3(pose_msg->angular_acceleration);
559 pose.angular_velocity =
to_float3(pose_msg->angular_velocity);
562 timestamp_ms = std::chrono::duration<double, std::milli>(
static_cast<double>(pose_msg->timestamp));
566 assert(msg.
getTopic().find(
"pose/transform") != std::string::npos);
568 auto transform_msg = instantiate_msg<geometry_msgs::Transform>(msg);
573 assert(accel_view.size() == 1);
574 auto accel_msg = instantiate_msg<geometry_msgs::Accel>(*accel_view.begin());
578 assert(twist_view.size() == 1);
579 auto twist_msg = instantiate_msg<geometry_msgs::Twist>(*twist_view.begin());
602 for (
auto&&
kvp : remaining)
611 double ts = std::strtod(iss.str().c_str(),
NULL);
612 timestamp_ms = std::chrono::duration<double, std::milli>(ts);
625 additional_data.timestamp = timestamp_ms.count();
628 if (new_frame ==
nullptr)
640 memcpy(data, &
pose, frame_size);
642 LOG_DEBUG(
"Created new frame " << frame_type);
653 if (legacy_view.
size() == 0 && view.
size() == 0)
655 throw io_exception(
to_string() <<
"Invalid file format, file does not contain topic \"" << version_topic <<
"\" nor \"" << legacy_version_topic <<
"\"");
658 if (view.
size() != 0)
660 auto item = *view.
begin();
661 auto msg = instantiate_msg<std_msgs::UInt32>(item);
664 throw std::runtime_error(
to_string() <<
"Unsupported file version \"" << msg->data <<
"\"");
668 else if (legacy_view.
size() != 0)
670 auto item = *legacy_view.
begin();
671 auto msg = instantiate_msg<std_msgs::UInt32>(item);
674 throw std::runtime_error(
to_string() <<
"Unsupported legacy file version \"" << msg->data <<
"\"");
678 throw std::logic_error(
"Unreachable code path");
696 if (extrinsics_view.
size() == 0)
700 for (
auto&& msg : extrinsics_view)
704 auto msi_msg = instantiate_msg<realsense_legacy_msgs::motion_stream_info>(msg);
706 if (stream_id.
stream_type != parsed_stream_id.type || stream_id.
stream_index != static_cast<uint32_t>(parsed_stream_id.index))
711 std::end(msi_msg->stream_extrinsics.extrinsics.rotation),
714 std::end(msi_msg->stream_extrinsics.extrinsics.translation),
716 group_id =
static_cast<uint32_t>(msi_msg->stream_extrinsics.reference_point_id);
721 auto si_msg = instantiate_msg<realsense_legacy_msgs::stream_info>(msg);
723 if (stream_id.
stream_type != parsed_stream_id.type || stream_id.
stream_index != static_cast<uint32_t>(parsed_stream_id.index))
728 std::end(si_msg->stream_extrinsics.extrinsics.rotation),
731 std::end(si_msg->stream_extrinsics.extrinsics.translation),
733 group_id =
static_cast<uint32_t>(si_msg->stream_extrinsics.reference_point_id);
739 "Expected either \"realsense_legacy_msgs::motion_stream_info\" or \"realsense_legacy_msgs::stream_info\", but got " 740 << msg.getDataType());
752 if (tf_view.
size() == 0)
757 auto msg = *tf_view.
begin();
758 auto tf_msg = instantiate_msg<geometry_msgs::Transform>(msg);
768 LOG_DEBUG(
"Not updating options from legacy files");
791 LOG_DEBUG(
"Legacy file - processing blocks are not supported");
795 if (options_snapshot ==
nullptr)
797 LOG_WARNING(
"Recorded file does not contain sensor options");
799 auto options_api = As<options_interface>(options_snapshot);
800 if (options_api ==
nullptr)
851 auto it = option_view.begin();
853 auto depth_to_disparity =
true;
857 while (
it != option_view.end())
868 if (sensor_name.compare(
"Stereo Module") == 0 || sensor_name.compare(
"Coded-Light Depth Sensor") == 0)
875 if (sensor_name.compare(
"RGB Camera") == 0)
882 if (sensor_name.compare(
"Motion Module") == 0)
889 if (sensor_name.compare(
"Wide FOV Camera") == 0)
900 return pid == ds5_pid;
908 std::vector<int> sr300_PIDs =
915 auto it = std::find_if(sr300_PIDs.begin(), sr300_PIDs.end(), [&](
int sr300_pid)
917 return pid == sr300_pid;
920 return it != sr300_PIDs.end();
930 std::stringstream ss;
933 ss >> std::hex >> int_pid;
947 return std::make_shared<recommended_proccesing_blocks_snapshot>(
processing_blocks{});
949 throw io_exception(
"Unrecognized sensor name" + sensor_name);
974 return std::make_shared<recommended_proccesing_blocks_snapshot>(
processing_blocks{});
981 std::shared_ptr<recommended_proccesing_blocks_snapshot>
res;
994 auto depth_to_disparity =
true;
997 while (
it != option_view.
end())
1003 blocks.push_back(block);
1006 res = std::make_shared<recommended_proccesing_blocks_snapshot>(blocks);
1022 std::vector<sensor_snapshot> sensor_descriptions;
1024 std::map<stream_identifier, std::pair<uint32_t, rs2_extrinsics>> extrinsics_map;
1026 for (
auto sensor_index : sensor_indices)
1037 extrinsics_map[
stream_id] = std::make_pair(reference_id, stream_extrinsic);
1042 std::shared_ptr<info_container> sensor_info;
1068 sensor_descriptions.emplace_back(sensor_index, sensor_extensions, streams_snapshots);
1081 auto& sensor_extensions =
sensor.get_sensor_extensions_snapshots();
1090 std::map<rs2_camera_info, std::string>
values;
1092 auto infos = std::make_shared<info_container>();
1095 for (
auto message_instance : view)
1097 auto info_msg = instantiate_msg<realsense_legacy_msgs::vendor_data>(message_instance);
1103 infos->register_info(info, info_msg->value);
1106 catch (
const std::exception&
e)
1116 auto infos = std::make_shared<info_container>();
1124 std::map<rs2_camera_info, std::string>
values;
1126 for (
auto message_instance : view)
1133 infos->register_info(info, info_msg->value);
1135 catch (
const std::exception&
e)
1146 std::set<uint32_t> sensor_indices;
1150 if (device_info.
size() == 0)
1152 throw io_exception(
"Missing sensor count message for legacy file");
1154 for (
auto info : device_info)
1156 auto msg = instantiate_msg<realsense_legacy_msgs::vendor_data>(
info);
1157 if (msg->name ==
"sensor_count")
1159 int sensor_count =
std::stoi(msg->value);
1160 while (--sensor_count >= 0)
1161 sensor_indices.insert(sensor_count);
1168 for (
auto sensor_info : sensor_infos)
1170 auto msg = instantiate_msg<diagnostic_msgs::KeyValue>(sensor_info);
1174 return sensor_indices;
1180 profile->set_stream_index(stream_index);
1190 profile->set_stream_index(stream_index);
1191 profile->set_stream_type(stream_type);
1202 auto profile = std::make_shared<video_stream_profile>(sp);
1238 for (
auto infos_msg : stream_infos_view)
1242 auto motion_stream_info_msg = instantiate_msg<realsense_legacy_msgs::motion_stream_info>(infos_msg);
1243 auto fps = motion_stream_info_msg->fps;
1245 std::string stream_name = motion_stream_info_msg->motion_type;
1255 auto stream_info_msg = instantiate_msg<realsense_legacy_msgs::stream_info>(infos_msg);
1256 auto fps = stream_info_msg->fps;
1258 convert(stream_info_msg->encoding, format);
1259 std::string stream_name = stream_info_msg->stream_type;
1263 stream_info_msg->camera_info,
1270 <<
"Invalid file format, expected " 1273 <<
" message but got: " << infos_msg.getDataType()
1274 <<
"(Topic: " << infos_msg.getTopic() <<
")");
1278 std::vector<uint32_t>
indices;
1281 std::regex r(R
"RRR(/camera/rs_6DoF(\d+)/\d+)RRR"); 1283 if (std::regex_search(topic, sm, r))
1285 for (
int i = 1;
i < sm.size();
i++)
1291 for (
auto&&
index : indices)
1308 for (
auto infos_view : stream_infos_view)
1316 auto stream_info_msg = instantiate_msg<realsense_msgs::StreamInfo>(infos_view);
1318 auto fps = stream_info_msg->fps;
1320 convert(stream_info_msg->encoding, format);
1324 if (video_stream_infos_view.
size() > 0)
1327 auto video_stream_msg_ptr = *video_stream_infos_view.
begin();
1328 auto video_stream_msg = instantiate_msg<sensor_msgs::CameraInfo>(video_stream_msg_ptr);
1331 , *video_stream_msg,
1333 streams.push_back(profile);
1338 if (imu_intrinsic_view.
size() > 0)
1341 auto motion_intrinsics_msg = instantiate_msg<realsense_msgs::ImuIntrinsic>(*imu_intrinsic_view.
begin());
1358 throw io_exception(
to_string() <<
"Every StreamInfo is expected to have a complementary video/imu message, but none was found");
1367 if (option_description_view.
size() == 0)
1369 LOG_ERROR(
"File does not contain topics for: " << topic);
1373 auto description_message_instance = *option_description_view.
begin();
1374 auto option_desc_msg = instantiate_msg<std_msgs::String>(description_message_instance);
1375 return option_desc_msg->data;
1381 auto property_msg = instantiate_msg<diagnostic_msgs::KeyValue>(property_message_instance);
1383 convert(property_msg->key,
id);
1386 return std::make_pair(
id, std::make_shared<const_value_option>(description, value));
1392 auto option_value_msg = instantiate_msg<std_msgs::Float32>(value_message_instance);
1393 auto value_topic = value_message_instance.
getTopic();
1397 std::replace(option_name.begin(), option_name.end(),
'_',
' ');
1399 float value = option_value_msg->data;
1400 auto description_topic = value_topic.replace(value_topic.find_last_of(
"value") -
sizeof(
"value") + 2,
sizeof(
"value"),
"description");
1402 return std::make_pair(
id, std::make_shared<const_value_option>(description, value));
1407 auto processing_block_msg = instantiate_msg<std_msgs::String>(value_message_instance);
1409 convert(processing_block_msg->data,
id);
1410 std::shared_ptr<librealsense::processing_block_interface>
disparity;
1420 depth_to_disparity =
false;
1445 auto intrinsic_msg = instantiate_msg<std_msgs::Float32MultiArray>(value_message_instance);
1454 auto notification_msg = instantiate_msg<realsense_msgs::Notification>(message_instance);
1457 convert(notification_msg->category, category);
1458 convert(notification_msg->severity, severity);
1460 notification n(category, type, severity, notification_msg->description);
1468 auto options = std::make_shared<options_container>();
1469 if (file_version == 2)
1472 for (
auto message_instance : sensor_options_view)
1475 options->register_option(id_option.first, id_option.second);
1487 auto alternate_value_topic = value_topic;
1488 alternate_value_topic.replace(value_topic.find(option_name), option_name.length(), rs2_option_name);
1490 std::vector<std::string> option_topics{ value_topic, alternate_value_topic };
1492 auto it = option_view.
begin();
1493 if (
it == option_view.
end())
1498 while (
it != option_view.
end())
1512 std::vector<std::string> topics;
1513 if (view !=
nullptr)
1515 auto connections = view->getConnections();
l500_depth_data create_l500_intrinsic_depth(const rosbag::MessageInstance &value_message_instance)
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
static processing_blocks get_sr300_depth_recommended_proccesing_blocks()
static std::string frame_data_topic(const device_serializer::stream_identifier &stream_id)
float stof(const std::string &value)
static std::string post_processing_blocks_topic(const device_serializer::sensor_identifier &sensor_id)
constexpr const char * FRAME_NUMBER_MD_STR
metadata parser class - support metadata in format: rs2_frame_metadata_value, rs2_metadata_type ...
std::istringstream istringstream
nanoseconds query_duration() const override
static std::string l500_data_blocks_topic(const device_serializer::sensor_identifier &sensor_id)
GLenum GLuint GLenum severity
static bool safe_convert(const std::string &key, T &val)
intrinsic_per_resolution intrinsic_resolution[MAX_NUM_OF_DEPTH_RESOLUTIONS]
std::shared_ptr< recommended_proccesing_blocks_snapshot > read_proccesing_blocks_for_version_under_4(std::string pid, std::string sensor_name, std::shared_ptr< options_interface > options)
rs2rosinternal::Time getEndTime()
static std::string sensor_info_topic(const device_serializer::sensor_identifier &sensor_id)
bool try_read_stream_extrinsic(const stream_identifier &stream_id, uint32_t &group_id, rs2_extrinsics &extrinsic) const
device_snapshot read_device_description(const nanoseconds &time, bool reset=false)
processing_blocks get_ds5_depth_recommended_proccesing_blocks()
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
uint8_t num_of_resolutions
static std::string get_option_name(const std::string &topic)
static float4 to_float4(const geometry_msgs::Quaternion &q)
void open(std::string const &filename, uint32_t mode=bagmode::Read)
Open a bag file.
device_serializer::nanoseconds to_nanoseconds(const rs2rosinternal::Time &t)
rs2_distortion
Distortion model: defines how pixel coordinates should be mapped to sensor coordinates.
rs2rosinternal::Time to_rostime(const device_serializer::nanoseconds &t)
ros_reader(const std::string &file, const std::shared_ptr< context > &ctx)
static std::shared_ptr< librealsense::processing_block_interface > create_processing_block(const rosbag::MessageInstance &value_message_instance, bool &depth_to_disparity, std::shared_ptr< options_interface > options)
const char * rs2_option_to_string(rs2_option option)
constexpr const char * FRAME_TIMESTAMP_MD_STR
nanoseconds m_total_duration
static notification create_notification(const rosbag::Bag &file, const rosbag::MessageInstance &message_instance)
const char * rs2_distortion_to_string(rs2_distortion distortion)
processing_blocks get_color_recommended_proccesing_blocks()
frame_holder create_image_from_message(const rosbag::MessageInstance &image_data) const
virtual void enable_stream(const std::vector< device_serializer::stream_identifier > &stream_ids) override
static uint32_t get_sensor_index(const std::string &topic)
static std::string video_stream_info_topic(const device_serializer::stream_identifier &stream_id)
static std::shared_ptr< options_container > read_sensor_options(const rosbag::Bag &file, device_serializer::sensor_identifier sensor_id, const nanoseconds ×tamp, uint32_t file_version)
const uint16_t SR300v2_PID
void convert(rs2_format source, std::string &target)
std::shared_ptr< recommended_proccesing_blocks_snapshot > read_proccesing_blocks(const rosbag::Bag &file, device_serializer::sensor_identifier sensor_id, const nanoseconds ×tamp, std::shared_ptr< options_interface > options, uint32_t file_version, std::string pid, std::string sensor_name)
static processing_blocks get_l500_recommended_proccesing_blocks()
static std::string device_info_topic(uint32_t device_id)
GLsizei const GLchar *const * string
bool is_l500_PID(int pid)
constexpr const char * TRACKER_CONFIDENCE_MD_STR
static float3 to_float3(const geometry_msgs::Vector3 &v)
Specialize to provide the datatype for a message.
std::unique_ptr< rosbag::View > m_samples_view
stream_profiles read_legacy_stream_info(uint32_t sensor_index) const
An iterator that points to a MessageInstance from a bag.
stream_profiles read_stream_info(uint32_t device_index, uint32_t sensor_index) const
rs2rosinternal::Time getBeginTime()
static std::pair< rs2_option, std::shared_ptr< librealsense::option > > create_option(const rosbag::Bag &file, const rosbag::MessageInstance &value_message_instance)
device_snapshot m_initial_device_description
virtual void disable_stream(const std::vector< device_serializer::stream_identifier > &stream_ids) override
static void get_legacy_frame_metadata(const rosbag::Bag &bag, const device_serializer::stream_identifier &stream_id, const rosbag::MessageInstance &msg, frame_additional_data &additional_data)
::realsense_legacy_msgs::pose_< std::allocator< void > > pose
std::shared_ptr< info_container > read_info_snapshot(const std::string &topic) const
std::shared_ptr< frame_source > m_frame_source
void close()
Close the bag file.
static device_serializer::stream_identifier get_stream_identifier(const std::string &topic)
def info(name, value, persistent=False)
rs2rosinternal::Time const & getTime() const
Duration representation for use with the Time class.
std::set< uint32_t > read_sensor_indices(uint32_t device_index) const
std::shared_ptr< ::diagnostic_msgs::KeyValue const > KeyValueConstPtr
static std::shared_ptr< motion_stream_profile > create_motion_stream(rs2_stream stream_type, uint32_t stream_index, uint32_t fps, rs2_format format, rs2_motion_device_intrinsic intrinsics)
GLsizei GLenum const void * indices
resolutions_depth resolution
std::vector< std::string > m_enabled_streams_topics
static std::map< std::string, std::string > get_frame_metadata(const rosbag::Bag &bag, const std::string &topic, const device_serializer::stream_identifier &stream_id, const rosbag::MessageInstance &msg, frame_additional_data &additional_data)
bool isType() const
Test whether the underlying message of the specified type.
static device_serializer::sensor_identifier get_sensor_identifier(const std::string &topic)
ivcam2::intrinsic_depth ros_l500_depth_data_to_intrinsic_depth(ros_reader::l500_depth_data data)
std::shared_ptr< serialized_frame > create_frame(const rosbag::MessageInstance &msg)
std::shared_ptr< extension_snapshot > find(rs2_extension t) const
static const std::set< std::uint16_t > rs400_sku_pid
std::shared_ptr< metadata_parser_map > m_metadata_parser_map
A class pointing into a bag file.
static std::string pose_accel_topic(const device_serializer::stream_identifier &stream_id)
static uint32_t read_file_version(const rosbag::Bag &file)
GLint GLint GLsizei GLint GLenum format
bool is_depth_sensor(std::string sensor_name)
Time representation. May either represent wall clock time or ROS clock time.
rs2_format
A stream's format identifies how binary data is encoded within a frame.
static std::string file_version_topic()
const std::string & get_file_name() const override
static std::string property_topic(const device_serializer::sensor_identifier &sensor_id)
void seek_to_time(const nanoseconds &seek_time) override
constexpr const char * SYSTEM_TIME_MD_STR
static std::string imu_intrinsic_topic(const device_serializer::stream_identifier &stream_id)
void add_sensor_extension(snapshot_collection &sensor_extensions, std::string sensor_name)
static std::string read_option_description(const rosbag::Bag &file, const std::string &topic)
constexpr const char * MAPPER_CONFIDENCE_MD_STR
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
rs2_stream
Streams are different types of data provided by RealSense devices.
constexpr const char * TIMESTAMP_DOMAIN_MD_STR
std::chrono::duration< uint64_t, std::nano > nanoseconds
static void update_sensor_options(const rosbag::Bag &file, uint32_t sensor_index, const nanoseconds &time, uint32_t file_version, snapshot_collection &sensor_extensions, uint32_t version)
static std::string pose_twist_topic(const device_serializer::stream_identifier &stream_id)
std::shared_ptr< serialized_data > read_next_data() override
std::vector< std::shared_ptr< serialized_data > > fetch_last_frames(const nanoseconds &seek_time) override
static std::string frame_metadata_topic(const device_serializer::stream_identifier &stream_id)
GLsizei const GLfloat * values
_distortion_model_type distortion_model
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented...
virtual std::shared_ptr< stream_profile_interface > get_stream() const =0
std::shared_ptr< info_container > read_legacy_info_snapshot(uint32_t sensor_index) const
void assign(int width, int height, int stride, int bpp)
GLdouble GLdouble GLdouble q
constexpr device_serializer::nanoseconds get_static_file_info_timestamp()
static nanoseconds get_file_duration(const rosbag::Bag &file, uint32_t version)
static std::string option_value_topic(const device_serializer::sensor_identifier &sensor_id, rs2_option option_type)
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
ROSTIME_DECL const Time TIME_MIN
static std::pair< rs2_option, std::shared_ptr< librealsense::option > > create_property(const rosbag::MessageInstance &property_message_instance)
rs2_notification_category
Category of the librealsense notification.
long long rs2_metadata_type
iterator end()
Default constructed iterator signifies end.
rs2_timestamp_domain timestamp_domain
constexpr uint32_t get_minimum_supported_file_version()
void update_l500_depth_sensor(const rosbag::Bag &file, uint32_t sensor_index, const nanoseconds &time, uint32_t file_version, snapshot_collection &sensor_extensions, uint32_t version, std::string pid, std::string sensor_name)
std::string const & getTopic() const
static uint32_t get_extrinsic_group_index(const std::string &topic)
iterator begin()
Simply copy the merge_queue state into the iterator.
std::string serialized_data
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
void update_proccesing_blocks(const rosbag::Bag &file, uint32_t sensor_index, const nanoseconds &time, uint32_t file_version, snapshot_collection &sensor_extensions, uint32_t version, std::string pid, std::string sensor_name)
device_snapshot query_device_description(const nanoseconds &time) override
bool is_fisheye_module_sensor(std::string sensor_name)
std::string const & getDataType() const
bool is_color_sensor(std::string sensor_name)
int stoi(const std::string &value)
Motion device intrinsics: scale, bias, and variances.
bool is_motion_module_sensor(std::string sensor_name)
static std::shared_ptr< video_stream_profile > create_video_stream_profile(const platform::stream_profile &sp, const sensor_msgs::CameraInfo &ci, const stream_descriptor &sd)
rosbag::View::iterator m_samples_itrator
GLuint GLenum GLenum transform
frame_holder create_pose_sample(const rosbag::MessageInstance &msg) const
bool try_read_legacy_stream_extrinsic(const stream_identifier &stream_id, uint32_t &group_id, rs2_extrinsics &extrinsic) const
frame_holder create_motion_sample(const rosbag::MessageInstance &motion_data) const
::std_msgs::Time_< std::allocator< void > > Time
void addQuery(Bag const &bag, rs2rosinternal::Time const &start_time=rs2rosinternal::TIME_MIN, rs2rosinternal::Time const &end_time=rs2rosinternal::TIME_MAX)
Add a query to a view.
rs2_log_severity
Severity of the librealsense logger.
std::array< uint8_t, MAX_META_DATA_SIZE > metadata_blob
std::vector< sensor_snapshot > get_sensors_snapshots() const
pinhole_camera_model pinhole_cam_model
static std::vector< std::string > get_topics(std::unique_ptr< rosbag::View > &view)
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
void copy(void *dst, void const *src, size_t size)
l500_data_per_resolution data[MAX_NUM_OF_DEPTH_RESOLUTIONS]
constexpr uint32_t get_device_index()
bool is_sr300_PID(int pid)
virtual void set_stream(std::shared_ptr< stream_profile_interface > sp)=0
unsigned long stoul(const std::string &value)
static std::string stream_full_prefix(const device_serializer::stream_identifier &stream_id)
static std::shared_ptr< pose_stream_profile > create_pose_profile(uint32_t stream_index, uint32_t fps)
std::string to_string(T value)