26void CameraLocationEstimationComponent::InitTransformer(
27 const CameraLocationEstimation& location_estimation_param) {
28 TransformerInitOptions transformer_init_options;
29 auto plugin_param = location_estimation_param.plugin_param();
30 transformer_init_options.config_path = plugin_param.config_path();
31 transformer_init_options.config_file = plugin_param.config_file();
33 BaseTransformerRegisterer::GetInstanceByName(plugin_param.name()));
34 ACHECK(transformer_ !=
nullptr);
35 ACHECK(transformer_->Init(transformer_init_options))
36 <<
"Failed to init: " << plugin_param.name();
42 AERROR <<
"Load camera location estimation component config failed!";
46 InitTransformer(location_estimation_param);
54 const std::shared_ptr<onboard::CameraFrame>& msg) {
56 std::shared_ptr<onboard::CameraFrame> out_message(
new (std::nothrow)
58 out_message->frame_id = msg->frame_id;
59 out_message->timestamp = msg->timestamp;
60 out_message->data_provider = msg->data_provider;
61 out_message->detected_objects = msg->detected_objects;
62 out_message->feature_blob = msg->feature_blob;
63 out_message->camera_k_matrix = msg->camera_k_matrix;
64 out_message->camera2world_pose = msg->camera2world_pose;
67 if (!transformer_->Transform(out_message.get())) {
68 AERROR <<
"Failed to transform.";
73 writer_->Write(out_message);
bool GetProtoConfig(T *config) const
std::shared_ptr< Node > node_
bool Proc(const std::shared_ptr< onboard::CameraFrame > &msg) override
Process of camera location estimatation component.
bool Init() override
Init for camera location estimatation component.
#define PERF_FUNCTION(...)
optional EstimationChannel channel
optional string output_obstacles_channel_name