CARLA
Loading...
Searching...
No Matches
Functions | Variables
test_opendrive.cpp File Reference
#include "test.h"
#include "OpenDrive.h"
#include "Random.h"
#include <carla/StopWatch.h>
#include <carla/geom/Location.h>
#include <carla/geom/Math.h>
#include <carla/opendrive/OpenDriveParser.h>
#include <carla/road/MapBuilder.h>
#include <carla/road/element/RoadInfoElevation.h>
#include <carla/road/element/RoadInfoGeometry.h>
#include <carla/road/element/RoadInfoMarkRecord.h>
#include <carla/road/element/RoadInfoVisitor.h>
#include <third-party/pugixml/pugixml.hpp>
#include <fstream>
#include <string>

Go to the source code of this file.

Functions

static auto get_total_road_marks (pugi::xml_object_range< pugi::xml_named_node_iterator > &lane_nodes, LaneSection &lane_section)
 
static bool IsRoadless (carla::road::Map &map)
 
 TEST (road, get_waypoint)
 
 TEST (road, iterate_waypoints)
 
 TEST (road, parse_files)
 
 TEST (road, parse_geometry)
 
 TEST (road, parse_junctions)
 
 TEST (road, parse_road)
 
 TEST (road, parse_road_elevation)
 
 TEST (road, parse_road_links)
 
 TEST (road, stencil_parsing)
 
static void test_geometry (const pugi::xml_document &xml, std::optional< Map > &map)
 
static void test_junctions (const pugi::xml_document &xml, std::optional< Map > &map)
 
static void test_road_elevation (const pugi::xml_document &xml, std::optional< Map > &map)
 
static void test_road_links (std::optional< Map > &map)
 
static void test_roads (const pugi::xml_document &xml, std::optional< Map > &map)
 

Variables

const std::string BASE_PATH = LIBCARLA_TEST_CONTENT_FOLDER "/OpenDrive/"
 
static constexpr const char * kStencilXodr
 

Function Documentation

◆ get_total_road_marks()

static auto get_total_road_marks ( pugi::xml_object_range< pugi::xml_named_node_iterator > &  lane_nodes,
LaneSection &  lane_section 
)
static

◆ IsRoadless()

static bool IsRoadless ( carla::road::Map &  map)
static

Definition at line 227 of file test_opendrive.cpp.

Referenced by TEST(), and TEST().

◆ TEST() [1/9]

TEST ( road  ,
get_waypoint   
)

◆ TEST() [2/9]

TEST ( road  ,
iterate_waypoints   
)

◆ TEST() [3/9]

TEST ( road  ,
parse_files   
)

◆ TEST() [4/9]

TEST ( road  ,
parse_geometry   
)

◆ TEST() [5/9]

TEST ( road  ,
parse_junctions   
)

◆ TEST() [6/9]

TEST ( road  ,
parse_road   
)

◆ TEST() [7/9]

TEST ( road  ,
parse_road_elevation   
)

◆ TEST() [8/9]

TEST ( road  ,
parse_road_links   
)

◆ TEST() [9/9]

TEST ( road  ,
stencil_parsing   
)

Definition at line 469 of file test_opendrive.cpp.

References kStencilXodr, and carla::opendrive::OpenDriveParser::Load().

◆ test_geometry()

static void test_geometry ( const pugi::xml_document &  xml,
std::optional< Map > &  map 
)
static

◆ test_junctions()

static void test_junctions ( const pugi::xml_document &  xml,
std::optional< Map > &  map 
)
static

Definition at line 171 of file test_opendrive.cpp.

References pugi::xml_node::child(), pugi::xml_node::children(), and junction.

Referenced by TEST().

◆ test_road_elevation()

static void test_road_elevation ( const pugi::xml_document &  xml,
std::optional< Map > &  map 
)
static

◆ test_road_links()

static void test_road_links ( std::optional< Map > &  map)
static

Definition at line 205 of file test_opendrive.cpp.

References road.

Referenced by TEST().

◆ test_roads()

static void test_roads ( const pugi::xml_document &  xml,
std::optional< Map > &  map 
)
static

Definition at line 116 of file test_opendrive.cpp.

References pugi::xml_node::child(), pugi::xml_node::children(), get_total_road_marks(), and road_id.

Referenced by TEST().

Variable Documentation

◆ BASE_PATH

const std::string BASE_PATH = LIBCARLA_TEST_CONTENT_FOLDER "/OpenDrive/"

Definition at line 32 of file test_opendrive.cpp.

Referenced by TEST(), TEST(), TEST(), and TEST().

◆ kStencilXodr

constexpr const char* kStencilXodr
staticconstexpr

Definition at line 430 of file test_opendrive.cpp.

Referenced by TEST().