fastvirtualscan.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef FASTVIRTUALSCAN_H
  2. #define FASTVIRTUALSCAN_H
  3. #include<QVector>
  4. #include<QtAlgorithms>
  5. #include<QtGlobal>
  6. #include<sensor_msgs/PointCloud2.h>
  7. struct SimpleVirtualScan
  8. {
  9. int rotid;
  10. double rotlength;
  11. double rotheight;
  12. double length;
  13. double height;
  14. };
  15. class FastVirtualScan
  16. {
  17. public:
  18. sensor_msgs::PointCloud2ConstPtr velodyne;
  19. public:
  20. int beamnum;
  21. double step;
  22. double minfloor;
  23. double maxceiling;
  24. double rotation;
  25. double minrange;
  26. QVector<QVector<SimpleVirtualScan> > svs;
  27. QVector<QVector<SimpleVirtualScan> > svsback;
  28. QVector<double> minheights;
  29. QVector<double> maxheights;
  30. public:
  31. FastVirtualScan();
  32. virtual ~FastVirtualScan();
  33. public:
  34. void calculateVirtualScans(int beamNum, double heightStep, double minFloor, double maxCeiling, double obstacleMinHeight=1, double maxBackDistance=1, double beamRotation=0, double minRange=0);
  35. void getVirtualScan(double thetaminheight, double thetamaxheight, double maxFloor, double minCeiling, double passHeight, QVector<double> & virtualScan);
  36. };
  37. #endif // FASTVIRTUALSCAN_H