locate_task.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // Created by zx on 2019/12/30.
  3. //
  4. #ifndef LOCATE_TASK_H
  5. #define LOCATE_TASK_H
  6. #include "../task/task_command_manager.h"
  7. #include "../error_code/error_code.h"
  8. #include <pcl/point_types.h>
  9. #include <pcl/common/common.h>
  10. /*
  11. * 测量结果结构体
  12. */
  13. typedef struct LOCATE_INFORMATION
  14. {
  15. float locate_x;
  16. float locate_y;
  17. float locate_theta;
  18. float locate_length;
  19. float locate_width;
  20. float locate_hight;
  21. float locate_wheel_base;
  22. bool locate_correct;
  23. }Locate_information;
  24. /*
  25. * 测量任务类,负责维护测量任务所需的输入参数以及测量的结果
  26. */
  27. class Locate_task: public Task_Base
  28. {
  29. public:
  30. Locate_task();
  31. virtual ~Locate_task();
  32. //设置测量输入点云
  33. Error_manager set_locate_cloud(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud);
  34. //获取输入点云
  35. pcl::PointCloud<pcl::PointXYZ>::Ptr get_locate_cloud();
  36. //获取测量结果
  37. Locate_information get_locate_information();
  38. //设置测量结果
  39. Error_manager set_locate_information(Locate_information information);
  40. //获取文件存放路径
  41. std::string get_save_path();
  42. //设置文件村昂路径
  43. Error_manager set_save_path(std::string path);
  44. protected:
  45. //测量算法输入点云
  46. pcl::PointCloud<pcl::PointXYZ>::Ptr m_locate_cloud_ptr;
  47. //测量结果
  48. Locate_information m_locate_information;
  49. //测量中间文件存放路径
  50. std::string m_save_path;
  51. };
  52. #endif //LOCATE_TASK_H