提交 7cfa4468 编写于 作者: A Aaron Xiao 提交者: Xiangquan Xiao

Storytelling: Read global flagfile to load correct map.

上级 69e1fee9
......@@ -4,6 +4,7 @@ module_config {
class_name : "Storytelling"
config {
name: "storytelling"
flag_file_path: "/apollo/modules/common/data/global_flagfile.txt"
interval: 100
}
}
......
......@@ -34,7 +34,7 @@ using apollo::prediction::PredictionMap;
bool IsPointInPNCJunction(const PathPoint& point, std::string* junction_id) {
const auto junctions = PredictionMap::GetPNCJunctions(
Eigen::Vector2d(point.x(), point.y()), FLAGS_junction_search_radius);
{point.x(), point.y()}, FLAGS_junction_search_radius);
if (junctions.empty() || junctions.front() == nullptr) {
return false;
}
......@@ -50,7 +50,7 @@ bool IsPointInPNCJunction(const PathPoint& point, std::string* junction_id) {
bool IsPointInRegularJunction(const PathPoint& point,
std::string* junction_id) {
const auto junctions = PredictionMap::GetJunctions(
Eigen::Vector2d(point.x(), point.y()), FLAGS_junction_search_radius);
{point.x(), point.y()}, FLAGS_junction_search_radius);
if (junctions.empty() || junctions.front() == nullptr) {
return false;
}
......@@ -101,6 +101,7 @@ double DistanceToJunction(const ADCTrajectory& adc_trajectory,
void CloseToJunctionTeller::Init() {
auto* manager = FrameManager::Instance();
manager->CreateOrGetReader<ADCTrajectory>(FLAGS_planning_trajectory_topic);
CHECK(PredictionMap::Ready()) << "PredictionMap not ready";
}
void CloseToJunctionTeller::Update(Stories* stories) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册