libcarla/include/carla/ros2/ROS2CallbackData.h

39 lines
865 B
C
Raw Normal View History

2024-10-18 13:19:59 +08:00
// 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