Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
librealsense::ros_writer Class Reference

#include <ros_writer.h>

Inheritance diagram for librealsense::ros_writer:
Inheritance graph
[legend]

Public Member Functions

const std::stringget_file_name () const override
 
 ros_writer (const std::string &file, bool compress_while_record)
 
void write_device_description (const librealsense::device_snapshot &device_description) override
 
void write_frame (const stream_identifier &stream_id, const nanoseconds &timestamp, frame_holder &&frame) override
 
void write_snapshot (uint32_t device_index, const nanoseconds &timestamp, rs2_extension type, const std::shared_ptr< extension_snapshot > &snapshot) override
 
void write_snapshot (const sensor_identifier &sensor_id, const nanoseconds &timestamp, rs2_extension type, const std::shared_ptr< extension_snapshot > &snapshot) override
 
- Public Member Functions inherited from librealsense::device_serializer::writer
virtual ~writer ()=default
 

Private Member Functions

rs2_extension get_processing_block_extension (const std::shared_ptr< processing_block_interface > block)
 
template<rs2_extension E>
std::shared_ptr< typename ExtensionToType< E >::typeSnapshotAs (std::shared_ptr< librealsense::extension_snapshot > snapshot)
 
realsense_msgs::Notification to_notification_msg (const notification &n)
 
geometry_msgs::Quaternion to_quaternion (const float4 &f)
 
geometry_msgs::Vector3 to_vector3 (const float3 &f)
 
void write_additional_frame_messages (const stream_identifier &stream_id, const nanoseconds &timestamp, frame_interface *frame)
 
void write_extension_snapshot (uint32_t device_id, const nanoseconds &timestamp, rs2_extension type, std::shared_ptr< librealsense::extension_snapshot > snapshot)
 
void write_extension_snapshot (uint32_t device_id, uint32_t sensor_id, const nanoseconds &timestamp, rs2_extension type, std::shared_ptr< librealsense::extension_snapshot > snapshot)
 
void write_extension_snapshot (uint32_t device_id, uint32_t sensor_id, const nanoseconds &timestamp, rs2_extension type, std::shared_ptr< librealsense::extension_snapshot > snapshot, bool is_device)
 
void write_extrinsics (const stream_identifier &stream_id, frame_interface *frame)
 
void write_file_version ()
 
void write_frame_metadata (const stream_identifier &stream_id, const nanoseconds &timestamp, frame_interface *frame)
 
void write_l500_data (device_serializer::sensor_identifier sensor_id, const nanoseconds &timestamp, std::shared_ptr< l500_depth_sensor_interface > l500_depth_sensor)
 
template<typename T >
void write_message (std::string const &topic, nanoseconds const &time, T const &msg)
 
void write_motion_frame (const stream_identifier &stream_id, const nanoseconds &timestamp, frame_holder &&frame)
 
void write_notification (const sensor_identifier &sensor_id, const nanoseconds &timestamp, const notification &n) override
 
void write_pose_frame (const stream_identifier &stream_id, const nanoseconds &timestamp, frame_holder &&frame)
 
void write_sensor_option (device_serializer::sensor_identifier sensor_id, const nanoseconds &timestamp, rs2_option type, const librealsense::option &option)
 
void write_sensor_options (device_serializer::sensor_identifier sensor_id, const nanoseconds &timestamp, std::shared_ptr< options_interface > options)
 
void write_sensor_processing_blocks (device_serializer::sensor_identifier sensor_id, const nanoseconds &timestamp, std::shared_ptr< recommended_proccesing_blocks_interface > proccesing_blocks)
 
void write_stream_info (nanoseconds timestamp, const sensor_identifier &sensor_id, std::shared_ptr< stream_profile_interface > profile)
 
void write_streaming_info (nanoseconds timestamp, const sensor_identifier &sensor_id, std::shared_ptr< video_stream_profile_interface > profile)
 
void write_streaming_info (nanoseconds timestamp, const sensor_identifier &sensor_id, std::shared_ptr< motion_stream_profile_interface > profile)
 
void write_streaming_info (nanoseconds timestamp, const sensor_identifier &sensor_id, std::shared_ptr< pose_stream_profile_interface > profile)
 
void write_vendor_info (const std::string &topic, nanoseconds timestamp, std::shared_ptr< info_interface > info_snapshot)
 
