CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
ros2
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
19
namespace
carla
{
20
namespace
ros2 {
21
22
struct
VehicleControl
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
carla::ros2::ActorCallback
std::function< void(void *actor, ROS2CallbackData data)> ActorCallback
Definition
ROS2CallbackData.h:35
carla::ros2::ROS2CallbackData
boost::variant2::variant< VehicleControl > ROS2CallbackData
Definition
ROS2CallbackData.h:33
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
carla::ros2::VehicleControl
Definition
ROS2CallbackData.h:23
carla::ros2::VehicleControl::reverse
bool reverse
Definition
ROS2CallbackData.h:28
carla::ros2::VehicleControl::manual_gear_shift
bool manual_gear_shift
Definition
ROS2CallbackData.h:30
carla::ros2::VehicleControl::hand_brake
bool hand_brake
Definition
ROS2CallbackData.h:27
carla::ros2::VehicleControl::throttle
float throttle
Definition
ROS2CallbackData.h:24
carla::ros2::VehicleControl::brake
float brake
Definition
ROS2CallbackData.h:26
carla::ros2::VehicleControl::steer
float steer
Definition
ROS2CallbackData.h:25
carla::ros2::VehicleControl::gear
int32_t gear
Definition
ROS2CallbackData.h:29
制作者
1.10.0