CARLA
ROS2CallbackData.h
Go to the documentation of this file.
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>
14 #pragma warning(pop)
15 #else
16 #include <boost/variant2/variant.hpp>
17 #endif
18 
19 namespace carla {
20 namespace ros2 {
21 
23  {
24  float throttle;
25  float steer;
26  float brake;
27  bool hand_brake;
28  bool reverse;
29  int32_t gear;
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
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
boost::variant2::variant< VehicleControl > ROS2CallbackData
std::function< void(void *actor, ROS2CallbackData data)> ActorCallback