PointCloudCrafter
Loading...
Searching...
No Matches
pointcloudcrafter::tools::RosbagReader Class Reference

Public Member Functions

 RosbagReader (const std::string &BAG_PATH)
 Constructor from a bag file path.
template<typename T>
void add_listener (const std::string &topic_name, std::function< void(const RosbagReaderMsg< T > &)> callback)
 Add a listener for a specific topic.
void set_state (bool state)
 Set the state flag to false to stop processing.
void process ()
 Process the bag file.

Constructor & Destructor Documentation

◆ RosbagReader()

pointcloudcrafter::tools::RosbagReader::RosbagReader ( const std::string & BAG_PATH)
inlineexplicit

Constructor from a bag file path.

Parameters
BAG_PATH- path to the bag file

Member Function Documentation

◆ add_listener()

template<typename T>
void pointcloudcrafter::tools::RosbagReader::add_listener ( const std::string & topic_name,
std::function< void(const RosbagReaderMsg< T > &)> callback )
inline

Add a listener for a specific topic.

Template Parameters
T- ROS message type
Parameters
topic_name- name of the topic
callback- callback function that will be called when a message is received

◆ process()

void pointcloudcrafter::tools::RosbagReader::process ( )
inline

Process the bag file.

-> to be called after all listeners are added

◆ set_state()

void pointcloudcrafter::tools::RosbagReader::set_state ( bool state)
inline

Set the state flag to false to stop processing.

Parameters
state- flag to set

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