11 using namespace device_serializer;
18 std::shared_ptr<serialized_data> read_next_data()
override;
19 void seek_to_time(
const nanoseconds& seek_time)
override;
20 std::vector<std::shared_ptr<serialized_data>> fetch_last_frames(
const nanoseconds& seek_time)
override;
22 void reset()
override;
23 virtual void enable_stream(
const std::vector<device_serializer::stream_identifier>& stream_ids)
override;
24 virtual void disable_stream(
const std::vector<device_serializer::stream_identifier>& stream_ids)
override;
29 template <
typename ROS_TYPE>
32 typename ROS_TYPE::ConstPtr msg_instnance_ptr = msg.
instantiate<ROS_TYPE>();
33 if (msg_instnance_ptr ==
nullptr)
36 <<
"Invalid file format, expected " 39 <<
"(Topic: " << msg.
getTopic() <<
")");
41 return msg_instnance_ptr;
46 static void get_legacy_frame_metadata(
const rosbag::Bag& bag,
59 catch (
const std::exception&
e)
66 static std::map<std::string, std::string> get_frame_metadata(
const rosbag::Bag& bag,
86 bool is_motion_module_sensor(
std::string sensor_name);
87 bool is_fisheye_module_sensor(
std::string sensor_name);
88 bool is_ds5_PID(
int pid);
89 bool is_sr300_PID(
int pid);
90 bool is_l500_PID(
int pid);
91 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);
95 std::shared_ptr<info_container> read_legacy_info_snapshot(
uint32_t sensor_index)
const;
96 std::shared_ptr<info_container> read_info_snapshot(
const std::string& topic)
const;
97 std::set<uint32_t> read_sensor_indices(
uint32_t device_index)
const;
98 static std::shared_ptr<pose_stream_profile> create_pose_profile(
uint32_t stream_index,
uint32_t fps);
108 static std::pair<rs2_option, std::shared_ptr<librealsense::option>> create_property(
const rosbag::MessageInstance& property_message_instance);
111 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);
133 static std::vector<std::string> get_topics(std::unique_ptr<rosbag::View>&
view);
static bool safe_convert(const std::string &key, T &val)
nanoseconds m_total_duration
void convert(rs2_format source, std::string &target)
GLsizei const GLchar *const * string
Specialize to provide the datatype for a message.
std::unique_ptr< rosbag::View > m_samples_view
An iterator that points to a MessageInstance from a bag.
device_snapshot m_initial_device_description
std::shared_ptr< frame_source > m_frame_source
std::vector< std::string > m_enabled_streams_topics
std::shared_ptr< metadata_parser_map > m_metadata_parser_map
A class pointing into a bag file.
GLint GLint GLsizei GLint GLenum format
rs2_format
A stream's format identifies how binary data is encoded within a frame.
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
rs2_stream
Streams are different types of data provided by RealSense devices.
static ROS_TYPE::ConstPtr instantiate_msg(const rosbag::MessageInstance &msg)
std::chrono::duration< uint64_t, std::nano > nanoseconds
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented...
std::string get_file_name(const std::string &path)
GLdouble GLdouble GLdouble q
std::string const & getTopic() const
std::string const & getDataType() const
std::shared_ptr< context > m_context
Motion device intrinsics: scale, bias, and variances.
rosbag::View::iterator m_samples_itrator
static const int MAX_NUM_OF_DEPTH_RESOLUTIONS
std::shared_ptr< T > instantiate() const
Templated call to instantiate a message.
std::string to_string(T value)