point_cloud_publisher.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <sensor_msgs/PointCloud2.h>
7 
9 
11 {
12 public:
13  PointcloudPublisher(std::shared_ptr<ScanConfig> config, std::shared_ptr<ScanParameters> params,
14  const std::string& scan_topic, const std::string& frame_id, const uint16_t num_layers,
15  const std::string& part);
16 
17 private:
18  sensor_msgs::PointCloud2Ptr cloud_;
22  int16_t layer_prev_;
23  std::map<int, std::vector<double>> correction_params_;
24  std::vector<ros::Publisher> scan_publishers_;
25  std::vector<std::string> frame_ids_;
27  std::vector<int> angles_;
28 
29  virtual void handle_scan(sensor_msgs::LaserScanPtr msg, uint16_t layer_idx, int layer_inclination,
30  bool apply_correction);
31  void add_pointcloud(sensor_msgs::PointCloud2& c1, sensor_msgs::PointCloud2 c2);
32  void copy_pointcloud(sensor_msgs::PointCloud2& c1, sensor_msgs::PointCloud2 c2);
33 
34  void project_laser(sensor_msgs::PointCloud2& c, sensor_msgs::LaserScanPtr msg, const int layer_inclination);
35 
36  virtual void resetCurrentScans();
37 
38  void publish_static_transform(const std::string& parent, const std::string& child, int inclination_angle);
39 
40  void publish_scan(sensor_msgs::LaserScanPtr msg, uint16_t idx);
41 };
virtual void resetCurrentScans()
virtual void handle_scan(sensor_msgs::LaserScanPtr msg, uint16_t layer_idx, int layer_inclination, bool apply_correction)
ros::Publisher pcl_publisher_
void publish_static_transform(const std::string &parent, const std::string &child, int inclination_angle)
std::vector< ros::Publisher > scan_publishers_
config
void publish_scan(sensor_msgs::LaserScanPtr msg, uint16_t idx)
tf2_ros::StaticTransformBroadcaster static_broadcaster_
std::vector< std::string > frame_ids_
void copy_pointcloud(sensor_msgs::PointCloud2 &c1, sensor_msgs::PointCloud2 c2)
std::map< int, std::vector< double > > correction_params_
std::vector< int > angles_
void add_pointcloud(sensor_msgs::PointCloud2 &c1, sensor_msgs::PointCloud2 c2)
sensor_msgs::PointCloud2Ptr cloud_
laser_geometry::LaserProjection projector_
tf::TransformListener tfListener_
PointcloudPublisher(std::shared_ptr< ScanConfig > config, std::shared_ptr< ScanParameters > params, const std::string &scan_topic, const std::string &frame_id, const uint16_t num_layers, const std::string &part)
void project_laser(sensor_msgs::PointCloud2 &c, sensor_msgs::LaserScanPtr msg, const int layer_inclination)


pf_driver
Author(s): Harsh Deshpande
autogenerated on Fri Feb 24 2023 03:59:35