提交 69117ebe 编写于 作者: Y Yuliang Guo 提交者: Jiangtao Hu

Perception: update a condition to output trafficlights (#2125)

* Solve all the related issues to make traffic light run.

Specific issues include: 1. Correct the wrong format in .dag,  parameter, and configuration files. 2. add camara parameter files which are expected from the code.
3. Correct the wrong use of Cyber::SUCC in an algorithm condition in trafficlights_perception_component.cc.

* sync with the latest lib.so name

* output single traffic light result based on voting

* modify the condition to output trafficlights result
上级 fe788f91
......@@ -783,7 +783,7 @@ bool TrafficLightsPerceptionComponent::TransformOutputMessage(
if (max_light_id > 0)
std::swap(lights[0], lights[max_light_id]);
if (max_light_id > 0) {
if (max_light_id >= 0) {
apollo::perception::TrafficLight *light_result =
(*out_msg)->add_traffic_light();
light_result->set_id(lights.at(0)->id);
......@@ -968,7 +968,7 @@ void TrafficLightsPerceptionComponent::Visualize(
}
cv::resize(output_image, output_image, cv::Size(), 0.5, 0.5);
cv::imshow("Traffic Lihgt", output_image);
cv::imshow("Traffic Light", output_image);
// cv::imwrite("/apollo/debug_vis/" +
// std::to_string(frame.timestamp) + ".jpg", output_image);
cvWaitKey(30);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册