CARLA
 
载入中...
搜索中...
未找到
ROS2CallbackData.h
浏览该文件的文档.
1// Copyright (c) 2023 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9#ifdef _MSC_VER
10#pragma warning(push) // 保存当前的编译器警告状态
11#pragma warning(disable:4583)
12#pragma warning(disable:4582)
13#include <boost/variant2/variant.hpp> // 这样在编译这行代码时,4583、4582 两个警告将不会出现
14#pragma warning(pop) // 恢复原先的警告状态
15#else
16#include <boost/variant2/variant.hpp>
17#endif
18
19namespace carla {
20namespace ros2 {
21
23 {
24 float throttle; // 油门
25 float steer; // 方向盘
26 float brake; // 刹车
27 bool hand_brake; // 手刹
28 bool reverse; // 倒档
29 int32_t gear; // 档位
30 bool manual_gear_shift; // 手动档位换
31 };
32
33 using ROS2CallbackData = boost::variant2::variant<VehicleControl>;
34
35 using ActorCallback = std::function<void(void *actor, ROS2CallbackData data)>;
36
37} // namespace ros2
38} // namespace carla
std::function< void(void *actor, ROS2CallbackData data)> ActorCallback
boost::variant2::variant< VehicleControl > ROS2CallbackData
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133