39 lines
865 B
C
39 lines
865 B
C
|
// Copyright (c) 2023 Computer Vision Center (CVC) at the Universitat Autonoma
|
||
|
// de Barcelona (UAB).
|
||
|
//
|
||
|
// This work is licensed under the terms of the MIT license.
|
||
|
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#ifdef _MSC_VER
|
||
|
#pragma warning(push)
|
||
|
#pragma warning(disable:4583)
|
||
|
#pragma warning(disable:4582)
|
||
|
#include <boost/variant2/variant.hpp>
|
||
|
#pragma warning(pop)
|
||
|
#else
|
||
|
#include <boost/variant2/variant.hpp>
|
||
|
#endif
|
||
|
|
||
|
namespace carla {
|
||
|
namespace ros2 {
|
||
|
|
||
|
struct VehicleControl
|
||
|
{
|
||
|
float throttle;
|
||
|
float steer;
|
||
|
float brake;
|
||
|
bool hand_brake;
|
||
|
bool reverse;
|
||
|
int32_t gear;
|
||
|
bool manual_gear_shift;
|
||
|
};
|
||
|
|
||
|
using ROS2CallbackData = boost::variant2::variant<VehicleControl>;
|
||
|
|
||
|
using ActorCallback = std::function<void(void *actor, ROS2CallbackData data)>;
|
||
|
|
||
|
} // namespace ros2
|
||
|
} // namespace carla
|