CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
road
element
LaneMarking.h
浏览该文件的文档.
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::element::RoadInfoMarkRecord
Each lane within a road cross section can be provided with several road markentries.
Definition
RoadInfoMarkRecord.h:25
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
carla::road::element::LaneMarking
Definition
LaneMarking.h:18
carla::road::element::LaneMarking::LaneChange
LaneChange
Can be used as flags.
Definition
LaneMarking.h:50
carla::road::element::LaneMarking::LaneChange::Both
@ Both
carla::road::element::LaneMarking::LaneChange::None
@ None
carla::road::element::LaneMarking::LaneChange::Right
@ Right
carla::road::element::LaneMarking::LaneChange::Left
@ Left
carla::road::element::LaneMarking::GetColorInfoAsString
std::string GetColorInfoAsString()
Definition
LaneMarking.h:67
carla::road::element::LaneMarking::LaneMarking
LaneMarking(const RoadInfoMarkRecord &info)
Definition
LaneMarking.cpp:76
carla::road::element::LaneMarking::color
Color color
Definition
LaneMarking.h:61
carla::road::element::LaneMarking::width
double width
Definition
LaneMarking.h:65
carla::road::element::LaneMarking::type
Type type
Definition
LaneMarking.h:59
carla::road::element::LaneMarking::Type
Type
Definition
LaneMarking.h:20
carla::road::element::LaneMarking::Type::BrokenBroken
@ BrokenBroken
carla::road::element::LaneMarking::Type::Curb
@ Curb
carla::road::element::LaneMarking::Type::BottsDots
@ BottsDots
carla::road::element::LaneMarking::Type::Other
@ Other
carla::road::element::LaneMarking::Type::None
@ None
carla::road::element::LaneMarking::Type::BrokenSolid
@ BrokenSolid
carla::road::element::LaneMarking::Type::Grass
@ Grass
carla::road::element::LaneMarking::Type::Broken
@ Broken
carla::road::element::LaneMarking::Type::SolidSolid
@ SolidSolid
carla::road::element::LaneMarking::Type::Solid
@ Solid
carla::road::element::LaneMarking::Type::SolidBroken
@ SolidBroken
carla::road::element::LaneMarking::Color
Color
Definition
LaneMarking.h:39
carla::road::element::LaneMarking::Color::White
@ White
carla::road::element::LaneMarking::Color::Yellow
@ Yellow
carla::road::element::LaneMarking::Color::Blue
@ Blue
carla::road::element::LaneMarking::Color::Green
@ Green
carla::road::element::LaneMarking::Color::Standard
@ Standard
carla::road::element::LaneMarking::Color::Red
@ Red
carla::road::element::LaneMarking::lane_change
LaneChange lane_change
Definition
LaneMarking.h:63
制作者
1.10.0