CARLA
DataStructures.h
Go to the documentation of this file.
1 
2 /// This file contains definitions of common data structures used in traffic manager.
3 
4 #pragma once
5 
6 #include <chrono>
7 #include <deque>
8 #include <vector>
9 
10 #include "carla/client/Actor.h"
11 #include "carla/geom/Location.h"
12 #include "carla/geom/Rotation.h"
13 #include "carla/geom/Vector3D.h"
14 #include "carla/rpc/ActorId.h"
15 #include "carla/rpc/Command.h"
17 
19 
20 namespace carla {
21 namespace traffic_manager {
22 
23 namespace chr = std::chrono;
24 namespace cc = carla::client;
25 namespace cg = carla::geom;
26 
27 using ActorId = carla::ActorId;
30 using SimpleWaypointPtr = std::shared_ptr<SimpleWaypoint>;
31 using Buffer = std::deque<SimpleWaypointPtr>;
32 using BufferMap = std::unordered_map<carla::ActorId, Buffer>;
33 using TimeInstance = chr::time_point<chr::system_clock, chr::nanoseconds>;
35 
40 };
41 using LocalizationFrame = std::vector<LocalizationData>;
42 
46  bool hazard;
47 };
48 using CollisionFrame = std::vector<CollisionHazardData>;
49 
50 using ControlFrame = std::vector<carla::rpc::Command>;
51 
52 using TLFrame = std::vector<bool>;
53 
54 /// Structure to hold the actuation signals.
56  float throttle;
57  float brake;
58  float steer;
59 };
60 
61 /// Structure to hold the controller state.
62 struct StateEntry {
66  float steer;
67 };
68 
69 } // namespace traffic_manager
70 } // namespace carla
std::vector< carla::rpc::Command > ControlFrame
chr::time_point< chr::system_clock, chr::nanoseconds > TimeInstance
carla::SharedPtr< cc::Actor > ActorPtr
std::vector< bool > TLFrame
rpc::ActorId ActorId
Definition: ActorId.h:18
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
Definition: Memory.h:20
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
int32_t JuncId
Definition: RoadTypes.h:17
std::unordered_map< carla::ActorId, Buffer > BufferMap
Structure to hold the actuation signals.
carla::road::JuncId JunctionID
carla::ActorId ActorId
std::vector< LocalizationData > LocalizationFrame
std::shared_ptr< SimpleWaypoint > SimpleWaypointPtr
Structure to hold the controller state.
std::vector< CollisionHazardData > CollisionFrame