Apollo  6.0
Open source self driving car software
feature_output.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13  *implied. See the License for the specific language governing
14  *permissions and limitations under the License.
15  *****************************************************************************/
16 
17 #pragma once
18 
19 #include <string>
20 
21 #include "modules/planning/proto/learning_data.pb.h"
22 
23 namespace apollo {
24 namespace planning {
25 
27  public:
31  FeatureOutput() = delete;
32 
36  static void Close();
37 
41  static void Clear();
42 
47  static bool Ready();
48 
53  static void InsertLearningDataFrame(
54  const std::string& record_filename,
55  const LearningDataFrame& learning_data_frame);
56 
57  static void InsertPlanningResult();
58 
59  static LearningDataFrame* GetLatestLearningDataFrame();
60 
64  static void WriteLearningData(const std::string& record_file);
65  static void WriteRemainderiLearningData(const std::string& record_file);
66 
71  static int SizeOfLearningData();
72 
73  private:
74  static LearningData learning_data_;
75  static int learning_data_file_index_;
76 };
77 
78 } // namespace planning
79 } // namespace apollo
static void Close()
Close the output stream.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Planning module main class. It processes GPS and IMU as input, to generate planning info...
static void WriteRemainderiLearningData(const std::string &record_file)
static bool Ready()
Check if output is ready.
static void InsertLearningDataFrame(const std::string &record_filename, const LearningDataFrame &learning_data_frame)
Insert a a frame of learning data.
Definition: feature_output.h:26
static void Clear()
Reset.
FeatureOutput()=delete
Constructor; disabled.
static int SizeOfLearningData()
Get the size of learning_data_.
static void WriteLearningData(const std::string &record_file)
Write LearningData to a file.
static LearningDataFrame * GetLatestLearningDataFrame()