rodAndBarDetection version 1.2.2 :
调整了定位盘中心姿态定义:法向(Z向):向右;Y:向下
This commit is contained in:
parent
f06bc65347
commit
96938e61b5
@ -492,9 +492,9 @@ void _outputRGBDScan_RGBD_centerPose(
|
|||||||
double len = 60;
|
double len = 60;
|
||||||
lineIdx = 0;
|
lineIdx = 0;
|
||||||
{
|
{
|
||||||
SVzNL3DPoint pt0 = { poseInfo.center.x - len * poseInfo.normalDir.x,
|
SVzNL3DPoint pt0 = { poseInfo.center.x, // - len * poseInfo.normalDir.x,
|
||||||
poseInfo.center.y - len * poseInfo.normalDir.y,
|
poseInfo.center.y, // - len * poseInfo.normalDir.y,
|
||||||
poseInfo.center.z - len * poseInfo.normalDir.z };
|
poseInfo.center.z }; // - len * poseInfo.normalDir.z };
|
||||||
SVzNL3DPoint pt1 = { poseInfo.center.x + len * poseInfo.normalDir.x,
|
SVzNL3DPoint pt1 = { poseInfo.center.x + len * poseInfo.normalDir.x,
|
||||||
poseInfo.center.y + len * poseInfo.normalDir.y,
|
poseInfo.center.y + len * poseInfo.normalDir.y,
|
||||||
poseInfo.center.z + len * poseInfo.normalDir.z };
|
poseInfo.center.z + len * poseInfo.normalDir.z };
|
||||||
@ -1079,7 +1079,7 @@ void rodWeldSeamPosition_test(void)
|
|||||||
{
|
{
|
||||||
//fidx =1;
|
//fidx =1;
|
||||||
char _scan_file[256];
|
char _scan_file[256];
|
||||||
sprintf_s(_scan_file, "%sLaserData_%d.txt", dataPath[grp], fidx);
|
sprintf_s(_scan_file, "%s%d_LaserData_ID019567.txt", dataPath[grp], fidx);
|
||||||
|
|
||||||
std::vector<std::vector< SVzNL3DPosition>> scanLines;
|
std::vector<std::vector< SVzNL3DPosition>> scanLines;
|
||||||
wdReadLaserScanPointFromFile_XYZ_vector(_scan_file, scanLines);
|
wdReadLaserScanPointFromFile_XYZ_vector(_scan_file, scanLines);
|
||||||
@ -1091,8 +1091,8 @@ void rodWeldSeamPosition_test(void)
|
|||||||
long t1 = (long)GetTickCount64();//统计时间
|
long t1 = (long)GetTickCount64();//统计时间
|
||||||
|
|
||||||
SSX_rodParam rodParam;
|
SSX_rodParam rodParam;
|
||||||
rodParam.diameter = 52.0; //圆棒直径
|
rodParam.diameter = 16.0; //钢筋直径
|
||||||
rodParam.len = 290;
|
rodParam.len = 50;
|
||||||
|
|
||||||
SSG_cornerParam cornerParam;
|
SSG_cornerParam cornerParam;
|
||||||
cornerParam.cornerTh = 60; //45度角
|
cornerParam.cornerTh = 60; //45度角
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
//version 1.1.1 : 初始发布给客户的版本
|
//version 1.1.1 : 初始发布给客户的版本
|
||||||
//version 1.2.0 : 配天螺杆测量增加了定位盘中心测量功能
|
//version 1.2.0 : 配天螺杆测量增加了定位盘中心测量功能
|
||||||
//version 1.2.1 : 增加了定位盘中心完整姿态输出
|
//version 1.2.1 : 增加了定位盘中心完整姿态输出
|
||||||
std::string m_strVersion = "1.2.1";
|
//version 1.2.2 : 调整了定位盘中心姿态定义:法向(Z向):向右;Y:向下
|
||||||
|
std::string m_strVersion = "1.2.2";
|
||||||
const char* wd_rodAndBarDetectionVersion(void)
|
const char* wd_rodAndBarDetectionVersion(void)
|
||||||
{
|
{
|
||||||
return m_strVersion.c_str();
|
return m_strVersion.c_str();
|
||||||
@ -832,9 +833,9 @@ SSX_pointPoseInfo sx_getLocationPlatePose(
|
|||||||
}
|
}
|
||||||
double center_z = (ptTop.z + ptBtm.z + ptLeft.z + ptRight.z) / 4;
|
double center_z = (ptTop.z + ptBtm.z + ptLeft.z + ptRight.z) / 4;
|
||||||
resultPose.center = { center_x, center_y, center_z };
|
resultPose.center = { center_x, center_y, center_z };
|
||||||
resultPose.xDir = { 1.0, 0.0, 0 };
|
resultPose.xDir = { 0.0, 0.0, -1.0 }; // { 1.0, 0.0, 0 };
|
||||||
resultPose.yDir = { 0.0, 1.0, 0 };
|
resultPose.yDir = { 0.0, 1.0, 0 };
|
||||||
resultPose.normalDir = { 0.0, 0.0, 1.0 };
|
resultPose.normalDir = { 1.0, 0.0, 0 };// { 0.0, 0.0, 1.0 };
|
||||||
//旋转回去
|
//旋转回去
|
||||||
for (int i = 0; i < lineNum; i++)
|
for (int i = 0; i < lineNum; i++)
|
||||||
{
|
{
|
||||||
@ -875,7 +876,7 @@ void rodAarcFeatueDetection(
|
|||||||
int linePtNum = (int)scanLines[0].size();
|
int linePtNum = (int)scanLines[0].size();
|
||||||
for (int line = 0; line < lineNum; line++)
|
for (int line = 0; line < lineNum; line++)
|
||||||
{
|
{
|
||||||
if (line == 424)
|
if (line == 1100)
|
||||||
int kkk = 1;
|
int kkk = 1;
|
||||||
std::vector<SVzNL3DPosition>& lineData = scanLines[line];
|
std::vector<SVzNL3DPosition>& lineData = scanLines[line];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user