CARLA
 
载入中...
搜索中...
未找到
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
12namespace carla {
13namespace road {
14namespace 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)
26 // (from inside to outside, exception: center lane -from left to right)
28 // (from inside to outside, exception: center lane -from left to right)
30 // (from inside to outside, exception: center lane -from left to right)
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,
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
60
62
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
Each lane within a road cross section can be provided with several road markentries.
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
LaneChange
Can be used as flags.
Definition LaneMarking.h:50
LaneMarking(const RoadInfoMarkRecord &info)