提交 8a4e2e98 编写于 作者: F fanzhu1985 提交者: Capri2014

Routing: create BUILD for strategy (#327)

* Resolve conflict

* add bazel for strategy
上级 01feae0b
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "strategy",
deps = [
":routing_a_star_strategy",
],
)
cc_library(
name = "routing_a_star_strategy",
srcs = [
"a_star_strategy.cc",
],
hdrs = [
"a_star_strategy.h",
"strategy.h",
],
deps = [
"//modules/common/proto:common_proto",
"//modules/map/proto:map_proto",
"//modules/routing/proto:routing_proto",
"//modules/common:common",
"//modules/routing/common",
"//modules/routing/graph",
],
)
cpplint()
......@@ -80,8 +80,8 @@ void AStarStrategy::clear() {
double AStarStrategy::heuristic_cost(const TopoNode* src_node,
const TopoNode* dest_node) {
const ::apollo::hdmap::Point& src_point = src_node->anchor_point();
const ::apollo::hdmap::Point& dest_point = dest_node->anchor_point();
const ::apollo::common::PointENU& src_point = src_node->anchor_point();
const ::apollo::common::PointENU& dest_point = dest_node->anchor_point();
double distance = sqrt(pow(src_point.x() - dest_point.x(), 2) +
pow(src_point.y() - dest_point.y(), 2) +
pow(src_point.z() - dest_point.z(), 2));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册