Apollo 10.0
自动驾驶开放平台
odometry_msg_converter.h
浏览该文件的文档.
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 *****************************************************************************/
16
17#pragma once
18
19#include <algorithm>
20#include <cstring>
21#include <memory>
22#include <string>
23
25
26#include "cyber/proto/simple.pb.h"
27#include "modules/common_msgs/localization_msgs/gps.pb.h"
28#include "cyber/cyber.h"
30
31#if __has_include("nav_msgs/msg/odometry.hpp")
32#include "nav_msgs/msg/odometry.hpp"
33#define ENABLE_ROS_MSG
34#endif
35
36#ifdef ENABLE_ROS_MSG
37using RosOdometryMsg = nav_msgs::msg::Odometry;
38#else
39// fake wrap
41#endif
42
44
45using RosOdometryMsgPtr = std::shared_ptr<RosOdometryMsg>;
46
47using OdometryOutputMsgPtr = std::shared_ptr<OdometryOutputMsg>;
48
49namespace apollo {
50namespace cyber {
51
54 InputTypes<RosOdometryMsgPtr>, OutputTypes<OdometryOutputMsgPtr>> {
55 public:
58
68};
69
72
73} // namespace cyber
74} // namespace apollo
virtual bool ConvertMsg(InputTypes< RosOdometryMsgPtr > &, OutputTypes< OdometryOutputMsgPtr > &)
convert the message between ros and apollo
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
std::shared_ptr< RosOdometryMsg > RosOdometryMsgPtr
class register implement
Definition arena_queue.h:37
std::shared_ptr< OdometryOutputMsg > OdometryOutputMsgPtr