|
@@ -434,13 +434,15 @@ Error_manager Ground_region::get_last_wheel_information(Common_data::Car_wheel_i
|
|
" POINTER IS NULL ");
|
|
" POINTER IS NULL ");
|
|
}
|
|
}
|
|
//获取指令时间之后的信息, 如果没有就会报错, 不会等待
|
|
//获取指令时间之后的信息, 如果没有就会报错, 不会等待
|
|
|
|
+// LOG(WARNING) << std::chrono::duration_cast<std::chrono::milliseconds>(command_time-m_detect_update_time).count()/1000.0 <<", "
|
|
|
|
+// <<std::chrono::duration_cast<std::chrono::milliseconds>(command_time-m_cloud_collection_time).count()/1000.0;
|
|
if( m_detect_update_time > command_time - std::chrono::milliseconds(GROUND_REGION_DETECT_CYCLE_MS))
|
|
if( m_detect_update_time > command_time - std::chrono::milliseconds(GROUND_REGION_DETECT_CYCLE_MS))
|
|
{
|
|
{
|
|
*p_car_wheel_information = m_car_wheel_information;
|
|
*p_car_wheel_information = m_car_wheel_information;
|
|
if(m_car_wheel_information.correctness)
|
|
if(m_car_wheel_information.correctness)
|
|
return Error_code::SUCCESS;
|
|
return Error_code::SUCCESS;
|
|
else
|
|
else
|
|
- return Error_manager(Error_code::VELODYNE_REGION_CERES_SOLVE_ERROR, Error_level::MINOR_ERROR, " Ground_region detect error ");
|
|
|
|
|
|
+ return Error_manager(Error_code::VELODYNE_REGION_CERES_SOLVE_ERROR, Error_level::MINOR_ERROR, " Ground_region detect error");
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -467,8 +469,10 @@ void Ground_region::thread_measure_func()
|
|
{
|
|
{
|
|
m_region_status = E_BUSY;
|
|
m_region_status = E_BUSY;
|
|
detect_wheel_ceres3d::Detect_result t_result;
|
|
detect_wheel_ceres3d::Detect_result t_result;
|
|
|
|
+
|
|
Error_manager ec = detect(mp_cloud_collection, t_result);
|
|
Error_manager ec = detect(mp_cloud_collection, t_result);
|
|
m_detect_update_time = std::chrono::system_clock::now();
|
|
m_detect_update_time = std::chrono::system_clock::now();
|
|
|
|
+
|
|
m_car_wheel_information.center_x = t_result.cx;
|
|
m_car_wheel_information.center_x = t_result.cx;
|
|
m_car_wheel_information.center_y = t_result.cy;
|
|
m_car_wheel_information.center_y = t_result.cy;
|
|
m_car_wheel_information.car_angle = t_result.theta;
|
|
m_car_wheel_information.car_angle = t_result.theta;
|