CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
road
element
RoadInfoLaneAccess.h
Go to the documentation of this file.
1
// Copyright (c) 2026 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/road/element/RoadInfo.h
"
10
#include <string>
11
12
namespace
carla
{
13
namespace
road
{
14
namespace
element
{
15
16
/// This record defines access restrictions for certain types of road users.
17
/// The record can be used to complement restrictions resulting from signs or
18
/// signals in order to control the traffic flow in a scenario. Each entry is
19
/// valid in direction of the increasing s co-ordinate until a new entry is
20
/// defined. If multiple entries are defined, they must be listed in
21
/// increasing order.
22
class
RoadInfoLaneAccess
final :
public
RoadInfo
{
23
public
:
24
25
RoadInfoLaneAccess
(
26
double
s,
// start position relative to the position of the preceding
27
// lane section
28
std::string restriction)
29
:
RoadInfo
(s),
30
_restriction
(restriction) {}
31
32
void
AcceptVisitor
(
RoadInfoVisitor
&v)
final
{
33
v.Visit(*
this
);
34
}
35
36
const
std::string &
GetRestriction
()
const
{
37
return
_restriction
;
38
}
39
40
private
:
41
42
const
std::string
_restriction
;
// Examples: Simulator, Autonomous Traffic,
43
// Pedestrian and None
44
};
45
46
}
// namespace element
47
}
// namespace road
48
}
// namespace carla
RoadInfo.h
carla::road::element::RoadInfoLaneAccess::RoadInfoLaneAccess
RoadInfoLaneAccess(double s, std::string restriction)
Definition
RoadInfoLaneAccess.h:25
carla::road::element::RoadInfoLaneAccess::GetRestriction
const std::string & GetRestriction() const
Definition
RoadInfoLaneAccess.h:36
carla::road::element::RoadInfoLaneAccess::_restriction
const std::string _restriction
Definition
RoadInfoLaneAccess.h:42
carla::road::element::RoadInfoLaneAccess::AcceptVisitor
void AcceptVisitor(RoadInfoVisitor &v) final
Definition
RoadInfoLaneAccess.h:32
carla::road::element::RoadInfoVisitor
Definition
RoadInfoVisitor.h:33
carla::road::element::RoadInfo::RoadInfo
RoadInfo(double distance=0.0)
Definition
RoadInfo.h:34
carla::road::element
Definition
SignComponent.h:26
carla::road
Definition
SignComponent.h:23
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
Generated by
1.18.0