void write_video_frame (const stream_identifier &stream_id, const nanoseconds &timestamp, frame_holder &&frame)
 

Static Private Member Functions

static uint8_t is_big_endian ()
 

Private Attributes

rosbag::Bag m_bag
 
std::map< stream_identifier, geometry_msgs::Transformm_extrinsics_msgs
 
std::string m_file_path
 
std::map< uint32_t, std::set< rs2_option > > m_written_options_descriptions
 

Detailed Description

Definition at line 12 of file ros_writer.h.

Constructor & Destructor Documentation

librealsense::ros_writer::ros_writer ( const std::string file,
bool  compress_while_record 
)
explicit

Definition at line 22 of file ros_writer.cpp.

Member Function Documentation

const std::string & librealsense::ros_writer::get_file_name ( ) const
overridevirtual

Implements librealsense::device_serializer::writer.

Definition at line 80 of file ros_writer.cpp.

rs2_extension librealsense::ros_writer::get_processing_block_extension ( const std::shared_ptr< processing_block_interface block)
private

Definition at line 538 of file ros_writer.cpp.

uint8_t librealsense::ros_writer::is_big_endian ( )
staticprivate

Definition at line 586 of file ros_writer.cpp.

template<rs2_extension E>
std::shared_ptr<typename ExtensionToType<E>::type> librealsense::ros_writer::SnapshotAs ( std::shared_ptr< librealsense::extension_snapshot snapshot)
inlineprivate

Definition at line 42 of file ros_writer.h.

realsense_msgs::Notification librealsense::ros_writer::to_notification_msg ( const notification n)
private

Definition at line 135 of file ros_writer.cpp.

geometry_msgs::Quaternion librealsense::ros_writer::to_quaternion ( const float4 f)
inlineprivate

Definition at line 244 of file ros_writer.cpp.

geometry_msgs::Vector3 librealsense::ros_writer::to_vector3 ( const float3 f)
inlineprivate

Definition at line 235 of file ros_writer.cpp.

void librealsense::ros_writer::write_additional_frame_messages ( const stream_identifier stream_id,
const nanoseconds timestamp,
frame_interface frame 
)
private

Definition at line 153 of file ros_writer.cpp.

void librealsense::ros_writer::write_device_description ( const librealsense::device_snapshot device_description)
overridevirtual

Implements librealsense::device_serializer::writer.

Definition at line 33 of file ros_writer.cpp.

void librealsense::ros_writer::write_extension_snapshot ( uint32_t  device_id,
const nanoseconds timestamp,
rs2_extension  type,
std::shared_ptr< librealsense::extension_snapshot snapshot 
)
private

Definition at line 372 of file ros_writer.cpp.

void librealsense::ros_writer::write_extension_snapshot ( uint32_t  device_id,
uint32_t  sensor_id,
const nanoseconds timestamp,
rs2_extension  type,
std::shared_ptr< librealsense::extension_snapshot snapshot 
)
private

Definition at line 378 of file ros_writer.cpp.

void librealsense::ros_writer::write_extension_snapshot ( uint32_t  device_id,
uint32_t  sensor_id,
const nanoseconds timestamp,
rs2_extension  type,
std::shared_ptr< librealsense::extension_snapshot snapshot,
bool  is_device 
)
private

Definition at line 383 of file ros_writer.cpp.

void librealsense::ros_writer::write_extrinsics ( const stream_identifier stream_id,
frame_interface frame 
)
private

Definition at line 119 of file ros_writer.cpp.

void librealsense::ros_writer::write_file_version ( )
private

Definition at line 85 of file ros_writer.cpp.

void librealsense::ros_writer::write_frame ( const stream_identifier stream_id,
const nanoseconds timestamp,
frame_holder &&  frame 
)
overridevirtual

Implements librealsense::device_serializer::writer.

Definition at line 49 of file ros_writer.cpp.

void librealsense::ros_writer::write_frame_metadata ( const stream_identifier stream_id,
const nanoseconds timestamp,
frame_interface frame 
)
private

Definition at line 92 of file ros_writer.cpp.

void librealsense::ros_writer::write_l500_data ( device_serializer::sensor_identifier  sensor_id,
const nanoseconds timestamp,
std::shared_ptr< l500_depth_sensor_interface l500_depth_sensor 
)
private

Definition at line 514 of file ros_writer.cpp.

