37 <<
"Unable to load task_manager conf file: "
45 [
this](
const std::shared_ptr<LocalizationEstimate>& localization) {
46 ADEBUG <<
"Received localization data: run localization callback.";
47 std::lock_guard<std::mutex> lock(mutex_);
48 localization_.CopyFrom(*localization);
53 [
this](
const std::shared_ptr<PlanningCommand>& planning_command) {
54 ADEBUG <<
"Received planning_command: run response callback.";
55 std::lock_guard<std::mutex> lock(mutex_);
56 planning_command_.CopyFrom(*planning_command);
59 lane_follow_command_client_ =
67 AERROR <<
"Task type is not cycle_routing.";
72 cycle_routing_manager_ = std::make_shared<CycleRoutingManager>();
73 cycle_routing_manager_->Init(localization_.
pose(), task->cycle_routing_task());
74 lane_follow_command_ = task->cycle_routing_task().lane_follow_command();
77 while (cycle_routing_manager_->GetCycle() > 0) {
78 if (cycle_routing_manager_->GetNewRouting(localization_.
pose(),
79 &lane_follow_command_)) {
80 auto last_planning_command_ = planning_command_;
81 common::util::FillHeader(
node_->Name(), &lane_follow_command_);
82 auto lane_follow_command = std::make_shared<LaneFollowCommand>();
83 lane_follow_command->CopyFrom(lane_follow_command_);
84 lane_follow_command_client_->SendRequest(lane_follow_command);
85 AINFO <<
"[TaskManagerComponent]Reach begin/end point: "
86 <<
"routing manager send a routing request. ";
89 if (!planning_command_.has_header()) {
90 AINFO <<
"[TaskManagerComponent]routing failed";
93 if (last_planning_command_.has_header()) {
94 if (last_planning_command_.header().sequence_num() ==
96 AINFO <<
"[TaskManagerComponent]No routing response: "
97 <<
"new routing failed";