|
CARLA
|
Helper class for exposing CARLA OpenDrive API to blueprints. More...
#include <OpenDriveMap.h>
Inheritance diagram for UOpenDriveMap:Public Member Functions | |
| FVector | ComputeLocation (FWaypoint Waypoint) const |
| Compute the location of a waypoint. | |
| TArray< FVector > | ComputeLocations (const TArray< FWaypoint > &Waypoints) const |
| Compute the locations of an array of waypoints. | |
| FTransform | ComputeTransform (FWaypoint Waypoint) const |
| Compute the transform of a waypoint. | |
| TArray< FTransform > | ComputeTransforms (const TArray< FWaypoint > &Waypoints) const |
| Compute the transforms of an array of waypoints. | |
| TArray< FWaypointConnection > | GenerateTopology () const |
| Generate the minimum set of waypoints that define the topology of this map. | |
| TArray< FWaypoint > | GenerateWaypoints (float ApproxDistance=100.0f) const |
| Generate waypoints all over the map at an approximated distance. | |
| TArray< FWaypoint > | GenerateWaypointsOnRoadEntries () const |
| Generate waypoints on each lane at the start of each road. | |
| FWaypoint | GetClosestWaypointOnRoad (FVector Location, bool &Success) const |
| Given a location, return the closest point on the centre of a lane. | |
| TArray< FWaypoint > | GetNext (FWaypoint Waypoint, float Distance=100.0f) const |
| Return the list of waypoints at a given distance such that a vehicle at waypoint could drive to. | |
| bool | HasMap () const |
| Return whether this map has been initialized. | |
| bool | Load (const FString &XODRContent) |
| Load this map with an OpenDrive (XODR) file. | |
| UOpenDriveMap (const FObjectInitializer &ObjectInitializer) | |
Private Attributes | |
| TOptional< carla::road::Map > | Map |
Helper class for exposing CARLA OpenDrive API to blueprints.
Definition at line 37 of file OpenDriveMap.h.
| UOpenDriveMap::UOpenDriveMap | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 53 of file OpenDriveMap.cpp.
| FVector UOpenDriveMap::ComputeLocation | ( | FWaypoint | Waypoint | ) | const |
Compute the location of a waypoint.
Definition at line 103 of file OpenDriveMap.cpp.
References ComputeTransform().
Referenced by ComputeLocations().
| TArray< FVector > UOpenDriveMap::ComputeLocations | ( | const TArray< FWaypoint > & | Waypoints | ) | const |
Compute the locations of an array of waypoints.
Definition at line 108 of file OpenDriveMap.cpp.
References ComputeLocation().
| FTransform UOpenDriveMap::ComputeTransform | ( | FWaypoint | Waypoint | ) | const |
Compute the transform of a waypoint.
The X-axis is directed towards the direction of the road at that waypoint.
Definition at line 116 of file OpenDriveMap.cpp.
References HasMap(), Map, and FWaypoint::Waypoint.
Referenced by ComputeLocation(), and ComputeTransforms().
| TArray< FTransform > UOpenDriveMap::ComputeTransforms | ( | const TArray< FWaypoint > & | Waypoints | ) | const |
Compute the transforms of an array of waypoints.
Definition at line 123 of file OpenDriveMap.cpp.
References ComputeTransform().
| TArray< FWaypointConnection > UOpenDriveMap::GenerateTopology | ( | ) | const |
Generate the minimum set of waypoints that define the topology of this map.
The waypoints are placed at the entrance of each lane.
Definition at line 87 of file OpenDriveMap.cpp.
| TArray< FWaypoint > UOpenDriveMap::GenerateWaypoints | ( | float | ApproxDistance = 100.0f | ) | const |
Generate waypoints all over the map at an approximated distance.
Definition at line 75 of file OpenDriveMap.cpp.
| TArray< FWaypoint > UOpenDriveMap::GenerateWaypointsOnRoadEntries | ( | ) | const |
Generate waypoints on each lane at the start of each road.
Definition at line 96 of file OpenDriveMap.cpp.
| FWaypoint UOpenDriveMap::GetClosestWaypointOnRoad | ( | FVector | Location, |
| bool & | Success | ||
| ) | const |
Given a location, return the closest point on the centre of a lane.
Definition at line 67 of file OpenDriveMap.cpp.
Return the list of waypoints at a given distance such that a vehicle at waypoint could drive to.
Definition at line 131 of file OpenDriveMap.cpp.
References HasMap(), Map, and FWaypoint::Waypoint.
|
inline |
Return whether this map has been initialized.
Definition at line 47 of file OpenDriveMap.h.
Referenced by ComputeTransform(), GenerateTopology(), GenerateWaypoints(), GenerateWaypointsOnRoadEntries(), GetClosestWaypointOnRoad(), GetNext(), and Load().
| bool UOpenDriveMap::Load | ( | const FString & | XODRContent | ) |
Load this map with an OpenDrive (XODR) file.
Definition at line 56 of file OpenDriveMap.cpp.
References HasMap(), carla::opendrive::OpenDriveParser::Load(), and Map.
Referenced by UOpenDrive::LoadOpenDriveMap().
|
private |
Definition at line 97 of file OpenDriveMap.h.
Referenced by ComputeTransform(), GenerateTopology(), GenerateWaypoints(), GenerateWaypointsOnRoadEntries(), GetClosestWaypointOnRoad(), GetNext(), and Load().