1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // 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 <pcl/point_types.h>
- #include <pcl/point_cloud.h>
- #include <pcl/common/centroid.h>
- class WheelModel3D: public SingletonIter<WheelModel3D> {
- friend class SingletonIter<WheelModel3D>;
- 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<pcl::PointXYZ>::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"; // 右侧车轮加载路径
- };
|