fusion.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #ifndef FUSION_H
  3. #define FUSION_H
  4. #include <common/boost.h>
  5. #include <boost/serialization/singleton.hpp>
  6. #include <common/obstacle_type.h>
  7. #include <common/car_status.h>
  8. #include <QMutex>
  9. namespace iv {
  10. class Fusion : public boost::noncopyable {
  11. public:
  12. Fusion();
  13. ~Fusion();
  14. bool genggai1 = false, genggai2 = false;
  15. bool is_run = false;
  16. boost::mutex mtx1, mtx2;
  17. iv::ObsFsuion fusion_Grid;
  18. iv::ObsFsuion fusion_;
  19. QMutex mMutexper;
  20. std::shared_ptr<iv::fusion::fusionobjectarray> mper;
  21. void copyfromlidar(iv::ObsLiDAR& obs);
  22. void copylidarto(iv::ObsLiDAR& obs);
  23. void copyfromlidarobs(iv::ObsLiDAR& obs);
  24. void copylidarobsto(iv::ObsLiDAR& obs);
  25. void copyfromlidarper(std::shared_ptr<std::vector<iv::Perception::PerceptionOutput>> & per);
  26. void copylidarperto(std::shared_ptr<std::vector<iv::Perception::PerceptionOutput>> & per);
  27. bool did_lidar_ok();
  28. };
  29. typedef boost::serialization::singleton<iv::Fusion> FusionSingleton;
  30. }
  31. #define ServiceFusion iv::FusionSingleton::get_mutable_instance()
  32. #endif // FUSION_H