|
@@ -599,16 +599,17 @@ Error_manager Ground_region::detect(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, d
|
|
|
pcl::getMinMax3D(*t_width_extract_cloud, t_min_p, t_max_p);
|
|
|
|
|
|
double accurate_width = t_max_p.x - t_min_p.x;
|
|
|
- last_result.width = accurate_width;
|
|
|
-
|
|
|
- // !!!暂时不限制宽度数据
|
|
|
- // char valid_info[255];
|
|
|
- // sprintf(valid_info, "validation for car width, origin/accurate: (%.3f, %.3f)", last_result.width, accurate_width);
|
|
|
- // // 允许一边5cm误差,且保证车宽应比车轮识别计算出的大,否则为错误宽度数据
|
|
|
- // if (accurate_width - last_result.width > 0.1 || accurate_width < last_result.width)
|
|
|
- // {
|
|
|
- // return Error_manager(VELODYNE_REGION_CERES_SOLVE_ERROR, NEGLIGIBLE_ERROR, valid_info);
|
|
|
- // }
|
|
|
+
|
|
|
+ char valid_info[255];
|
|
|
+ sprintf(valid_info, "validation for car width, origin/accurate: (%.3f, %.3f)", last_result.width, accurate_width);
|
|
|
+ // 允许一边4cm误差,且保证车宽应比车轮识别计算出的大,否则为错误宽度数据
|
|
|
+ if (accurate_width - last_result.width > 0.08 || accurate_width < last_result.width)
|
|
|
+ {
|
|
|
+ //return Error_manager(VELODYNE_REGION_CERES_SOLVE_ERROR, NEGLIGIBLE_ERROR, valid_info);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ last_result.width = accurate_width;
|
|
|
+ }
|
|
|
// if (m_region.region_id() == 0 || m_region.region_id() == 4)
|
|
|
// {
|
|
|
// LOG(WARNING) << valid_info;
|