63 lines
1.7 KiB
C++
63 lines
1.7 KiB
C++
#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 cutZ_level0;
|
||
double cutZ_level1;
|
||
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格式,以进行水平方向和垂直方向的处理
|
||
//电机定子定位。
|
||
//算法逻辑:找到定子的高度->设置截取Z去掉底面->
|
||
// 投影(注意此时边框也同时投影)->距离变换->提取定子目标->
|
||
// 根据相邻和边框寻找最佳抓取目标和抓取点
|
||
SG_APISHARED_EXPORT void wd_motorStatorPosition(
|
||
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
|
||
const SWD_statorParam statorParam,
|
||
const SSG_planeCalibPara groundCalibPara,
|
||
const SWD_statorPositonParam algoParam,
|
||
SWD_nextOpParam* refPos, //上一次给出的参考位置,同时输出下一次的参考位置
|
||
int* errCode,
|
||
std::vector<SWD_motorStatorPosition>& resultObjPositions,
|
||
SWD_statorOuterGrasper& resultGraspPos); |