|
@@ -264,7 +264,7 @@ bool Ground_region::classify_ceres_detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- LOG(WARNING) << error_str;
|
|
|
+ // LOG(WARNING) << error_str;
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -357,7 +357,7 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
pcl::StatisticalOutlierRemoval<pcl::PointXYZ> sor;
|
|
|
sor.setInputCloud(cloud_filtered);
|
|
|
sor.setMeanK(15); //K近邻搜索点个数
|
|
|
- sor.setStddevMulThresh(1.0); //标准差倍数
|
|
|
+ sor.setStddevMulThresh(3.0); //标准差倍数
|
|
|
sor.setNegative(false); //保留未滤波点(内点)
|
|
|
sor.filter(*cloud_filtered); //保存滤波结果到cloud_filter
|
|
|
|
|
@@ -367,7 +367,7 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
//下采样
|
|
|
pcl::ApproximateVoxelGrid<pcl::PointXYZ> vox; //创建滤波对象
|
|
|
vox.setInputCloud(cloud_filtered); //设置需要过滤的点云给滤波对象
|
|
|
- vox.setLeafSize(0.01f, 0.01f, 0.01f); //设置滤波时创建的体素体积为1cm的立方体
|
|
|
+ vox.setLeafSize(0.02f, 0.02f, 0.02f); //设置滤波时创建的体素体积为1cm的立方体
|
|
|
vox.filter(*cloud_filtered); //执行滤波处理,存储输出
|
|
|
|
|
|
if (cloud_filtered->size() == 0)
|
|
@@ -386,7 +386,7 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
{
|
|
|
return Error_manager(VELODYNE_REGION_CERES_SOLVE_ERROR, NEGLIGIBLE_ERROR, "find general car pose value failed.");
|
|
|
}
|
|
|
- LOG(INFO) << "car pose :::: cx: " << x+m_region.plc_offsetx() << ", cy: " << y+m_region.plc_offsety() << ", theta: " << theta*180.0/M_PI << std::endl;
|
|
|
+ // LOG(INFO) << "car pose :::: cx: " << x+m_region.plc_offsetx() << ", cy: " << y+m_region.plc_offsety() << ", theta: " << theta*180.0/M_PI << std::endl;
|
|
|
|
|
|
std::chrono::steady_clock::time_point t2 = std::chrono::steady_clock::now();
|
|
|
std::chrono::duration<double> time_used_bowl = std::chrono::duration_cast<std::chrono::duration<double>>(t2 - t1);
|
|
@@ -406,7 +406,7 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
//离群点过滤
|
|
|
sor.setInputCloud(cloud_z_solver);
|
|
|
sor.setMeanK(15); //K近邻搜索点个数
|
|
|
- sor.setStddevMulThresh(1.0); //标准差倍数
|
|
|
+ sor.setStddevMulThresh(3.0); //标准差倍数
|
|
|
sor.setNegative(false); //保留未滤波点(内点)
|
|
|
sor.filter(*cloud_z_solver); //保存滤波结果到cloud_filter
|
|
|
|
|
@@ -456,11 +456,11 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
{
|
|
|
return Error_manager(VELODYNE_REGION_CERES_SOLVE_ERROR, NEGLIGIBLE_ERROR, (std::string("optimized chassis z value out of range: ")+std::to_string(chassis_z)).c_str());
|
|
|
}
|
|
|
- bool ret = false;
|
|
|
+ bool ret = false;
|
|
|
|
|
|
while (chassis_z > (mid_z))
|
|
|
{
|
|
|
- LOG_IF(WARNING, m_region.region_id() == 4) << "chassis z: " << chassis_z;
|
|
|
+ // LOG_IF(WARNING, m_region.region_id() == 4) << "chassis z: " << chassis_z;
|
|
|
ret = classify_ceres_detect(cloud_filtered, chassis_z, result);
|
|
|
// changed by yct, 根据底盘z识别,失败则向下移动直至成功或超过底盘内空中点
|
|
|
if(ret)
|
|
@@ -479,11 +479,11 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
|
|
|
if (results.size() == 0)
|
|
|
{
|
|
|
- // 20201010, may lead to problem in chutian, uncomment in debug only
|
|
|
- // changed by yct, save 3d wheel detect result.
|
|
|
- static int save_debug = 0;
|
|
|
- if (save_debug++ == 5)
|
|
|
- m_detector->save_debug_data("/home/youchen/extra_space/chutian/measure/chutian_velo_ws/log/debug");
|
|
|
+ // // 20201010, may lead to problem in chutian, uncomment in debug only
|
|
|
+ // // changed by yct, save 3d wheel detect result.
|
|
|
+ // static int save_debug = 0;
|
|
|
+ // if (save_debug++ == 5)
|
|
|
+ // m_detector->save_debug_data("/home/youchen/extra_space/chutian/measure/chutian_velo_ws/log/debug");
|
|
|
|
|
|
// std::cout << "\n-------- no result: " << std::endl;
|
|
|
LOG_IF(INFO, m_region.region_id() == 4) << "failed with midz, currz: " << mid_z << ", " << chassis_z;
|