25 #include <unordered_map> 28 #include <boost/thread/shared_mutex.hpp> 30 #include "gtest/gtest_prod.h" 32 #include "nlohmann/json.hpp" 34 #include "modules/canbus/proto/chassis.pb.h" 35 #include "modules/dreamview/proto/data_collection_table.pb.h" 65 void Start()
override;
84 void LoadConfiguration();
85 void ConstructCategories();
86 void ConstructCategoriesHelper(
const std::string& scenario_name,
87 const Scenario& scenario,
int feature_idx,
88 std::string current_category_name,
89 const Category& current_category);
90 void OnChassis(
const std::shared_ptr<apollo::canbus::Chassis>& chassis);
91 bool IsCompliedWithCriteria(
92 const std::shared_ptr<apollo::canbus::Chassis>& chassis,
93 const Category& category);
95 std::unique_ptr<cyber::Node> node_;
98 DataCollectionTable data_collection_table_;
102 std::unordered_map<std::string, std::unordered_map<std::string, Category>>
103 scenario_to_categories_;
106 std::unordered_map<std::string, std::unordered_map<std::string, size_t>>
107 category_frame_count_;
111 std::unordered_map<std::string, std::unordered_map<std::string, size_t>>
112 category_consecutive_frame_count_;
115 nlohmann::json current_progress_json_;
119 boost::shared_mutex mutex_;
121 FRIEND_TEST(DataCollectionMonitorTest, UpdateCollectionProgress);
122 FRIEND_TEST(DataCollectionMonitorTest, ConstructCategories);
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
A base class that monitor progress for Fuel client.
Definition: fuel_monitor.h:39
void Restart()
restart monitoring collection progress
DataCollectionMonitor()
Constructor of DataCollectionMonitor.
void Stop() override
stop monitoring collection progress
nlohmann::json GetProgressAsJson() override
return collection progress of categories and overall as json
std::vector< Range > Category
Definition: data_collection_monitor.h:47
void Start() override
start monitoring collection progress
A module that monitor data collection progress for calibration purpose.
Definition: data_collection_monitor.h:54