|
@@ -516,18 +516,17 @@ 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");
|
|
|
-
|
|
|
// std::cout << "\n-------- no result: " << std::endl;
|
|
|
//LOG_IF(INFO, m_region.region_id() == 4) << "failed with midz, currz: " << mid_z << ", " << chassis_z;
|
|
|
return Error_manager(VELODYNE_REGION_CERES_SOLVE_ERROR, NEGLIGIBLE_ERROR, "3d wheel detect failed.");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ // // 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 (m_region.region_id() == 0 && save_debug++ == 5)
|
|
|
+ // m_detector->save_debug_data("/home/zx/yct/chutian_measure_2021/build");
|
|
|
// LOG_IF(INFO, m_region.region_id() == 4) << "detected with suitable z value: " << chassis_z;
|
|
|
}
|
|
|
/// to be
|
|
@@ -641,6 +640,11 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
|
{
|
|
|
res |= Range_status::Range_angle_anti_clock;
|
|
|
}
|
|
|
+ // // 判断车辆前轮角回正情况
|
|
|
+ // if (fabs(measure_result.car_front_theta) > 8.0)
|
|
|
+ // {
|
|
|
+ // res |= Range_status::Range_steering_wheel_nozero;
|
|
|
+ // }
|
|
|
res |= outOfRangeDetection(cloud, plate_cx, plate_cy, theta);
|
|
|
return res;
|
|
|
}
|
|
@@ -771,6 +775,12 @@ void Ground_region::thread_measure_func()
|
|
|
if (ec == SUCCESS)
|
|
|
{
|
|
|
m_car_wheel_information.car_wheel_base = t_wheel_info_stamped.wheel_data.car_wheel_base;
|
|
|
+ m_car_wheel_information.car_front_theta = t_wheel_info_stamped.wheel_data.car_front_theta;
|
|
|
+ // 临时添加,滤波后前轮超界
|
|
|
+ if(fabs(m_car_wheel_information.car_front_theta)>8.0)
|
|
|
+ {
|
|
|
+ m_car_wheel_information.range_status |= Range_status::Range_steering_wheel_nozero;
|
|
|
+ }
|
|
|
}
|
|
|
// else{
|
|
|
// std::cout<<ec.to_string()<<std::endl;
|