// // Created by zx on 2020/7/1. // #ifndef CERES_TEST_DETECT_WHEEL_CERES_H #define CERES_TEST_DETECT_WHEEL_CERES_H #include #include #include #include #include #include class detect_wheel_ceres { public: static detect_wheel_ceres *iter() { static detect_wheel_ceres *instance = nullptr; if (instance == nullptr) { instance = new detect_wheel_ceres(); } return instance; } ~detect_wheel_ceres(); bool detect_2Step(pcl::PointCloud::Ptr cl1,pcl::PointCloud::Ptr cl2, pcl::PointCloud::Ptr cl3,pcl::PointCloud::Ptr cl4, float& cx,float& cy,float& theta,float& wheel_base,float& width,float& front_theta,float& loss); /* * 只检测动态参数, 固定参数已知 */ bool detect_dynP(pcl::PointCloud::Ptr cl1,pcl::PointCloud::Ptr cl2, pcl::PointCloud::Ptr cl3,pcl::PointCloud::Ptr cl4, float& cx,float& cy,float& theta,float& wheel_base,float& width,float& front_theta,float& loss); private: detect_wheel_ceres(); bool detect_RYL(pcl::PointCloud::Ptr cl1,pcl::PointCloud::Ptr cl2, pcl::PointCloud::Ptr cl3,pcl::PointCloud::Ptr cl4, float& cx,float& cy,float& theta,float& wheel_base,float& width,float& front_theta,float& loss); bool detect_XWF(pcl::PointCloud::Ptr cl1,pcl::PointCloud::Ptr cl2, pcl::PointCloud::Ptr cl3,pcl::PointCloud::Ptr cl4, float& cx,float& cy,float& theta,float& wheel_base,float& width,float& front_theta,float& loss); pcl::PointCloud::Ptr filter(pcl::PointCloud::Ptr cloud,float r); pcl::PointCloud::Ptr m_left_front_cloud; //左前点云 pcl::PointCloud::Ptr m_right_front_cloud; //右前点云 pcl::PointCloud::Ptr m_left_rear_cloud; //左后点云 pcl::PointCloud::Ptr m_right_rear_cloud; //右后点云 public: cv::Mat m_map; //保存一份地图用作匹配 cv::Mat m_mapr; std::vector m_line_l; std::vector m_line_r; std::vector m_line_y_2stp; std::vector m_line_y; }; #endif //CERES_TEST_DETECT_WHEEL_CERES_H