CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
OpenDrive
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.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/OpenDrive/OpenDriveMap.h
"
10
11
#include <util/ue-header-guard-begin.h>
12
#include "Kismet/BlueprintFunctionLibrary.h"
13
#include <util/ue-header-guard-end.h>
14
15
#include "OpenDrive.generated.h"
16
17
UCLASS()
18
class CARLA_API
UOpenDrive
: public
UBlueprintFunctionLibrary
19
{
20
GENERATED_BODY()
21
22
public
:
23
24
/// Return the OpenDrive XML associated to @a MapName, or empty if the file
25
/// is not found.
26
UFUNCTION(BlueprintCallable, Category=
"CARLA|OpenDrive"
)
27
static
FString
GetXODR
(
const
UWorld *World);
28
29
/// Return the OpenDrive XML associated to @a MapName, or empty if the file
30
/// is not found.
31
UFUNCTION(BlueprintCallable, Category=
"CARLA|OpenDrive"
)
32
static
FString
GetXODRByPath
(FString XODRPath, FString MapName);
33
34
UFUNCTION(BlueprintCallable, Category=
"CARLA|OpenDrive"
)
35
static
FString
FindPathToXODRFile
(
const
FString &InMapName);
36
37
/// Where a generated OpenDRIVE world stores its xodr:
38
/// <ProjectSavedDir>/OpenDrive/<MapName>.xodr (read before any content dir),
39
/// or the folder SetSavedXODRDirectory set.
40
static
FString
GetSavedXODRPath
(
const
FString &MapName);
41
42
/// Multi-GPU secondary: a folder of this process for the generated worlds
43
/// the primary sends, so that servers sharing an installation never read
44
/// each other's. Set once, before any map loads.
45
static
void
SetSavedXODRDirectory
(
const
FString &Directory);
46
47
UFUNCTION(BlueprintCallable, Category=
"CARLA|OpenDrive"
)
48
static
FString
LoadXODR
(
const
FString &MapName);
49
50
UFUNCTION(BlueprintCallable, Category=
"CARLA|OpenDrive"
)
51
static
FString
LoadXODRFullPath
(
const
FString &FullPath);
52
53
/// Load OpenDriveMap associated to the given MapName. Return nullptr if no
54
/// XODR can be found with same MapName.
55
UFUNCTION(BlueprintCallable, Category=
"CARLA|OpenDrive"
)
56
static
UOpenDriveMap
*
LoadOpenDriveMap
(
const
FString &MapName);
57
58
/// Load OpenDriveMap associated to the currently loaded map. Return nullptr
59
/// if no XODR can be found that matches the current map.
60
UFUNCTION(BlueprintPure, Category=
"CARLA|OpenDrive"
, meta=(WorldContext=
"WorldContextObject"
))
61
static
UOpenDriveMap
*
LoadCurrentOpenDriveMap
(
const
UObject
*WorldContextObject);
62
};
OpenDriveMap.h
UBlueprintFunctionLibrary
UObject
UOpenDriveMap
Helper class for exposing CARLA OpenDrive API to blueprints.
Definition
OpenDriveMap.h:38
UOpenDrive
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.h:19
UOpenDrive::LoadCurrentOpenDriveMap
static UOpenDriveMap * LoadCurrentOpenDriveMap(const UObject *WorldContextObject)
Load OpenDriveMap associated to the currently loaded map.
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:295
UOpenDrive::GetSavedXODRPath
static FString GetSavedXODRPath(const FString &MapName)
Where a generated OpenDRIVE world stores its xodr: <ProjectSavedDir>/OpenDrive/<MapName>....
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:22
UOpenDrive::LoadXODRFullPath
static FString LoadXODRFullPath(const FString &FullPath)
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:228
UOpenDrive::FindPathToXODRFile
static FString FindPathToXODRFile(const FString &InMapName)
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:34
UOpenDrive::GetXODR
static FString GetXODR(const UWorld *World)
Return the OpenDrive XML associated to MapName, or empty if the file is not found.
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:139
UOpenDrive::LoadXODR
static FString LoadXODR(const FString &MapName)
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:206
UOpenDrive::SetSavedXODRDirectory
static void SetSavedXODRDirectory(const FString &Directory)
Multi-GPU secondary: a folder of this process for the generated worlds the primary sends,...
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:29
UOpenDrive::LoadOpenDriveMap
static UOpenDriveMap * LoadOpenDriveMap(const FString &MapName)
Load OpenDriveMap associated to the given MapName.
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:283
UOpenDrive::GetXODRByPath
static FString GetXODRByPath(FString XODRPath, FString MapName)
Return the OpenDrive XML associated to MapName, or empty if the file is not found.
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/OpenDrive/OpenDrive.cpp:248
Generated by
1.18.0