diff --git a/modules/example/component_driver/BUILD b/modules/example/component_driver/BUILD index 1b7cdf291e4a6f66084b80299db010d44a2e2b3e..74ba8ce09a25113b0ffe5e2e8d0e8c71590c0c36 100644 --- a/modules/example/component_driver/BUILD +++ b/modules/example/component_driver/BUILD @@ -1,3 +1,5 @@ +load("//tools:cpplint.bzl", "cpplint") + package(default_visibility = ["//visibility:public"]) # https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library @@ -18,4 +20,6 @@ cc_library( "//framework:cybertron", ], copts = ['-DMODULE_NAME=\\"driver\\"'] -) \ No newline at end of file +) + +cpplint() diff --git a/modules/example/component_perception/BUILD b/modules/example/component_perception/BUILD index 4a69c1082479a25c008e21d9ed547fa592f8d193..133bf24f467a1d014e866d159ae9070658c36c8b 100644 --- a/modules/example/component_perception/BUILD +++ b/modules/example/component_perception/BUILD @@ -1,3 +1,5 @@ +load("//tools:cpplint.bzl", "cpplint") + package(default_visibility = ["//visibility:public"]) # https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library @@ -18,4 +20,6 @@ cc_library( "//modules/example/component_driver/proto:driver_proto" ], copts = ['-DMODULE_NAME=\\"perception\\"'] -) \ No newline at end of file +) + +cpplint() diff --git a/modules/example/component_planning/BUILD b/modules/example/component_planning/BUILD index 0cfcde29390dcfc1ada04e863d50f5dd7389ca77..ed9a8bd16efc4b2ad9a603a5dc4f036a3426d569 100644 --- a/modules/example/component_planning/BUILD +++ b/modules/example/component_planning/BUILD @@ -1,3 +1,5 @@ +load("//tools:cpplint.bzl", "cpplint") + package(default_visibility = ["//visibility:public"]) # https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library @@ -15,4 +17,6 @@ cc_library( hdrs = ["planning_component.h"], deps = ["//framework:cybertron"], copts = ['-DMODULE_NAME=\\"planning\\"'] -) \ No newline at end of file +) + +cpplint() diff --git a/modules/example/component_watchdog/BUILD b/modules/example/component_watchdog/BUILD index 34094588f8808a9b8664e5075dc75ac776681343..c0a9857995720acd4e4492a2b2f346f6aff819d7 100644 --- a/modules/example/component_watchdog/BUILD +++ b/modules/example/component_watchdog/BUILD @@ -1,3 +1,5 @@ +load("//tools:cpplint.bzl", "cpplint") + package(default_visibility = ["//visibility:public"]) # https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library @@ -19,4 +21,6 @@ cc_library( "//framework:cybertron" ], copts = ['-DMODULE_NAME=\\"watchdog\\"'] -) \ No newline at end of file +) + +cpplint() diff --git a/modules/guardian/guardian_component.h b/modules/guardian/guardian_component.h index 1ee395b2c5ea6219d8cd297fd2dca12a4940dc3a..23459cac06af2b0769cf77fbdb360292e94dafb5 100644 --- a/modules/guardian/guardian_component.h +++ b/modules/guardian/guardian_component.h @@ -22,6 +22,7 @@ #define MODEULES_GUARDIAN_GUARDIAN_COMPONENT_H_ #include +#include #include #include #include diff --git a/modules/prediction/util/BUILD b/modules/prediction/util/BUILD index 4f035ada08ceaefac4e91fb1acd0a4a0c19a409e..febe69e1419e54bb9ea59e72f6565a35bae25b9e 100644 --- a/modules/prediction/util/BUILD +++ b/modules/prediction/util/BUILD @@ -1,5 +1,7 @@ load("//tools:cpplint.bzl", "cpplint") +load("//tools:cpplint.bzl", "cpplint") + package(default_visibility = ["//visibility:public"]) cc_library( @@ -14,3 +16,5 @@ cc_library( "//framework:cybertron", ], ) + +cpplint() diff --git a/modules/routing/common/routing_gflags.cc b/modules/routing/common/routing_gflags.cc index 04a50267004eeb8ab0193fcd3fadcefde0abf069..5c0616803005e328e7a24f22d27250f38d869af2 100644 --- a/modules/routing/common/routing_gflags.cc +++ b/modules/routing/common/routing_gflags.cc @@ -16,7 +16,8 @@ #include "modules/routing/common/routing_gflags.h" -DEFINE_string(routing_conf_file, "/apollo/modules/routing/conf/routing_config.pb.txt", +DEFINE_string(routing_conf_file, + "/apollo/modules/routing/conf/routing_config.pb.txt", "default routing conf data file"); DEFINE_string(routing_node_name, "routing", "the name for this node"); diff --git a/modules/routing/routing.cc b/modules/routing/routing.cc index b92dae8fe7e5800cbb362f39394a46735ef70dd6..cb91ab29e4356447d4352db45a5e2ffa074a5514 100644 --- a/modules/routing/routing.cc +++ b/modules/routing/routing.cc @@ -54,9 +54,9 @@ apollo::common::Status Routing::Start() { "Navigator not ready"); } AINFO << "Routing service is ready."; - - //apollo::common::monitor::MonitorLogBuffer buffer(&monitor_logger_); - //buffer.INFO("Routing started"); + // FIXME(all): migrate monitor log when it is ready. + // apollo::common::monitor::MonitorLogBuffer buffer(&monitor_logger_); + // buffer.INFO("Routing started"); return apollo::common::Status::OK(); } @@ -95,15 +95,15 @@ bool Routing::Process( RoutingResponse* const routing_response) { CHECK_NOTNULL(routing_response); AINFO << "Get new routing request:" << routing_request->DebugString(); - //apollo::common::monitor::MonitorLogBuffer buffer(&monitor_logger_); + // apollo::common::monitor::MonitorLogBuffer buffer(&monitor_logger_); const auto& fixed_request = FillLaneInfoIfMissing(*routing_request); if (!navigator_ptr_->SearchRoute(fixed_request, routing_response)) { AERROR << "Failed to search route with navigator."; - //buffer.WARN("Routing failed! " + routing_response->status().msg()); + // buffer.WARN("Routing failed! " + routing_response->status().msg()); return false; } - //buffer.INFO("Routing success!"); + // buffer.INFO("Routing success!"); return true; } diff --git a/modules/routing/routing.h b/modules/routing/routing.h index d66681c5ede6cd40feb1bb89b4a859251596372b..9fdb9dcd4a420e880ba8967ce2bcb2cd05162683 100644 --- a/modules/routing/routing.h +++ b/modules/routing/routing.h @@ -60,11 +60,12 @@ class Routing { bool Process(const std::shared_ptr &routing_request, RoutingResponse* const routing_response); + private: RoutingRequest FillLaneInfoIfMissing(const RoutingRequest &routing_request); - private: + std::unique_ptr navigator_ptr_; - //apollo::common::monitor::MonitorLogger monitor_logger_; + // apollo::common::monitor::MonitorLogger monitor_logger_; RoutingConfig routing_conf_; const hdmap::HDMap *hdmap_ = nullptr; diff --git a/modules/routing/routing_component.cc b/modules/routing/routing_component.cc index 327c3c8052f516324217e7a5ed9ad24ba6f9cdc7..23b340a3fb20699b7962368a640a0e06cf40c618 100644 --- a/modules/routing/routing_component.cc +++ b/modules/routing/routing_component.cc @@ -36,6 +36,6 @@ bool RoutingComponent::Proc(const std::shared_ptr& request) { return true; } -} // namespace routing -} // namepsace apollo +} // namespace routing +} // namespace apollo diff --git a/modules/routing/routing_component.h b/modules/routing/routing_component.h index 2c1b5c2e9abd319b41070cb786e8714cf0fa14fe..89502dc950f0aa9ae2fb1ac8dc9734ffaa1fcb80 100644 --- a/modules/routing/routing_component.h +++ b/modules/routing/routing_component.h @@ -17,6 +17,8 @@ #ifndef MODULES_ROUTING_ROUTING_COMPONENT_H_ #define MODULES_ROUTING_ROUTING_COMPONENT_H_ +#include + #include "cybertron/class_loader/class_loader.h" #include "cybertron/component/component.h" @@ -25,7 +27,8 @@ namespace apollo { namespace routing { -class RoutingComponent final : public ::apollo::cybertron::Component { +class RoutingComponent final + : public ::apollo::cybertron::Component { public: RoutingComponent() = default; ~RoutingComponent() = default; @@ -40,9 +43,8 @@ class RoutingComponent final : public ::apollo::cybertron::Component