CARLA
Loading...
Searching...
No Matches
LibCarla
source
osm2odr
Signals.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 "
Frame.h
"
10
#include "
Model.h
"
11
#include "
OsmIngest.h
"
12
13
namespace
twinmodel
{
14
15
struct
SignalOptions
{
16
bool
generate_traffic_lights
=
false
;
17
bool
all_junctions_traffic_lights
=
false
;
18
19
/// A signal node is bound to the nearest road end within this distance.
20
double
snap_m
= 25.0;
21
22
/// Crosswalk half width along the road, and half length across it.
23
double
crosswalk_half_width
= 2.0;
24
};
25
26
/// Read traffic lights, stop and give-way signs, speed limits and crossings
27
/// out of the OSM tags and attach them to the roads they govern.
28
void
BuildSignals
(
const
OsmData
&osm,
const
LocalFrame
&frame,
29
TwinModelData
&model,
const
SignalOptions
&options);
30
31
}
// namespace twinmodel
Frame.h
Model.h
OsmIngest.h
twinmodel::LocalFrame
WGS84 <-> local ENU metres, a transverse Mercator centred on the origin.
Definition
Frame.h:15
twinmodel
Definition
Frame.cpp:12
twinmodel::BuildSignals
void BuildSignals(const OsmData &osm, const LocalFrame &frame, TwinModelData &model, const SignalOptions &options)
Read traffic lights, stop and give-way signs, speed limits and crossings out of the OSM tags and atta...
Definition
Signals.cpp:89
twinmodel::OsmData
Definition
OsmIngest.h:50
twinmodel::SignalOptions
Definition
Signals.h:15
twinmodel::SignalOptions::generate_traffic_lights
bool generate_traffic_lights
Definition
Signals.h:16
twinmodel::SignalOptions::all_junctions_traffic_lights
bool all_junctions_traffic_lights
Definition
Signals.h:17
twinmodel::SignalOptions::snap_m
double snap_m
A signal node is bound to the nearest road end within this distance.
Definition
Signals.h:20
twinmodel::SignalOptions::crosswalk_half_width
double crosswalk_half_width
Crosswalk half width along the road, and half length across it.
Definition
Signals.h:23
twinmodel::TwinModelData
Everything the OpenDRIVE writer reads.
Definition
Model.h:158
Generated by
1.9.8