23 #include <boost/circular_buffer.hpp> 36 namespace perception {
46 std::string
Name()
const override;
50 std::vector<base::TrafficLightPtr>* lights)
override;
55 const std::string& camera_name,
56 std::vector<base::TrafficLightPtr>* lights)
override;
59 bool is_working)
override;
61 bool* is_working)
const override;
63 const std::vector<std::string>&
71 std::vector<base::TrafficLightPtrs>* lights_on_image_array,
72 std::vector<base::TrafficLightPtrs>* lights_outside_image_array,
76 bool ProjectLights(
const CarPose& pose,
const std::string& camera_name,
77 std::vector<base::TrafficLightPtr>* lights,
81 bool ProjectLightsAndSelectCamera(
const CarPose& pose,
83 std::string* selected_camera_name,
84 std::vector<base::TrafficLightPtr>* lights);
86 std::string GetMinFocalLenWorkingCameraName()
const;
87 std::string GetMaxFocalLenWorkingCameraName()
const;
91 double last_pub_img_ts_ = 0.0;
94 std::pair<double, std::string> selected_camera_name_;
95 std::map<std::string, bool> camera_is_working_flags_;
96 double sync_interval_seconds_ = 0.1;
97 size_t num_cameras_ = 0;
98 std::vector<base::TrafficLightPtrs> lights_on_image_array_;
99 std::vector<base::TrafficLightPtrs> lights_outside_image_array_;
102 bool projections_outside_all_images_ =
false;
bool GetCameraWorkingFlag(const std::string &camera_name, bool *is_working) const override
const std::vector< std::string > & GetCameraNamesByDescendingFocalLen() const override
Definition: tl_preprocessor.h:64
bool GetAlllightsOutsideFlag() const
bool SyncInformation(const double ts, const std::string &camera_name)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: base_tl_preprocessor.h:42
bool UpdateCameraSelection(const CarPose &pose, const TLPreprocessorOption &option, std::vector< base::TrafficLightPtr > *lights) override
Definition: multi_camera_projection.h:41
~TLPreprocessor()=default
const std::vector< std::string > & getCameraNamesByDescendingFocalLen() const
Definition: multi_camera_projection.h:54
bool Init(const TrafficLightPreprocessorInitOptions &options) override
Definition: base_tl_preprocessor.h:38
bool SetCameraWorkingFlag(const std::string &camera_name, bool is_working) override
std::vector< TrafficLightPtr > TrafficLightPtrs
Definition: traffic_light.h:89
std::string Name() const override
Definition: tl_preprocessor.h:39
Definition: base_tl_preprocessor.h:32
bool UpdateLightsProjection(const CarPose &pose, const TLPreprocessorOption &option, const std::string &camera_name, std::vector< base::TrafficLightPtr > *lights) override