Apollo 10.0
自动驾驶开放平台
msg_adapter_component.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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 implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
17
20
21namespace apollo {
22namespace perception {
23
25 msg_converter_ = std::make_shared<MsgConverter>(node_);
26 // register message conversion
27 msg_converter_->Add(FLAGS_cameraframe_to_obstacles_in,
28 FLAGS_cameraframe_to_obstacles_out,
30 AINFO << "cameraframe_to_obstacles_in: "
31 << FLAGS_cameraframe_to_obstacles_in
32 << " cameraframe_to_obstacles_out: "
33 << FLAGS_cameraframe_to_obstacles_out;
34
35 msg_converter_->Add(FLAGS_sensorframe_message_to_obstacles_in,
36 FLAGS_sensorframe_message_to_obstacles_out,
38 AINFO << "sensorframe_message_to_obstacles_in: "
39 << FLAGS_sensorframe_message_to_obstacles_in
40 << " sensorframe_message_to_obstacles_out: "
41 << FLAGS_sensorframe_message_to_obstacles_out;
42
43 msg_converter_->Add(FLAGS_lidarframe_to_obstacles_in,
44 FLAGS_lidarframe_to_obstacles_out,
46 AINFO << "lidarframe_to_obstacles_in: "
47 << FLAGS_lidarframe_to_obstacles_in
48 << " lidarframe_to_obstacles_out: "
49 << FLAGS_lidarframe_to_obstacles_out;
50
51 return true;
52}
53
54} // namespace perception
55} // namespace apollo
std::shared_ptr< Node > node_
#define AINFO
Definition log.h:42
bool ConvertCameraFrame2Obstacles(const std::shared_ptr< onboard::CameraFrame > &frame, PerceptionObstacles *obstacles)
Definition convert.h:33
bool ConvertLidarFrameMessage2Obstacles(const std::shared_ptr< onboard::LidarFrameMessage > &msg, PerceptionObstacles *obstacles)
Definition convert.h:81
bool ConvertSensorFrameMessage2Obstacles(const std::shared_ptr< onboard::SensorFrameMessage > &msg, PerceptionObstacles *obstacles)
Definition convert.h:57
class register implement
Definition arena_queue.h:37