CARLA
LibCarla
source
carla
road
element
LaneMarking.h
Go to the documentation of this file.
1
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include <cstdint>
10
#include <string>
11
12
namespace
carla
{
13
namespace
road {
14
namespace
element {
15
16
class
RoadInfoMarkRecord;
17
18
struct
LaneMarking
{
19
20
enum class
Type
{
21
Other
,
22
Broken
,
23
Solid
,
24
// (for double solid line)
25
SolidSolid
,
26
// (from inside to outside, exception: center lane -from left to right)
27
SolidBroken
,
28
// (from inside to outside, exception: center lane -from left to right)
29
BrokenSolid
,
30
// (from inside to outside, exception: center lane -from left to right)
31
BrokenBroken
,
32
BottsDots
,
33
// (meaning a grass edge)
34
Grass
,
35
Curb
,
36
None
37
};
38
39
enum class
Color
: uint8_t {
40
Standard = 0u,
// (equivalent to "white")
41
Blue = 1u,
42
Green = 2u,
43
Red = 3u,
44
White = Standard,
45
Yellow = 4u,
46
Other
= 5u
47
};
48
49
/// Can be used as flags.
50
enum class
LaneChange
: uint8_t {
51
None = 0x00,
// 00
52
Right = 0x01,
// 01
53
Left = 0x02,
// 10
54
Both
= 0x03
// 11
55
};
56
57
explicit
LaneMarking
(
const
RoadInfoMarkRecord
&info);
58
59
Type
type
=
Type::None
;
60
61
Color
color
=
Color::Standard
;
62
63
LaneChange
lane_change
=
LaneChange::None
;
64
65
double
width
= 0.0;
66
67
std::string
GetColorInfoAsString
(){
68
switch
(color){
69
case
Color::Yellow
:
70
return
std::string(
"yellow"
);
71
break
;
72
case
Color::Standard
:
73
return
std::string(
"white"
);
74
break
;
75
default
:
76
return
std::string(
"white"
);
77
break
;
78
}
79
return
std::string(
"white"
);
80
}
81
};
82
83
}
// namespace element
84
}
// namespace road
85
}
// namespace carla
carla::road::Both
Definition:
Signal.h:24
carla::road::element::LaneMarking::Type::BrokenBroken
carla::road::element::LaneMarking::Type::Grass
carla::road::element::LaneMarking::Type::Curb
carla::road::element::LaneMarking::Color::Standard
carla::road::element::LaneMarking::color
Color color
Definition:
LaneMarking.h:61
carla::road::element::RoadInfoMarkRecord
Each lane within a road cross section can be provided with several road markentries.
Definition:
RoadInfoMarkRecord.h:25
carla::road::element::LaneMarking::Color::Yellow
carla::road::element::LaneMarking::lane_change
LaneChange lane_change
Definition:
LaneMarking.h:63
carla::road::element::LaneMarking::LaneChange
LaneChange
Can be used as flags.
Definition:
LaneMarking.h:50
carla
This file contains definitions of common data structures used in traffic manager. ...
Definition:
Carla.cpp:133
carla::road::element::LaneMarking::Type::Other
carla::road::element::LaneMarking::Type::BottsDots
carla::road::element::LaneMarking::Type::Solid
carla::road::element::LaneMarking::Type::SolidBroken
carla::road::element::LaneMarking::GetColorInfoAsString
std::string GetColorInfoAsString()
Definition:
LaneMarking.h:67
carla::road::element::LaneMarking::Type::Broken
carla::road::element::LaneMarking::Type::SolidSolid
carla::road::element::LaneMarking::LaneMarking
LaneMarking(const RoadInfoMarkRecord &info)
Definition:
LaneMarking.cpp:76
carla::road::element::LaneMarking::type
Type type
Definition:
LaneMarking.h:59
carla::road::element::LaneMarking::LaneChange::None
carla::road::element::LaneMarking
Definition:
LaneMarking.h:18
carla::road::element::LaneMarking::Type
Type
Definition:
LaneMarking.h:20
carla::road::element::LaneMarking::width
double width
Definition:
LaneMarking.h:65
carla::road::element::LaneMarking::Color
Color
Definition:
LaneMarking.h:39
carla::road::element::LaneMarking::Type::None
carla::road::element::LaneMarking::Type::BrokenSolid
Generated by
1.8.13