|
@@ -657,28 +657,29 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
// LOG_IF(WARNING, m_region.region_id() == 4)<< "border minmax x: "<< min_p.x<<", "<<max_p.x<<", res: "<<res;
|
|
// LOG_IF(WARNING, m_region.region_id() == 4)<< "border minmax x: "<< min_p.x<<", "<<max_p.x<<", res: "<<res;
|
|
return res;
|
|
return res;
|
|
#else
|
|
#else
|
|
- if(min_p.x < m_region.border_minx()-0.005)
|
|
|
|
|
|
+ if(min_p.x < m_region.border_minx()-0.000)
|
|
{
|
|
{
|
|
m_range_status_last |= Range_status::Range_left;
|
|
m_range_status_last |= Range_status::Range_left;
|
|
}
|
|
}
|
|
- else if(min_p.x > m_region.border_minx()+0.005)
|
|
|
|
|
|
+ else if(min_p.x > m_region.border_minx()+0.010)
|
|
{
|
|
{
|
|
int t = Range_status::Range_left;
|
|
int t = Range_status::Range_left;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
}
|
|
}
|
|
//else m_range_status_last no change
|
|
//else m_range_status_last no change
|
|
|
|
|
|
- if(max_p.x > m_region.border_maxx()+0.005)
|
|
|
|
|
|
+ if(max_p.x > m_region.border_maxx()+0.000)
|
|
{
|
|
{
|
|
m_range_status_last |= Range_status::Range_right;
|
|
m_range_status_last |= Range_status::Range_right;
|
|
}
|
|
}
|
|
- else if(max_p.x < m_region.border_maxx()-0.005)
|
|
|
|
|
|
+ else if(max_p.x < m_region.border_maxx()-0.010)
|
|
{
|
|
{
|
|
int t = Range_status::Range_right;
|
|
int t = Range_status::Range_right;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
}
|
|
}
|
|
//else m_range_status_last no change
|
|
//else m_range_status_last no change
|
|
|
|
|
|
|
|
+
|
|
return m_range_status_last;
|
|
return m_range_status_last;
|
|
#endif //ANTI_SHAKE
|
|
#endif //ANTI_SHAKE
|
|
}
|
|
}
|
|
@@ -765,14 +766,14 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
// LOG(WARNING) << m_range_status_last;
|
|
// LOG(WARNING) << m_range_status_last;
|
|
// 车位位于y负方向,判断后轮超界情况
|
|
// 车位位于y负方向,判断后轮超界情况
|
|
double t_center_y = 0.0 - (car_uniform_center.y() + m_region.plc_offsety()); // 汽车中心y, 参照plc坐标,并且进行偏移, 绝对值。结果大约为 5~6左右
|
|
double t_center_y = 0.0 - (car_uniform_center.y() + m_region.plc_offsety()); // 汽车中心y, 参照plc坐标,并且进行偏移, 绝对值。结果大约为 5~6左右
|
|
- if( t_center_y - 4.88 + 0.5*(measure_result.car_wheel_base - 2.7) < m_region.plc_border_maxy()-0.005 &&
|
|
|
|
- t_center_y - 4.88 - 0.5*(measure_result.car_wheel_base - 2.7) < m_region.plc_border_miny()-0.005 )
|
|
|
|
|
|
+ if( t_center_y - 4.88 + 0.5*(measure_result.car_wheel_base - 2.7) < m_region.plc_border_maxy()-0.000 &&
|
|
|
|
+ t_center_y - 4.88 - 0.5*(measure_result.car_wheel_base - 2.7) < m_region.plc_border_miny()-0.000 )
|
|
{
|
|
{
|
|
int t = Range_status::Range_back;
|
|
int t = Range_status::Range_back;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
}
|
|
}
|
|
- else if( t_center_y - 4.88 + 0.5*(measure_result.car_wheel_base - 2.7) > m_region.plc_border_maxy()+0.005 ||
|
|
|
|
- t_center_y - 4.88 - 0.5*(measure_result.car_wheel_base - 2.7) > m_region.plc_border_miny()+0.005 )
|
|
|
|
|
|
+ else if( t_center_y - 4.88 + 0.5*(measure_result.car_wheel_base - 2.7) > m_region.plc_border_maxy()+0.010 ||
|
|
|
|
+ t_center_y - 4.88 - 0.5*(measure_result.car_wheel_base - 2.7) > m_region.plc_border_miny()+0.010 )
|
|
{
|
|
{
|
|
m_range_status_last |= Range_status::Range_back;
|
|
m_range_status_last |= Range_status::Range_back;
|
|
}
|
|
}
|
|
@@ -780,13 +781,13 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
// LOG(WARNING) << m_range_status_last;
|
|
// LOG(WARNING) << m_range_status_last;
|
|
|
|
|
|
// 判断车辆宽度超界情况
|
|
// 判断车辆宽度超界情况
|
|
- if (measure_result.car_wheel_width < m_region.car_min_width()-0.005 ||
|
|
|
|
- measure_result.car_wheel_width > m_region.car_max_width()+0.005)
|
|
|
|
|
|
+ if (measure_result.car_wheel_width < m_region.car_min_width()-0.000 ||
|
|
|
|
+ measure_result.car_wheel_width > m_region.car_max_width()+0.000)
|
|
{
|
|
{
|
|
m_range_status_last |= Range_status::Range_car_width;
|
|
m_range_status_last |= Range_status::Range_car_width;
|
|
}
|
|
}
|
|
- else if (measure_result.car_wheel_width > m_region.car_min_width()+0.005 &&
|
|
|
|
- measure_result.car_wheel_width < m_region.car_max_width()-0.005)
|
|
|
|
|
|
+ else if (measure_result.car_wheel_width > m_region.car_min_width()+0.010 &&
|
|
|
|
+ measure_result.car_wheel_width < m_region.car_max_width()-0.010)
|
|
{
|
|
{
|
|
int t = Range_status::Range_car_width;
|
|
int t = Range_status::Range_car_width;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
@@ -795,13 +796,13 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
// LOG(WARNING) << m_range_status_last;
|
|
// LOG(WARNING) << m_range_status_last;
|
|
|
|
|
|
// 判断车辆轴距超界情况
|
|
// 判断车辆轴距超界情况
|
|
- if (measure_result.car_wheel_base < m_region.car_min_wheelbase()-0.005 ||
|
|
|
|
- measure_result.car_wheel_base > m_region.car_max_wheelbase()+0.005)
|
|
|
|
|
|
+ if (measure_result.car_wheel_base < m_region.car_min_wheelbase()-0.000 ||
|
|
|
|
+ measure_result.car_wheel_base > m_region.car_max_wheelbase()+0.000)
|
|
{
|
|
{
|
|
res |= Range_status::Range_car_wheelbase;
|
|
res |= Range_status::Range_car_wheelbase;
|
|
}
|
|
}
|
|
- else if (measure_result.car_wheel_base > m_region.car_min_wheelbase()+0.005 ||
|
|
|
|
- measure_result.car_wheel_base < m_region.car_max_wheelbase()-0.005)
|
|
|
|
|
|
+ else if (measure_result.car_wheel_base > m_region.car_min_wheelbase()+0.010 ||
|
|
|
|
+ measure_result.car_wheel_base < m_region.car_max_wheelbase()-0.010)
|
|
{
|
|
{
|
|
int t = Range_status::Range_car_wheelbase;
|
|
int t = Range_status::Range_car_wheelbase;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
@@ -815,11 +816,11 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
double t_dtheta = measure_result.car_angle + m_region.plc_offset_degree(); // 车身的旋转角, 修正到正5度, (m_region.plc_offset_degree():-89)
|
|
double t_dtheta = measure_result.car_angle + m_region.plc_offset_degree(); // 车身的旋转角, 修正到正5度, (m_region.plc_offset_degree():-89)
|
|
int t_terminal_id = m_region.region_id() +1; //region_id:0~5, terminal_id:1~6
|
|
int t_terminal_id = m_region.region_id() +1; //region_id:0~5, terminal_id:1~6
|
|
//turnplate_angle_min = -5, turnplate_angle_max = 5,
|
|
//turnplate_angle_min = -5, turnplate_angle_max = 5,
|
|
- if (t_dtheta > System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_max()+0.05)
|
|
|
|
|
|
+ if (t_dtheta > System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_max()+0.00)
|
|
{
|
|
{
|
|
m_range_status_last |= Range_status::Range_angle_anti_clock;
|
|
m_range_status_last |= Range_status::Range_angle_anti_clock;
|
|
}
|
|
}
|
|
- else if (t_dtheta < System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_max()-0.05)
|
|
|
|
|
|
+ else if (t_dtheta < System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_max()-0.10)
|
|
{
|
|
{
|
|
int t = Range_status::Range_angle_anti_clock;
|
|
int t = Range_status::Range_angle_anti_clock;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
@@ -827,11 +828,11 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
// LOG(WARNING) << m_range_status_last;
|
|
// LOG(WARNING) << m_range_status_last;
|
|
|
|
|
|
//else m_range_status_last no change
|
|
//else m_range_status_last no change
|
|
- if (t_dtheta < System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_min()-0.05)
|
|
|
|
|
|
+ if (t_dtheta < System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_min()-0.00)
|
|
{
|
|
{
|
|
res |= Range_status::Range_angle_clock;
|
|
res |= Range_status::Range_angle_clock;
|
|
}
|
|
}
|
|
- else if (t_dtheta > System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_min()+0.05)
|
|
|
|
|
|
+ else if (t_dtheta > System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_min()+0.10)
|
|
{
|
|
{
|
|
int t = Range_status::Range_angle_clock;
|
|
int t = Range_status::Range_angle_clock;
|
|
m_range_status_last &= (~t);
|
|
m_range_status_last &= (~t);
|
|
@@ -840,6 +841,7 @@ int Ground_region::outOfRangeDetection(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
|
|
// LOG(INFO) << t_dtheta<<", "<<System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_min()<<std::endl;
|
|
// LOG(INFO) << t_dtheta<<", "<<System_communication_mq::get_instance_references().dispatch_region_info_map[t_terminal_id].turnplate_angle_min()<<std::endl;
|
|
//else m_range_status_last no change
|
|
//else m_range_status_last no change
|
|
|
|
|
|
|
|
+
|
|
m_range_status_last |= outOfRangeDetection(cloud, plate_cx, plate_cy, theta);
|
|
m_range_status_last |= outOfRangeDetection(cloud, plate_cx, plate_cy, theta);
|
|
return m_range_status_last;
|
|
return m_range_status_last;
|
|
#endif
|
|
#endif
|