|
|
|
|
@ -87,7 +87,17 @@ public class InventoryService {
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) {
|
|
|
|
|
String currentPath = path.replace(".pcd", "_" + i + ".pcd"); // 添加索引以区分不同次拍照的文件路径
|
|
|
|
|
LxPointCloudSaveImage.saveImage(configProperties.getCameraConfig().getCamera3D(), currentPath, 1);
|
|
|
|
|
Integer picResult = LxPointCloudSaveImage.saveImage(configProperties.getCameraConfig().getCamera3D(), currentPath, 1);
|
|
|
|
|
if ( picResult==-3){
|
|
|
|
|
// 网络问题
|
|
|
|
|
log.error("3D拍照失败:"+picResult);
|
|
|
|
|
return -1;
|
|
|
|
|
}else if(picResult != 0 && picResult!=25){
|
|
|
|
|
// 没有成功拍照
|
|
|
|
|
log.error("3D拍照失败:"+picResult);
|
|
|
|
|
return -2;
|
|
|
|
|
}
|
|
|
|
|
log.info("3D拍照成功 :"+picResult);
|
|
|
|
|
|
|
|
|
|
Integer result = PointCloudProcessor.getBaijiuBox(
|
|
|
|
|
currentPath,
|
|
|
|
|
@ -107,9 +117,6 @@ public class InventoryService {
|
|
|
|
|
|
|
|
|
|
return results.get(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(300*(i+1)); // 间隔300ms
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
|