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;
31 using SimpleWaypointPtr = std::shared_ptr<SimpleWaypoint>;
32 using Buffer = std::deque<SimpleWaypointPtr>;
33 using BufferMap = std::unordered_map<carla::ActorId, Buffer>;
34 using TimeInstance = chr::time_point<chr::system_clock, chr::nanoseconds>;
36 
41 };
42 using LocalizationFrame = std::vector<LocalizationData>;
43 
47  bool hazard;
48 };
49 using CollisionFrame = std::vector<CollisionHazardData>;
50 
51 using ControlFrame = std::vector<carla::rpc::Command>;
52 
53 using TLFrame = std::vector<bool>;
54 
55 /// Structure to hold the actuation signals.
57  float throttle;
58  float brake;
59  float steer;
60 };
61 
62 /// Structure to hold the controller state.
63 struct StateEntry {
67  float steer;
68 };
69 
70 } // namespace traffic_manager
71 } // 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
carla::SharedPtr< carla::client::Junction > Junction