// // Created by zx on 2023/7/20. // #pragma once #include "executor.hpp" #include "hybrid_grid.hpp" #include "interpolated_grid.hpp" #include "tool/static_tool.hpp" #include #include #include class WheelModel3D: public SingletonIter { friend class SingletonIter; public: HybridGrid* left_grid() { return mp_left_grid; } HybridGrid* right_grid() { return mp_right_grid; }; protected: WheelModel3D() { mp_left_grid = nullptr; mp_right_grid = nullptr; } Error_manager init() override; /** * @description 加载左侧车轮模型; * @return 加载结果; **/ Error_manager loadLeftModel(); /** * @description 加载右侧车轮模型; * @return 加载结果; **/ Error_manager loadRightModel(); private: /** * @description 更新模型; * @param clouds 输入点云; * @param ratio 模型比例; * @return 更新后的模型; **/ static HybridGrid* updateModel(pcl::PointCloud::Ptr &clouds, float ratio = 1); protected: HybridGrid* mp_left_grid; // 左侧车轮模型 HybridGrid* mp_right_grid; // 右侧车轮模型 private: const char* left_file = ETC_PATH"MeasureNode/left_model.txt"; // 左侧车轮加载路径 const char* right_file = ETC_PATH"MeasureNode/right_model.txt"; // 右侧车轮加载路径 };