PointCloudCrafter
Loading...
Searching...
No Matches
pointcloudcrafter::Rosbag Class Reference

Rosbag class. More...

#include <pointcloudcrafter_rosbag.hpp>

Public Member Functions

 Rosbag (const config::RosbagConfig &cfg)
 Constructor.
void run ()
 Run the pointcloud crafter.

Protected Member Functions

void tf_callback (const tools::RosbagReaderMsg< tf2_msgs::msg::TFMessage > &msg)
 Callback for TF messages.
void pointcloud_sync_callback (const sensor_msgs::msg::PointCloud2::ConstSharedPtr &pc1, const sensor_msgs::msg::PointCloud2::ConstSharedPtr &pc2, const sensor_msgs::msg::PointCloud2::ConstSharedPtr &pc3, const sensor_msgs::msg::PointCloud2::ConstSharedPtr &pc4)
 Callback for synchronized pointclouds.
void process_pointclouds (std::vector< sensor_msgs::msg::PointCloud2::ConstSharedPtr > &pc_msgs)
 Process the pointclouds once all pointclouds are synchronized.
void transform_pc (const sensor_msgs::msg::PointCloud2 &msg_in, sensor_msgs::msg::PointCloud2 &msg_out)
 Transform a pointcloud given the transform from either the file or the TF buffer.

Detailed Description

Rosbag class.

Constructor & Destructor Documentation

◆ Rosbag()

pointcloudcrafter::Rosbag::Rosbag ( const config::RosbagConfig & cfg)
explicit

Constructor.

Rosbag class.

Parameters
cfgConfiguration

Member Function Documentation

◆ pointcloud_sync_callback()

void pointcloudcrafter::Rosbag::pointcloud_sync_callback ( const sensor_msgs::msg::PointCloud2::ConstSharedPtr & pc1,
const sensor_msgs::msg::PointCloud2::ConstSharedPtr & pc2,
const sensor_msgs::msg::PointCloud2::ConstSharedPtr & pc3,
const sensor_msgs::msg::PointCloud2::ConstSharedPtr & pc4 )
protected

Callback for synchronized pointclouds.

Parameters
pc1- first pointcloud
pc2- second pointcloud
pc3- third pointcloud
pc4- fourth pointcloud
pc1Pointcloud message 1
pc2Pointcloud message 2
pc3Pointcloud message 3
pc4Pointcloud message 4

◆ process_pointclouds()

void pointcloudcrafter::Rosbag::process_pointclouds ( std::vector< sensor_msgs::msg::PointCloud2::ConstSharedPtr > & pc_msgs)
protected

Process the pointclouds once all pointclouds are synchronized.

Process synchronized pointclouds.

-> to be called after all pointclouds are synchronized

-> apply filters and save the pointcloud

Parameters
pc_msgs- vector of pointclouds
pc_msgsVector of pointcloud messages

◆ tf_callback()

void pointcloudcrafter::Rosbag::tf_callback ( const tools::RosbagReaderMsg< tf2_msgs::msg::TFMessage > & msg)
protected

Callback for TF messages.

Parameters
msg- TF message
msgTF message

◆ transform_pc()

void pointcloudcrafter::Rosbag::transform_pc ( const sensor_msgs::msg::PointCloud2 & msg_in,
sensor_msgs::msg::PointCloud2 & msg_out )
protected

Transform a pointcloud given the transform from either the file or the TF buffer.

Parameters
msg_in- input pointcloud
msg_out- output pointcloud
msg_inInput pointcloud
msg_outOutput pointcloud

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