#pragma once #if defined(SG_API_LIBRARY) # define SG_APISHARED_EXPORT __declspec(dllexport) #else # define SG_APISHARED_EXPORT __declspec(dllimport) #endif #include "SG_baseDataType.h" #include typedef struct { double statorOuterD; //定子外直径 double statorInnerD; //定子内孔直径 double statorHeight; //定子高度 double plateThickness; //隔板厚度 double plateW;//隔板长 double plateH;//隔板宽 }SWD_statorParam; typedef struct { SSG_outlierFilterParam filterParam; SSG_cornerParam cornerParam; SSG_treeGrowParam growParam; }SWD_statorPositonParam; typedef enum { keWD_OPERATE_Uknown = 0, keSG_OPERATE_TOP_LAYER, //抓取上层 keSG_OPERATE_BTM_LAYER, //抓取下层 keSG_OPERATE_PLATE, //抓取隔板 } ESG_OpeationState; typedef struct { SVzNL3DPoint refPos; ESG_OpeationState opState; //指示前一目标参考位置是否有效 }SWD_statorGriperState; //读版本号 SG_APISHARED_EXPORT const char* wd_particleSegVersion(void); //计算一个平面调平参数。 //数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平 //旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数 SG_APISHARED_EXPORT SSG_planeCalibPara wd_getBaseCalibPara( std::vector< std::vector>& scanLines); //相机姿态调平,并去除地面 SG_APISHARED_EXPORT void wd_lineDataR( std::vector< SVzNL3DPosition>& a_line, const double* camPoseR, double groundH); ///数据输入必须是grid格式,以进行水平方向和垂直方向的处理 //电机定子定位。 //算法逻辑:找到定子的高度->设置截取Z去掉底面-> // 投影(注意此时边框也同时投影)->距离变换->提取定子目标-> // 根据相邻和边框寻找最佳抓取目标和抓取点 SG_APISHARED_EXPORT void wd_motorStatorPosition( std::vector< std::vector>& scanLinesInput, const SWD_statorParam statorParam, const SSG_planeCalibPara groundCalibPara, const SWD_statorPositonParam algoParam, SWD_statorGriperState* opState, //操作状态机。指示当前状态 int* errCode, std::vector& resultObjPositions);