78 lines
2.1 KiB
C++
78 lines
2.1 KiB
C++
#pragma once
|
||
|
||
#if defined(SG_API_LIBRARY)
|
||
# define SG_APISHARED_EXPORT __declspec(dllexport)
|
||
#else
|
||
# define SG_APISHARED_EXPORT __declspec(dllimport)
|
||
#endif
|
||
|
||
#define OUTPUT_DEBUG 0
|
||
#define BAG_ALGO_USE_CORNER_FEATURE 1
|
||
|
||
#include "SG_baseDataType.h"
|
||
#include <vector>
|
||
|
||
typedef struct
|
||
{
|
||
SSG_bagParam bagParam;
|
||
SSG_outlierFilterParam filterParam;
|
||
#if BAG_ALGO_USE_CORNER_FEATURE
|
||
SSG_cornerParam cornerParam;
|
||
#else
|
||
SSG_slopeParam slopeParam;
|
||
SSG_VFeatureParam valleyPara;
|
||
#endif
|
||
SSG_treeGrowParam growParam;
|
||
//SSG_objSortParam sortParam;
|
||
//SSG_polarScanParam polarScanParam;
|
||
}SG_bagPositionParam;
|
||
|
||
typedef struct
|
||
{
|
||
double jumpTh; //和现场环境有关,为托盘的孔洞的Z跳变
|
||
double baseHoleLen; //和现场有关,托盘孔洞的长度
|
||
double baseHoleDist; //托盘两个孔洞的距离
|
||
}SSG_stackBaseParam;
|
||
|
||
SG_APISHARED_EXPORT void sg_lineDataR(SVzNL3DLaserLine* a_line,
|
||
const double* camPoseR,
|
||
double groundH);
|
||
|
||
SG_APISHARED_EXPORT void sg_bagPositioning_lineProc(
|
||
SVzNL3DLaserLine* a_line,
|
||
int lineIdx,
|
||
int* errCode,
|
||
std::vector<SSG_lineFeature>& all_vLineFeatures,
|
||
std::vector<std::vector<int>>& noisePts,
|
||
const SG_bagPositionParam algoParam);
|
||
|
||
//获取编织袋中心抓取点姿态,从顶部抓取
|
||
SG_APISHARED_EXPORT void sg_getBagPosition(
|
||
SVzNL3DLaserLine* laser3DPoints,
|
||
int lineNum,
|
||
//std::vector<SSG_lineFeature>& all_vLineFeatures,
|
||
//std::vector<std::vector<int>>& noisePts,
|
||
const SG_bagPositionParam algoParam,
|
||
const SSG_planeCalibPara poseCalibPara,
|
||
std::vector<SSG_peakRgnInfo>& objOps);
|
||
|
||
SG_APISHARED_EXPORT void sg_sideBagPosition(
|
||
SVzNL3DLaserLine* laser3DPoints,
|
||
int lineNum,
|
||
const SG_bagPositionParam algoParam,
|
||
std::vector<SSG_sideBagInfo>& objOps);
|
||
|
||
SG_APISHARED_EXPORT void sg_getSideBagStackBasePosition(
|
||
SVzNL3DLaserLine* laser3DPoints,
|
||
int lineNum,
|
||
const SSG_stackBaseParam stackBaseParam,
|
||
const SSG_treeGrowParam growParam,
|
||
SSG_6DOF* stackBasePosition //垛的托盘的中心位置和角度
|
||
);
|
||
|
||
//计算一个平面调平参数。
|
||
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
|
||
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
|
||
SG_APISHARED_EXPORT SSG_planeCalibPara sg_getBagBaseCalibPara(
|
||
SVzNL3DLaserLine* laser3DPoints,
|
||
int lineNum); |