fallModel.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // Created by zx on 23-12-7.
  3. //
  4. #ifndef CERES_TEST_FALLMODEL_H
  5. #define CERES_TEST_FALLMODEL_H
  6. #include <ceres/ceres.h>
  7. #include <glog/logging.h>
  8. #include <pcl/point_types.h>
  9. #include <pcl/point_cloud.h>
  10. #include <pcl/common/centroid.h>
  11. #include <opencv2/opencv.hpp>
  12. #include "wheel_detector.h"
  13. enum FallDirect{
  14. ePositive=0, //正方向落体
  15. eNagtive=1, //负方向落体
  16. };
  17. class FallModel {
  18. public:
  19. FallModel();
  20. static bool fall(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,pcl::PointCloud<pcl::PointXYZ>::Ptr& out,
  21. pcl::PointXYZ& tp,float& theta,FallDirect direct);
  22. static pcl::PointCloud<pcl::PointXYZ>::Ptr transformCloud(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
  23. pcl::PointXYZ center,float dx,float theta);
  24. protected:
  25. static void computeForce(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,pcl::PointXYZ& center,
  26. pcl::PointXYZ& force_center,float& gravy,float& force,float minx,FallDirect direct);
  27. };
  28. #endif //CERES_TEST_FALLMODEL_H