pf_data_publisher.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <deque>
4 #include <mutex>
5 
6 #include <ros/ros.h>
7 #include <sensor_msgs/LaserScan.h>
8 
10 
12 {
13 public:
14  PFDataPublisher(std::shared_ptr<ScanConfig> config, std::shared_ptr<ScanParameters> params);
15 
16  virtual void read(PFR2000Packet_A& packet);
17  virtual void read(PFR2000Packet_B& packet);
18  virtual void read(PFR2000Packet_C& packet);
19  virtual void read(PFR2300Packet_C1& packet);
20 
21  virtual bool start();
22 
23  virtual bool stop();
24 
25 protected:
27  std::string frame_id_;
29  std::deque<sensor_msgs::LaserScanPtr> d_queue_;
30  std::mutex q_mutex_;
31 
32  std::shared_ptr<ScanConfig> config_;
33  std::shared_ptr<ScanParameters> params_;
34 
35  bool check_status(uint32_t status_flags);
36 
37  template <typename T>
38  void to_msg_queue(T& packet, uint16_t layer_idx = 0, int layer_inclination = 0);
39  virtual void handle_scan(sensor_msgs::LaserScanPtr msg, uint16_t layer_idx, int layer_inclination,
40  bool apply_correction = true) = 0;
41 
42  virtual void resetCurrentScans()
43  {
44  }
45 };
std::string frame_id_
std::shared_ptr< ScanParameters > params_
config
virtual bool start()
std::shared_ptr< ScanConfig > config_
ros::Publisher header_publisher_
virtual bool stop()
virtual void resetCurrentScans()
std::deque< sensor_msgs::LaserScanPtr > d_queue_
ros::NodeHandle nh_
bool check_status(uint32_t status_flags)
void to_msg_queue(T &packet, uint16_t layer_idx=0, int layer_inclination=0)
PFDataPublisher(std::shared_ptr< ScanConfig > config, std::shared_ptr< ScanParameters > params)
virtual void read(PFR2000Packet_A &packet)
virtual void handle_scan(sensor_msgs::LaserScanPtr msg, uint16_t layer_idx, int layer_inclination, bool apply_correction=true)=0


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