CARLA
 
载入中...
搜索中...
未找到
Landmark.h
浏览该文件的文档.
1// Copyright (c) 2020 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 "carla/Memory.h"
13
15
16#include <string>
17
18namespace carla {
19namespace client {
20
21 /// Class containing a reference to RoadInfoSignal
22 class Landmark {
23 public:
24
26 return _waypoint;
27 }
28
30 return _signal->GetSignal()->GetTransform();
31 }
32
34 return _signal->GetRoadId();
35 }
36
37 double GetDistance() const {
39 }
40
41 double GetS() const {
42 return _signal->GetS();
43 }
44
45 double GetT() const {
46 return _signal->GetT();
47 }
48
49 std::string GetId() const {
50 return _signal->GetSignalId();
51 }
52
53 std::string GetName() const {
54 return _signal->GetSignal()->GetName();
55 }
56
57 bool IsDynamic() const {
58 return _signal->IsDynamic();
59 }
60
64
65 double GetZOffset() const {
66 return _signal->GetSignal()->GetZOffset();
67 }
68
69 std::string GetCountry() const {
70 return _signal->GetSignal()->GetCountry();
71 }
72
73 std::string GetType() const {
74 return _signal->GetSignal()->GetType();
75 }
76
77 std::string GetSubType() const {
78 return _signal->GetSignal()->GetSubtype();
79 }
80
81 double GetValue() const {
82 return _signal->GetSignal()->GetValue();
83 }
84
85 std::string GetUnit() const {
86 return _signal->GetSignal()->GetUnit();
87 }
88
89 double GetHeight() const {
90 return _signal->GetSignal()->GetHeight();
91 }
92
93 double GetWidth() const {
94 return _signal->GetSignal()->GetWidth();
95 }
96
97 std::string GetText() const {
98 return _signal->GetSignal()->GetText();
99 }
100
101 double GethOffset() const {
102 return _signal->GetSignal()->GetHOffset();
103 }
104
105 double GetPitch() const {
106 return _signal->GetSignal()->GetPitch();
107 }
108
109 double GetRoll() const {
110 return _signal->GetSignal()->GetRoll();
111 }
112
113 const auto &GetValidities() const {
114 return _signal->GetValidities();
115 }
116
117 private:
118
119 friend Waypoint;
120 friend Map;
121
123 SharedPtr<Waypoint> waypoint,
125 const road::element::RoadInfoSignal* signal,
126 double distance_from_search = 0)
127 : _waypoint(waypoint),
128 _parent(parent),
129 _signal(signal),
130 _distance_from_search(distance_from_search) {}
131
132 /// waypoint where the signal is affecting
134
136
138
140 };
141
142} // client
143} // carla
Class containing a reference to RoadInfoSignal
Definition Landmark.h:22
std::string GetText() const
Definition Landmark.h:97
std::string GetCountry() const
Definition Landmark.h:69
double GetZOffset() const
Definition Landmark.h:65
double GetPitch() const
Definition Landmark.h:105
std::string GetName() const
Definition Landmark.h:53
SharedPtr< Waypoint > GetWaypoint() const
Definition Landmark.h:25
bool IsDynamic() const
Definition Landmark.h:57
double GetT() const
Definition Landmark.h:45
double GetWidth() const
Definition Landmark.h:93
std::string GetUnit() const
Definition Landmark.h:85
double GetDistance() const
Definition Landmark.h:37
Landmark(SharedPtr< Waypoint > waypoint, SharedPtr< const Map > parent, const road::element::RoadInfoSignal *signal, double distance_from_search=0)
Definition Landmark.h:122
const geom::Transform & GetTransform() const
Definition Landmark.h:29
road::SignalOrientation GetOrientation() const
Definition Landmark.h:61
std::string GetId() const
Definition Landmark.h:49
double GetRoll() const
Definition Landmark.h:109
SharedPtr< const Map > _parent
Definition Landmark.h:135
SharedPtr< Waypoint > _waypoint
waypoint where the signal is affecting
Definition Landmark.h:133
road::RoadId GetRoadId() const
Definition Landmark.h:33
double GetHeight() const
Definition Landmark.h:89
double GethOffset() const
Definition Landmark.h:101
std::string GetType() const
Definition Landmark.h:73
const auto & GetValidities() const
Definition Landmark.h:113
double GetValue() const
Definition Landmark.h:81
double GetS() const
Definition Landmark.h:41
const road::element::RoadInfoSignal * _signal
Definition Landmark.h:137
std::string GetSubType() const
Definition Landmark.h:77
const std::string & GetSubtype() const
Definition Signal.h:131
const geom::Transform & GetTransform() const
Definition Signal.h:172
const std::string & GetType() const
Definition Signal.h:127
double GetHeight() const
Definition Signal.h:143
double GetPitch() const
Definition Signal.h:159
const std::string & GetUnit() const
Definition Signal.h:139
const std::string & GetName() const
Definition Signal.h:105
double GetRoll() const
Definition Signal.h:163
double GetHOffset() const
Definition Signal.h:155
double GetZOffset() const
Definition Signal.h:119
const std::string & GetText() const
Definition Signal.h:151
double GetWidth() const
Definition Signal.h:147
double GetValue() const
Definition Signal.h:135
const std::string & GetCountry() const
Definition Signal.h:123
const std::vector< LaneValidity > & GetValidities() const
SignalOrientation GetOrientation() const
SignalOrientation
Definition Signal.h:21
uint32_t RoadId
Definition RoadTypes.h:15
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
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