CARLA
CarlaEgoVehicleControlSubscriber.h
Go to the documentation of this file.
1 // Copyright (c) 2022 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB).
2 // This work is licensed under the terms of the MIT license.
3 // For a copy, see <https://opensource.org/licenses/MIT>.
4 
5 #pragma once
6 #define _GLIBCXX_USE_CXX11_ABI 0
7 
8 #include <memory>
9 #include <vector>
10 
11 #include "CarlaSubscriber.h"
13 
14 namespace carla {
15 namespace ros2 {
16 
17  struct CarlaEgoVehicleControlSubscriberImpl;
18 
20  public:
21  CarlaEgoVehicleControlSubscriber(void* vehicle, const char* ros_name = "", const char* parent = "");
27 
28  bool HasNewMessage();
29  bool IsAlive();
31  void* GetVehicle();
32 
33  bool Init();
34  bool Read();
35  const char* type() const override { return "Ego vehicle control"; }
36 
37  //Do not call, for internal use only
38  void ForwardMessage(VehicleControl control);
39  void DestroySubscriber();
40  private:
41  void SetData(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, std::vector<float>&& data);
42 
43  private:
44  std::shared_ptr<CarlaEgoVehicleControlSubscriberImpl> _impl;
45  };
46 }
47 }
CarlaEgoVehicleControlSubscriber & operator=(const CarlaEgoVehicleControlSubscriber &)
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
std::shared_ptr< CarlaEgoVehicleControlSubscriberImpl > _impl
const std::string & parent() const
void SetData(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, std::vector< float > &&data)
CarlaEgoVehicleControlSubscriber(void *vehicle, const char *ros_name="", const char *parent="")