CARLA
Loading...
Searching...
No Matches
Stencil.h
Go to the documentation of this file.
1#pragma once
2
3#include "carla/Memory.h"
4#include "carla/NonCopyable.h"
7
8#include <string>
9#include <vector>
10
11namespace carla {
12namespace road {
13
14 enum class StencilOrientation {
17 Both
18 };
19
20 class Stencil : private MovableNonCopyable {
21 public:
24 StencilId stencil_id,
25 double s,
26 double t,
27 std::string name,
28 std::string orientation,
29 std::string type,
30 double zOffset,
31 double heading,
32 double length,
33 double width,
34 double pitch,
35 double roll)
37 _stencil_id(stencil_id),
38 _s(s),
39 _t(t),
40 _name(name),
41 _orientation(orientation),
42 _type(type),
44 _length(length),
45 _width(width),
46 _pitch(pitch),
47 _roll(roll),
48 _zOffset(zOffset) {}
49
50 RoadId GetRoadId() const {
51 return _road_id;
52 }
53
54 const StencilId &GetStencilId() const {
55 return _stencil_id;
56 }
57
58 double GetS() const {
59 return _s;
60 }
61
62 double GetT() const {
63 return _t;
64 }
65
66 const std::string &GetName() const {
67 return _name;
68 }
69
71 if(_orientation == "+") {
73 } else if(_orientation == "-") {
75 } else {
77 }
78 }
79
80 double GetZOffset() const {
81 return _zOffset;
82 }
83
84 double GetHeading() const {
85 return _heading;
86 }
87
88 const std::string &GetType() const {
89 return _type;
90 }
91
92 double GetLength() const {
93 return _length;
94 }
95
96 double GetWidth() const {
97 return _width;
98 }
99
100 double GetPitch() const {
101 return _pitch;
102 }
103
104 double GetRoll() const {
105 return _roll;
106 }
107
109 return _transform;
110 }
111
112 private:
114
116
118
119 double _s;
120
121 double _t;
122
123 std::string _name;
124
125 std::string _orientation;
126
127 std::string _type;
128
129 double _heading;
130
131 double _length;
132
133 double _width;
134
135 double _pitch;
136
137 double _roll;
138
139 double _zOffset;
140
142 };
143
144} // road
145} // carla
double heading
Definition LaneGraph.cpp:42
std::string road_id
Definition LaneGraph.cpp:39
std::map< std::string, unsigned int > road
Inherit (privately) to suppress copy construction and assignment.
A rigid transform in CARLA's / Unreal's left-handed frame: x forward, y right, z up,...
Stencil(RoadId road_id, StencilId stencil_id, double s, double t, std::string name, std::string orientation, std::string type, double zOffset, double heading, double length, double width, double pitch, double roll)
Definition Stencil.h:22
double GetPitch() const
Definition Stencil.h:100
std::string _name
Definition Stencil.h:123
double GetWidth() const
Definition Stencil.h:96
double GetT() const
Definition Stencil.h:62
StencilOrientation GetOrientation() const
Definition Stencil.h:70
std::string _orientation
Definition Stencil.h:125
const std::string & GetName() const
Definition Stencil.h:66
RoadId GetRoadId() const
Definition Stencil.h:50
std::string _type
Definition Stencil.h:127
const geom::Transform & GetTransform() const
Definition Stencil.h:108
double GetLength() const
Definition Stencil.h:92
const StencilId & GetStencilId() const
Definition Stencil.h:54
StencilId _stencil_id
Definition Stencil.h:117
double GetRoll() const
Definition Stencil.h:104
geom::Transform _transform
Definition Stencil.h:141
const std::string & GetType() const
Definition Stencil.h:88
double GetHeading() const
Definition Stencil.h:84
double GetZOffset() const
Definition Stencil.h:80
double GetS() const
Definition Stencil.h:58
std::string StencilId
Definition RoadTypes.h:27
StencilOrientation
Definition Stencil.h:14
uint32_t RoadId
Definition RoadTypes.h:15
This file contains definitions of common data structures used in traffic manager.