safety_excutor.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // Created by zx on 2021/12/16.
  3. //
  4. #ifndef SHUTTER_VERIFY__SAFETY_EXCUTOR_H_
  5. #define SHUTTER_VERIFY__SAFETY_EXCUTOR_H_
  6. #define VIEW 1
  7. #include "LivoxMid70.h"
  8. #include "setting.pb.h"
  9. typedef struct
  10. {
  11. unsigned short wheel_path_safety;
  12. unsigned short parkspcae_safety;
  13. float left_space;
  14. float right_space;
  15. float theta;
  16. float offset_x;
  17. }tagMeasureData;
  18. class safety_excutor
  19. {
  20. public:
  21. static safety_excutor* CreateExcutor(const shutter::shutter_param& parameter);
  22. ~safety_excutor();
  23. bool verify(tagMeasureData& data);
  24. private:
  25. safety_excutor();
  26. bool init(const shutter::shutter_param& parameter);
  27. bool pointInRectangle(pcl::PointXYZ point,const shutter::box_param& box);
  28. pcl::PointCloud<pcl::PointXYZ>::Ptr PassThroughCloud(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
  29. const shutter::box_param& box);
  30. private:
  31. shutter::shutter_param m_parameter;
  32. livox::LivoxMid70* mp_lidars;
  33. };
  34. #endif //SHUTTER_VERIFY__SAFETY_EXCUTOR_H_