algoLib/sourceCode/motorStatorPosition_Export.h

58 lines
1.5 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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 <vector>
typedef struct
{
double statorOuterD; //定子外直径
double statorInnerD; //定子内孔直径
double statorHeight;
double gripperR;//夹爪半径
}SWD_statorParam;
typedef struct
{
SSG_outlierFilterParam filterParam;
SSG_cornerParam cornerParam;
SSG_treeGrowParam growParam;
}SWD_statorPositonParam;
typedef struct
{
SVzNL3DPoint refPos;
double cuttingZ; //z截断值用于分割定子上半部和地面
}SWD_nextOpParam;
//读版本号
SG_APISHARED_EXPORT const char* wd_particleSegVersion(void);
//计算一个平面调平参数。
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
SG_APISHARED_EXPORT SSG_planeCalibPara wd_getBaseCalibPara(
std::vector< std::vector<SVzNL3DPosition>>& scanLines);
//相机姿态调平,并去除地面
SG_APISHARED_EXPORT void wd_lineDataR(
std::vector< SVzNL3DPosition>& a_line,
const double* camPoseR,
double groundH);
///数据输入必须是grid格式以进行水平方向和垂直方向的处理
SG_APISHARED_EXPORT void wd_motorStatorPosition(
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
const SWD_statorParam positionParam,
const SSG_planeCalibPara groundCalibPara,
const SWD_statorPositonParam algoParam,
SWD_nextOpParam* refPos, //上一次给出的参考位置,同时输出下一次的参考位置
int* errCode,
std::vector<SWD_motorStatorPosition>& resultObjPositions,
SWD_statorOuterGrasper& resultGraspPos
);