CARLA
Functions | Variables
test_opendrive.cpp File Reference
#include "test.h"
#include "OpenDrive.h"
#include "Random.h"
#include <carla/StopWatch.h>
#include <carla/ThreadPool.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 <pugixml/pugixml.hpp>
#include <fstream>
#include <string>
+ Include dependency graph for test_opendrive.cpp:

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)
 
 TEST (road, parse_files)
 
 TEST (road, parse_road_links)
 
 TEST (road, parse_junctions)
 
 TEST (road, parse_road)
 
 TEST (road, parse_road_elevation)
 
 TEST (road, parse_geometry)
 
 TEST (road, iterate_waypoints)
 
 TEST (road, get_waypoint)
 
static void test_geometry (const pugi::xml_document &xml, boost::optional< Map > &map)
 
static void test_junctions (const pugi::xml_document &xml, boost::optional< Map > &map)
 
static void test_road_elevation (const pugi::xml_document &xml, boost::optional< Map > &map)
 
static void test_road_links (boost::optional< Map > &map)
 
static void test_roads (const pugi::xml_document &xml, boost::optional< Map > &map)
 

Variables

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

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

Definition at line 82 of file test_opendrive.cpp.

References carla::road::Lane::GetDistance(), carla::road::Lane::GetInfo(), and carla::road::LaneSection::GetLane().

Referenced by test_roads().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TEST() [1/8]

TEST ( road  ,
parse_files   
)

Definition at line 225 of file test_opendrive.cpp.

References util::OpenDrive::GetAvailableFiles(), carla::client::detail::Load(), and util::OpenDrive::Load().

+ Here is the call graph for this function:

◆ TEST() [2/8]

TEST ( road  ,
parse_road_links   
)

Definition at line 234 of file test_opendrive.cpp.

References util::OpenDrive::GetAvailableFiles(), carla::client::detail::Load(), util::OpenDrive::Load(), and test_road_links().

+ Here is the call graph for this function:

◆ TEST() [3/8]

TEST ( road  ,
parse_junctions   
)

Definition at line 243 of file test_opendrive.cpp.

References BASE_PATH, util::OpenDrive::GetAvailableFiles(), carla::client::detail::Load(), util::OpenDrive::Load(), pugi::xml_document::load_file(), and test_junctions().

+ Here is the call graph for this function:

◆ TEST() [4/8]

TEST ( road  ,
parse_road   
)

Definition at line 259 of file test_opendrive.cpp.

References BASE_PATH, util::OpenDrive::GetAvailableFiles(), carla::client::detail::Load(), util::OpenDrive::Load(), pugi::xml_document::load_file(), and test_roads().

+ Here is the call graph for this function:

◆ TEST() [5/8]

TEST ( road  ,
parse_road_elevation   
)

Definition at line 274 of file test_opendrive.cpp.

References BASE_PATH, util::OpenDrive::GetAvailableFiles(), carla::client::detail::Load(), util::OpenDrive::Load(), pugi::xml_document::load_file(), and test_road_elevation().

+ Here is the call graph for this function:

◆ TEST() [6/8]

TEST ( road  ,
parse_geometry   
)

Definition at line 289 of file test_opendrive.cpp.

References BASE_PATH, util::OpenDrive::GetAvailableFiles(), carla::client::detail::Load(), util::OpenDrive::Load(), pugi::xml_document::load_file(), and test_geometry().

+ Here is the call graph for this function:

◆ TEST() [7/8]

TEST ( road  ,
iterate_waypoints   
)

Definition at line 304 of file test_opendrive.cpp.

References carla::ThreadPool::AsyncRun(), util::OpenDrive::GetAvailableFiles(), carla::logging::log(), and carla::ThreadPool::Post().

+ Here is the call graph for this function:

◆ TEST() [8/8]

TEST ( road  ,
get_waypoint   
)

Definition at line 381 of file test_opendrive.cpp.

References carla::ThreadPool::AsyncRun(), util::OpenDrive::GetAvailableFiles(), carla::logging::log(), and carla::ThreadPool::Post().

+ Here is the call graph for this function:

◆ test_geometry()

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

Definition at line 60 of file test_opendrive.cpp.

References pugi::xml_attribute::as_uint(), pugi::xml_node::attribute(), pugi::xml_node::child(), and pugi::xml_node::children().

Referenced by TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test_junctions()

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

Definition at line 172 of file test_opendrive.cpp.

References pugi::xml_attribute::as_int(), pugi::xml_node::attribute(), pugi::xml_node::child(), and pugi::xml_node::children().

Referenced by TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test_road_elevation()

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

Definition at line 36 of file test_opendrive.cpp.

References pugi::xml_attribute::as_uint(), pugi::xml_node::attribute(), pugi::xml_node::child(), and pugi::xml_node::children().

Referenced by TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test_road_links()

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

Definition at line 206 of file test_opendrive.cpp.

Referenced by TEST().

+ Here is the caller graph for this function:

◆ test_roads()

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

Definition at line 117 of file test_opendrive.cpp.

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

Referenced by TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ BASE_PATH

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

Definition at line 33 of file test_opendrive.cpp.

Referenced by TEST().