Carlaģйͼ 更多...
#include <MapBuilder.h>
Public 成员函数 | |
void | AddConnection (const JuncId junction_id, const ConId connection_id, const RoadId incoming_road, const RoadId connecting_road) |
void | AddDependencyToSignal (const SignId signal_id, const std::string dependency_id, const std::string dependency_type) |
void | AddJunction (const JuncId id, const std::string name) |
void | AddJunctionController (const JuncId junction_id, std::set< ContId > &&controllers) |
void | AddLaneLink (const JuncId junction_id, const ConId connection_id, const LaneId from, const LaneId to) |
carla::road::Road * | AddRoad (const RoadId road_id, const std::string name, const double length, const JuncId junction_id, const RoadId predecessor, const RoadId successor) |
void | AddRoadElevationProfile (Road *road, const double s, const double a, const double b, const double c, const double d) |
void | AddRoadGeometryArc (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvature) |
void | AddRoadGeometryLine (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length) |
void | AddRoadGeometryParamPoly3 (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double aU, const double bU, const double cU, const double dU, const double aV, const double bV, const double cV, const double dV, const std::string p_range) |
void | AddRoadGeometryPoly3 (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double a, const double b, const double c, const double d) |
void | AddRoadGeometrySpiral (carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvStart, const double curvEnd) |
void | AddRoadObjectCrosswalk (Road *road, const std::string name, const double s, const double t, const double zOffset, const double hdg, const double pitch, const double roll, const std::string orientation, const double width, const double length, const std::vector< road::element::CrosswalkPoint > points) |
carla::road::LaneSection * | AddRoadSection (carla::road::Road *road, const SectionId id, const double s) |
void | AddRoadSection (const RoadId road_id, const SectionId section_index, const double s, const double a, const double b, const double c, const double d) |
carla::road::Lane * | AddRoadSectionLane (carla::road::LaneSection *section, const LaneId lane_id, const uint32_t lane_type, const bool lane_level, const LaneId predecessor, const LaneId successor) |
element::RoadInfoSignal * | AddSignal (Road *road, const SignId signal_id, const double s, const double t, const std::string name, const std::string dynamic, const std::string orientation, const double zOffset, const std::string country, const std::string type, const std::string subtype, const double value, const std::string unit, const double height, const double width, const std::string text, const double hOffset, const double pitch, const double roll) |
void | AddSignalPositionInertial (const SignId signal_id, const double x, const double y, const double z, const double hdg, const double pitch, const double roll) |
void | AddSignalPositionRoad (const SignId signal_id, const RoadId road_id, const double s, const double t, const double zOffset, const double hOffset, const double pitch, const double roll) |
element::RoadInfoSignal * | AddSignalReference (Road *road, const SignId signal_id, const double s_position, const double t_position, const std::string signal_reference_orientation) |
void | AddValidityToSignalReference (element::RoadInfoSignal *signal_reference, const LaneId from_lane, const LaneId to_lane) |
boost::optional< Map > | Build () |
void | CreateController (const ContId controller_id, const std::string controller_name, const uint32_t controller_sequence, const std::set< road::SignId > &&signals) |
void | CreateLaneAccess (Lane *lane, const double s, const std::string restriction) |
void | CreateLaneBorder (Lane *lane, const double s, const double a, const double b, const double c, const double d) |
void | CreateLaneHeight (Lane *lane, const double s, const double inner, const double outer) |
void | CreateLaneMaterial (Lane *lane, const double s, const std::string surface, const double friction, const double roughness) |
void | CreateLaneRule (Lane *lane, const double s, const std::string value) |
void | CreateLaneSpeed (Lane *lane, const double s, const double max, const std::string unit) |
void | CreateLaneVisibility (Lane *lane, const double s, const double forward, const double back, const double left, const double right) |
void | CreateLaneWidth (Lane *lane, const double s, const double a, const double b, const double c, const double d) |
void | CreateRoadMark (Lane *lane, const int road_mark_id, const double s, const std::string type, const std::string weight, const std::string color, const std::string material, const double width, const std::string lane_change, const double height, const std::string type_name, const double type_width) |
void | CreateRoadMarkTypeLine (Lane *lane, const int road_mark_id, const double length, const double space, const double tOffset, const double s, const std::string rule, const double width) |
void | CreateRoadSpeed (Road *road, const double s, const std::string type, const double max, const std::string unit) |
void | CreateSectionOffset (Road *road, const double s, const double a, const double b, const double c, const double d) |
Lane * | GetLane (const RoadId road_id, const LaneId lane_id, const double s) |
Road * | GetRoad (const RoadId road_id) |
void | SetGeoReference (const geom::GeoLocation &geo_reference) |
void | SetRoadLaneLink (const RoadId road_id, const SectionId section_index, const LaneId lane_id, const Lane::LaneType lane_type, const bool lane_level, const LaneId predecessor, const LaneId successor) |
Private 成员函数 | |
void | CheckSignalsOnRoads (Map &map) |
Checks signals overlapping driving lanes and emits a warning // 检查重叠驾驶车道的信号并发出警告 | |
void | ComputeJunctionRoadConflicts (Map &map) |
Compute the conflicts of the roads (intersecting roads) // 计算道路冲突(相交道路) | |
geom::Transform | ComputeSignalTransform (std::unique_ptr< Signal > &signal, MapData &data) |
void | CreateJunctionBoundingBoxes (Map &map) |
Create the bounding boxes of each junction // 创建每个交叉口的边界框 | |
void | CreatePointersBetweenRoadSegments () |
Create the pointers between RoadSegments based on the ids. // 根据标识符创建道路段之间的指针 | |
void | GenerateDefaultValiditiesForSignalReferences () |
Generates a default validity field for signal references with missing validity record in OpenDRIVE // 为缺少有效性记录的信号引用生成默认有效性字段 | |
Lane * | GetEdgeLanePointer (RoadId road_id, bool from_start, LaneId lane_id) |
Return the pointer to a lane object. // 返回车道对象的指针 | |
std::vector< std::pair< RoadId, LaneId > > | GetJunctionLanes (JuncId junction_id, RoadId road_id, LaneId lane_id) |
std::vector< Lane * > | GetLaneNext (RoadId road_id, SectionId section_id, LaneId lane_id) |
Return a list of pointers to all lanes from a lane (using road and // 返回从某车道到所有车道的指针列表(使用道路和 junction info). | |
void | RemoveZeroLaneValiditySignalReferences () |
Removes signal references with lane validity equal to [0,0] // 移除车道有效性等于[0,0]的信号引用 as they have no effect on any road | |
void | SolveControllerAndJuntionReferences () |
Solve the references between Controllers and Juntions // 解决控制器和交叉口之间的引用 | |
void | SolveSignalReferencesAndTransforms () |
Solves the signal references in the road // 解决道路中的信号引用 | |
Private 属性 | |
MapData | _map_data |
std::unordered_map< Lane *, std::vector< std::unique_ptr< element::RoadInfo > > > | _temp_lane_info_container |
std::unordered_map< Road *, std::vector< std::unique_ptr< element::RoadInfo > > > | _temp_road_info_container |
Map to temporary store all the road and lane infos until the map is // 用于临时存储所有道路和车道信息,直到地图构建完成,因此可以一起添加 built, so they can be added all together. | |
std::unordered_map< SignId, std::unique_ptr< Signal > > | _temp_signal_container |
std::vector< element::RoadInfoSignal * > | _temp_signal_reference_container |
Carlaģйͼ
在文件 MapBuilder.h 第 20 行定义.
void carla::road::MapBuilder::AddDependencyToSignal | ( | const SignId | signal_id, |
const std::string | dependency_id, | ||
const std::string | dependency_type ) |
void carla::road::MapBuilder::AddJunction | ( | const JuncId | id, |
const std::string | name ) |
carla::road::Road * carla::road::MapBuilder::AddRoad | ( | const RoadId | road_id, |
const std::string | name, | ||
const double | length, | ||
const JuncId | junction_id, | ||
const RoadId | predecessor, | ||
const RoadId | successor ) |
void carla::road::MapBuilder::AddRoadElevationProfile | ( | Road * | road, |
const double | s, | ||
const double | a, | ||
const double | b, | ||
const double | c, | ||
const double | d ) |
void carla::road::MapBuilder::AddRoadGeometryArc | ( | carla::road::Road * | road, |
const double | s, | ||
const double | x, | ||
const double | y, | ||
const double | hdg, | ||
const double | length, | ||
const double | curvature ) |
void carla::road::MapBuilder::AddRoadGeometryLine | ( | carla::road::Road * | road, |
const double | s, | ||
const double | x, | ||
const double | y, | ||
const double | hdg, | ||
const double | length ) |
void carla::road::MapBuilder::AddRoadGeometryParamPoly3 | ( | carla::road::Road * | road, |
const double | s, | ||
const double | x, | ||
const double | y, | ||
const double | hdg, | ||
const double | length, | ||
const double | aU, | ||
const double | bU, | ||
const double | cU, | ||
const double | dU, | ||
const double | aV, | ||
const double | bV, | ||
const double | cV, | ||
const double | dV, | ||
const std::string | p_range ) |
void carla::road::MapBuilder::AddRoadGeometryPoly3 | ( | carla::road::Road * | road, |
const double | s, | ||
const double | x, | ||
const double | y, | ||
const double | hdg, | ||
const double | length, | ||
const double | a, | ||
const double | b, | ||
const double | c, | ||
const double | d ) |
void carla::road::MapBuilder::AddRoadGeometrySpiral | ( | carla::road::Road * | road, |
const double | s, | ||
const double | x, | ||
const double | y, | ||
const double | hdg, | ||
const double | length, | ||
const double | curvStart, | ||
const double | curvEnd ) |
void carla::road::MapBuilder::AddRoadObjectCrosswalk | ( | Road * | road, |
const std::string | name, | ||
const double | s, | ||
const double | t, | ||
const double | zOffset, | ||
const double | hdg, | ||
const double | pitch, | ||
const double | roll, | ||
const std::string | orientation, | ||
const double | width, | ||
const double | length, | ||
const std::vector< road::element::CrosswalkPoint > | points ) |
carla::road::LaneSection * carla::road::MapBuilder::AddRoadSection | ( | carla::road::Road * | road, |
const SectionId | id, | ||
const double | s ) |
void carla::road::MapBuilder::AddRoadSection | ( | const RoadId | road_id, |
const SectionId | section_index, | ||
const double | s, | ||
const double | a, | ||
const double | b, | ||
const double | c, | ||
const double | d ) |
carla::road::Lane * carla::road::MapBuilder::AddRoadSectionLane | ( | carla::road::LaneSection * | section, |
const LaneId | lane_id, | ||
const uint32_t | lane_type, | ||
const bool | lane_level, | ||
const LaneId | predecessor, | ||
const LaneId | successor ) |
element::RoadInfoSignal * carla::road::MapBuilder::AddSignal | ( | Road * | road, |
const SignId | signal_id, | ||
const double | s, | ||
const double | t, | ||
const std::string | name, | ||
const std::string | dynamic, | ||
const std::string | orientation, | ||
const double | zOffset, | ||
const std::string | country, | ||
const std::string | type, | ||
const std::string | subtype, | ||
const double | value, | ||
const std::string | unit, | ||
const double | height, | ||
const double | width, | ||
const std::string | text, | ||
const double | hOffset, | ||
const double | pitch, | ||
const double | roll ) |
被这些函数引用 carla::opendrive::parser::ObjectParser::Parse() , 以及 carla::opendrive::parser::SignalParser::Parse().
void carla::road::MapBuilder::AddSignalPositionInertial | ( | const SignId | signal_id, |
const double | x, | ||
const double | y, | ||
const double | z, | ||
const double | hdg, | ||
const double | pitch, | ||
const double | roll ) |
void carla::road::MapBuilder::AddSignalPositionRoad | ( | const SignId | signal_id, |
const RoadId | road_id, | ||
const double | s, | ||
const double | t, | ||
const double | zOffset, | ||
const double | hOffset, | ||
const double | pitch, | ||
const double | roll ) |
element::RoadInfoSignal * carla::road::MapBuilder::AddSignalReference | ( | Road * | road, |
const SignId | signal_id, | ||
const double | s_position, | ||
const double | t_position, | ||
const std::string | signal_reference_orientation ) |
void carla::road::MapBuilder::AddValidityToSignalReference | ( | element::RoadInfoSignal * | signal_reference, |
const LaneId | from_lane, | ||
const LaneId | to_lane ) |
boost::optional< Map > carla::road::MapBuilder::Build | ( | ) |
|
private |
Checks signals overlapping driving lanes and emits a warning // 检查重叠驾驶车道的信号并发出警告
|
private |
Compute the conflicts of the roads (intersecting roads) // 计算道路冲突(相交道路)
|
private |
void carla::road::MapBuilder::CreateController | ( | const ContId | controller_id, |
const std::string | controller_name, | ||
const uint32_t | controller_sequence, | ||
const std::set< road::SignId > && | signals ) |
|
private |
Create the bounding boxes of each junction // 创建每个交叉口的边界框
void carla::road::MapBuilder::CreateLaneAccess | ( | Lane * | lane, |
const double | s, | ||
const std::string | restriction ) |
void carla::road::MapBuilder::CreateLaneBorder | ( | Lane * | lane, |
const double | s, | ||
const double | a, | ||
const double | b, | ||
const double | c, | ||
const double | d ) |
void carla::road::MapBuilder::CreateLaneHeight | ( | Lane * | lane, |
const double | s, | ||
const double | inner, | ||
const double | outer ) |
void carla::road::MapBuilder::CreateLaneMaterial | ( | Lane * | lane, |
const double | s, | ||
const std::string | surface, | ||
const double | friction, | ||
const double | roughness ) |
void carla::road::MapBuilder::CreateLaneRule | ( | Lane * | lane, |
const double | s, | ||
const std::string | value ) |
void carla::road::MapBuilder::CreateLaneSpeed | ( | Lane * | lane, |
const double | s, | ||
const double | max, | ||
const std::string | unit ) |
void carla::road::MapBuilder::CreateLaneVisibility | ( | Lane * | lane, |
const double | s, | ||
const double | forward, | ||
const double | back, | ||
const double | left, | ||
const double | right ) |
void carla::road::MapBuilder::CreateLaneWidth | ( | Lane * | lane, |
const double | s, | ||
const double | a, | ||
const double | b, | ||
const double | c, | ||
const double | d ) |
|
private |
Create the pointers between RoadSegments based on the ids. // 根据标识符创建道路段之间的指针
void carla::road::MapBuilder::CreateRoadMark | ( | Lane * | lane, |
const int | road_mark_id, | ||
const double | s, | ||
const std::string | type, | ||
const std::string | weight, | ||
const std::string | color, | ||
const std::string | material, | ||
const double | width, | ||
const std::string | lane_change, | ||
const double | height, | ||
const std::string | type_name, | ||
const double | type_width ) |
void carla::road::MapBuilder::CreateRoadMarkTypeLine | ( | Lane * | lane, |
const int | road_mark_id, | ||
const double | length, | ||
const double | space, | ||
const double | tOffset, | ||
const double | s, | ||
const std::string | rule, | ||
const double | width ) |
void carla::road::MapBuilder::CreateRoadSpeed | ( | Road * | road, |
const double | s, | ||
const std::string | type, | ||
const double | max, | ||
const std::string | unit ) |
void carla::road::MapBuilder::CreateSectionOffset | ( | Road * | road, |
const double | s, | ||
const double | a, | ||
const double | b, | ||
const double | c, | ||
const double | d ) |
|
private |
Generates a default validity field for signal references with missing validity record in OpenDRIVE // 为缺少有效性记录的信号引用生成默认有效性字段
|
private |
Return the pointer to a lane object. // 返回车道对象的指针
|
private |
|
private |
Return a list of pointers to all lanes from a lane (using road and // 返回从某车道到所有车道的指针列表(使用道路和 junction info).
// 交叉口信息)
|
private |
Removes signal references with lane validity equal to [0,0] // 移除车道有效性等于[0,0]的信号引用 as they have no effect on any road
|
inline |
在文件 MapBuilder.h 第 359 行定义.
引用了 carla::road::MapData::_geo_reference , 以及 _map_data.
被这些函数引用 carla::opendrive::parser::GeoReferenceParser::Parse().
void carla::road::MapBuilder::SetRoadLaneLink | ( | const RoadId | road_id, |
const SectionId | section_index, | ||
const LaneId | lane_id, | ||
const Lane::LaneType | lane_type, | ||
const bool | lane_level, | ||
const LaneId | predecessor, | ||
const LaneId | successor ) |
|
private |
Solve the references between Controllers and Juntions // 解决控制器和交叉口之间的引用
|
private |
Solves the signal references in the road // 解决道路中的信号引用
|
private |
在文件 MapBuilder.h 第 365 行定义.
被这些函数引用 SetGeoReference().
|
private |
在文件 MapBuilder.h 第 415 行定义.
|
private |
Map to temporary store all the road and lane infos until the map is // 用于临时存储所有道路和车道信息,直到地图构建完成,因此可以一起添加 built, so they can be added all together.
在文件 MapBuilder.h 第 412 行定义.
|
private |
在文件 MapBuilder.h 第 418 行定义.
|
private |
在文件 MapBuilder.h 第 420 行定义.