56 template <
class EigenType>
59 template <
typename T,
class EigenType>
63 std::shared_ptr<apollo::perception::MotionService>;
78 void OnReceiveImage(
const std::shared_ptr<apollo::drivers::Image>& in_message,
79 const std::string& camera_name);
83 int InitAlgorithmPlugin();
84 int InitCameraFrames();
85 int InitProjectMatrix();
86 int InitMotionService();
87 int InitCameraListeners();
88 void SetCameraHeightAndPitch();
91 const std::shared_ptr<apollo::drivers::Image const>& in_message,
96 int ConvertLaneToCameraLaneline(
98 apollo::perception::camera::CameraLaneLine* camera_laneline);
100 int MakeProtobufMsg(
double msg_timestamp,
const std::string& camera_name,
108 std::vector<std::shared_ptr<cyber::Node>> camera_listener_nodes_;
110 std::vector<std::string> camera_names_;
111 std::vector<std::string> input_camera_channel_names_;
114 std::map<std::string, base::SensorInfo> sensor_info_map_;
117 std::map<std::string, float> camera_height_map_;
120 std::map<std::string, float> name_camera_pitch_angle_diff_map_;
123 std::map<std::string, std::string> tf_camera_frame_id_map_;
124 std::map<std::string, std::shared_ptr<TransformWrapper>>
125 camera2world_trans_wrapper_map_;
128 std::map<std::string, std::shared_ptr<camera::DataProvider>>
134 Eigen::Matrix3d homography_image2ground_;
138 std::unique_ptr<camera::LaneCameraPerception> camera_lane_pipeline_;
141 int frame_capacity_ = 20;
146 int image_width_ = 1920;
147 int image_height_ = 1080;
148 int image_channel_num_ = 3;
149 int image_data_size_ = -1;
152 float default_camera_pitch_ = 0.f;
153 float default_camera_height_ = 1.6f;
156 bool enable_undistortion_ =
false;
158 double timestamp_offset_ = 0.0;
160 bool enable_visualization_ =
false;
161 std::string visual_debug_folder_;
162 std::string visual_camera_;
164 std::string output_lanes_channel_name_;
166 Eigen::Matrix3d project_matrix_;
167 double pitch_diff_ = 0.0;
169 double last_timestamp_ = 0.0;
170 double ts_diff_ = 1.0;
172 std::shared_ptr<apollo::cyber::Writer<apollo::perception::PerceptionLanes>>
176 const int motion_buffer_size_ = 100;
179 bool write_visual_img_;