template<typename T >
void librealsense::ros_writer::write_message ( std::string const &  topic,
nanoseconds const &  time,
T const &  msg 
)
inlineprivate

Definition at line 62 of file ros_writer.h.

void librealsense::ros_writer::write_motion_frame ( const stream_identifier stream_id,
const nanoseconds timestamp,
frame_holder &&  frame 
)
private

Definition at line 198 of file ros_writer.cpp.

void librealsense::ros_writer::write_notification ( const sensor_identifier sensor_id,
const nanoseconds timestamp,
const notification n 
)
overrideprivatevirtual

Implements librealsense::device_serializer::writer.

Definition at line 147 of file ros_writer.cpp.

void librealsense::ros_writer::write_pose_frame ( const stream_identifier stream_id,
const nanoseconds timestamp,
frame_holder &&  frame 
)
private

Definition at line 254 of file ros_writer.cpp.

void librealsense::ros_writer::write_sensor_option ( device_serializer::sensor_identifier  sensor_id,
const nanoseconds timestamp,
rs2_option  type,
const librealsense::option option 
)
private

Definition at line 473 of file ros_writer.cpp.

void librealsense::ros_writer::write_sensor_options ( device_serializer::sensor_identifier  sensor_id,
const nanoseconds timestamp,
std::shared_ptr< options_interface options 
)
private

Definition at line 495 of file ros_writer.cpp.

void librealsense::ros_writer::write_sensor_processing_blocks ( device_serializer::sensor_identifier  sensor_id,
const nanoseconds timestamp,
std::shared_ptr< recommended_proccesing_blocks_interface proccesing_blocks 
)
private

Definition at line 560 of file ros_writer.cpp.

void librealsense::ros_writer::write_snapshot ( uint32_t  device_index,
const nanoseconds timestamp,
rs2_extension  type,
const std::shared_ptr< extension_snapshot > &  snapshot 
)
overridevirtual

Implements librealsense::device_serializer::writer.

Definition at line 70 of file ros_writer.cpp.

void librealsense::ros_writer::write_snapshot ( const sensor_identifier sensor_id,
const nanoseconds timestamp,
rs2_extension  type,
const std::shared_ptr< extension_snapshot > &  snapshot 
)
overridevirtual

Implements librealsense::device_serializer::writer.

Definition at line 75 of file ros_writer.cpp.

void librealsense::ros_writer::write_stream_info ( nanoseconds  timestamp,
const sensor_identifier sensor_id,
std::shared_ptr< stream_profile_interface profile 
)
private

Definition at line 312 of file ros_writer.cpp.

void librealsense::ros_writer::write_streaming_info ( nanoseconds  timestamp,
const sensor_identifier sensor_id,
std::shared_ptr< video_stream_profile_interface profile 
)
private

Definition at line 321 of file ros_writer.cpp.

void librealsense::ros_writer::write_streaming_info ( nanoseconds  timestamp,
const sensor_identifier sensor_id,
std::shared_ptr< motion_stream_profile_interface profile 
)
private

Definition at line 346 of file ros_writer.cpp.

void librealsense::ros_writer::write_streaming_info ( nanoseconds  timestamp,
const sensor_identifier sensor_id,
std::shared_ptr< pose_stream_profile_interface profile 
)
private

Definition at line 368 of file ros_writer.cpp.

void librealsense::ros_writer::write_vendor_info ( const std::string topic,
nanoseconds  timestamp,
std::shared_ptr< info_interface info_snapshot 
)
private

Definition at line 458 of file ros_writer.cpp.

void librealsense::ros_writer::write_video_frame ( const stream_identifier stream_id,
const nanoseconds timestamp,
frame_holder &&  frame 
)
private

Definition at line 174 of file ros_writer.cpp.

Member Data Documentation

rosbag::Bag librealsense::ros_writer::m_bag
private

Definition at line 78 of file ros_writer.h.

std::map<stream_identifier, geometry_msgs::Transform> librealsense::ros_writer::m_extrinsics_msgs
private

Definition at line 76 of file ros_writer.h.

std::string librealsense::ros_writer::m_file_path
private

Definition at line 77 of file ros_writer.h.

std::map<uint32_t, std::set<rs2_option> > librealsense::ros_writer::m_written_options_descriptions
private

Definition at line 79 of file ros_writer.h.


The documentation for this class was generated from the following files:


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:38