|
CARLA
|
#include <MapBuilder.h>
Public Member Functions | |
| 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, const bool is_rht) |
| 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 | AddRoadLateralShape (Road *road, const double s, const double a, const double b, const double c, const double d, const double t) |
| 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) |
| element::RoadInfoStencil * | AddStencil (Road *road, const StencilId stencil_id, const double s, const double t, const std::string name, const std::string orientation, const std::string type, const double zOffset, const double heading, const double length, const double width, const double pitch, const double roll) |
| void | AddValidityToSignalReference (element::RoadInfoSignal *signal_reference, const LaneId from_lane, const LaneId to_lane) |
| std::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, const bool is_rht) |
| 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 | SetGeoProjection (const geom::GeoProjection &geo_projection) |
| 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 Member Functions | |
| 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) |
| geom::Transform | ComputeStencilTransform (std::unique_ptr< Stencil > &stencil, 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 | DebugRoadConnections () |
| Debug the built connections through the terminal. | |
| void | GenerateDefaultValiditiesForSignalReferences () |
| Generates a default validity field for signal references with missing validity record in OpenDRIVE. | |
| Lane * | GetEdgeLanePointer (RoadId road_id, LaneId lane_id) |
| Return the pointer to a lane object. | |
| std::vector< std::pair< RoadId, const Lane * > > | 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] 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. | |
| void | SolveStencilReferencesAndTransforms () |
| Solves the stencil references in the road. | |
Private Attributes | |
| 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 |
| std::unordered_map< StencilId, std::unique_ptr< Stencil > > | _temp_stencil_container |
| std::vector< element::RoadInfoStencil * > | _temp_stencil_reference_container |
Definition at line 22 of file MapBuilder.h.
| void carla::road::MapBuilder::AddConnection | ( | const JuncId | junction_id, |
| const ConId | connection_id, | ||
| const RoadId | incoming_road, | ||
| const RoadId | connecting_road | ||
| ) |
Definition at line 632 of file MapBuilder.cpp.
References _map_data, DEBUG_ASSERT, carla::road::Junction::GetConnections(), and carla::road::MapData::GetJunction().
Referenced by carla::opendrive::parser::JunctionParser::Parse().
| void carla::road::MapBuilder::AddDependencyToSignal | ( | const SignId | signal_id, |
| const std::string | dependency_id, | ||
| const std::string | dependency_type | ||
| ) |
Definition at line 361 of file MapBuilder.cpp.
References _temp_signal_container.
Referenced by carla::opendrive::parser::SignalParser::Parse().
| void carla::road::MapBuilder::AddJunction | ( | const JuncId | id, |
| const std::string | name | ||
| ) |
Definition at line 628 of file MapBuilder.cpp.
References _map_data, and carla::road::MapData::GetJunctions().
Referenced by carla::opendrive::parser::JunctionParser::Parse().
| void carla::road::MapBuilder::AddJunctionController | ( | const JuncId | junction_id, |
| std::set< ContId > && | controllers | ||
| ) |
Definition at line 651 of file MapBuilder.cpp.
References carla::road::Junction::_controllers, _map_data, DEBUG_ASSERT, and carla::road::MapData::GetJunction().
Referenced by carla::opendrive::parser::JunctionParser::Parse().
| void carla::road::MapBuilder::AddLaneLink | ( | const JuncId | junction_id, |
| const ConId | connection_id, | ||
| const LaneId | from, | ||
| const LaneId | to | ||
| ) |
Definition at line 642 of file MapBuilder.cpp.
References _map_data, carla::road::Junction::Connection::AddLaneLink(), DEBUG_ASSERT, carla::road::Junction::GetConnection(), and carla::road::MapData::GetJunction().
Referenced by carla::opendrive::parser::JunctionParser::Parse().
| 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, | ||
| const bool | is_rht | ||
| ) |
Definition at line 413 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::_roads, road, and road_id.
Referenced by carla::opendrive::parser::RoadParser::Parse().
| void carla::road::MapBuilder::AddRoadElevationProfile | ( | Road * | road, |
| const double | s, | ||
| const double | a, | ||
| const double | b, | ||
| const double | c, | ||
| const double | d | ||
| ) |
Definition at line 77 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, elevation, and road.
Referenced by carla::opendrive::parser::ProfilesParser::Parse().
| 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 | ||
| ) |
Definition at line 513 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, road, x, and y.
Referenced by carla::opendrive::parser::GeometryParser::Parse().
| void carla::road::MapBuilder::AddRoadGeometryLine | ( | carla::road::Road * | road, |
| const double | s, | ||
| const double | x, | ||
| const double | y, | ||
| const double | hdg, | ||
| const double | length | ||
| ) |
Definition at line 473 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, road, x, and y.
Referenced by carla::opendrive::parser::GeometryParser::Parse().
| 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 | ||
| ) |
Definition at line 585 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, road, x, and y.
Referenced by carla::opendrive::parser::GeometryParser::Parse().
| 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 | ||
| ) |
Definition at line 558 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, road, x, and y.
Referenced by carla::opendrive::parser::GeometryParser::Parse().
| 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 | ||
| ) |
Definition at line 534 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, road, x, and y.
Referenced by carla::opendrive::parser::GeometryParser::Parse().
| void carla::road::MapBuilder::AddRoadLateralShape | ( | Road * | road, |
| const double | s, | ||
| const double | a, | ||
| const double | b, | ||
| const double | c, | ||
| const double | d, | ||
| const double | t | ||
| ) |
Definition at line 89 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, and road.
Referenced by carla::opendrive::parser::ProfilesParser::Parse().
| 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 | ||
| ) |
Definition at line 102 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, and road.
Referenced by carla::opendrive::parser::ObjectParser::Parse().
| carla::road::LaneSection * carla::road::MapBuilder::AddRoadSection | ( | carla::road::Road * | road, |
| const SectionId | id, | ||
| const double | s | ||
| ) |
Definition at line 440 of file MapBuilder.cpp.
References carla::road::LaneSection::_road, DEBUG_ASSERT, and road.
Referenced by carla::opendrive::parser::RoadParser::Parse().
| 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 | ||
| ) |
Definition at line 450 of file MapBuilder.cpp.
References carla::road::LaneSection::_lanes, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::RoadParser::Parse().
| 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 | ||
| ) |
Definition at line 255 of file MapBuilder.cpp.
References _temp_signal_container, AddSignalReference(), and road.
Referenced by carla::opendrive::parser::ObjectParser::Parse(), and 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 | ||
| ) |
Definition at line 299 of file MapBuilder.cpp.
References _temp_signal_container, carla::geom::Math::ToDegrees(), x, y, and z.
Referenced by carla::opendrive::parser::SignalParser::Parse().
| 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 | ||
| ) |
Definition at line 316 of file MapBuilder.cpp.
References _temp_signal_container, and road_id.
| 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 | ||
| ) |
Definition at line 335 of file MapBuilder.cpp.
References _temp_road_info_container, _temp_signal_reference_container, carla::geom::Math::Clamp(), RELEASE_ASSERT, and road.
Referenced by AddSignal(), and carla::opendrive::parser::SignalParser::Parse().
| element::RoadInfoStencil * carla::road::MapBuilder::AddStencil | ( | Road * | road, |
| const StencilId | stencil_id, | ||
| const double | s, | ||
| const double | t, | ||
| const std::string | name, | ||
| const std::string | orientation, | ||
| const std::string | type, | ||
| const double | zOffset, | ||
| const double | heading, | ||
| const double | length, | ||
| const double | width, | ||
| const double | pitch, | ||
| const double | roll | ||
| ) |
Definition at line 369 of file MapBuilder.cpp.
References _temp_road_info_container, _temp_stencil_container, _temp_stencil_reference_container, carla::geom::Math::Clamp(), heading, RELEASE_ASSERT, and road.
Referenced by carla::opendrive::parser::ObjectParser::Parse().
| void carla::road::MapBuilder::AddValidityToSignalReference | ( | element::RoadInfoSignal * | signal_reference, |
| const LaneId | from_lane, | ||
| const LaneId | to_lane | ||
| ) |
Definition at line 354 of file MapBuilder.cpp.
References carla::road::element::RoadInfoSignal::_validities.
Referenced by carla::opendrive::parser::AddValidity(), and GenerateDefaultValiditiesForSignalReferences().
| std::optional< Map > carla::road::MapBuilder::Build | ( | ) |
Definition at line 40 of file MapBuilder.cpp.
References _map_data, _temp_lane_info_container, _temp_road_info_container, CheckSignalsOnRoads(), ComputeJunctionRoadConflicts(), CreateJunctionBoundingBoxes(), CreatePointersBetweenRoadSegments(), DEBUG_ASSERT, RemoveZeroLaneValiditySignalReferences(), SolveControllerAndJuntionReferences(), SolveSignalReferencesAndTransforms(), and SolveStencilReferencesAndTransforms().
Referenced by carla::opendrive::OpenDriveParser::Load().
|
private |
Checks signals overlapping driving lanes and emits a warning.
Definition at line 1165 of file MapBuilder.cpp.
References carla::road::Map::_data, carla::road::MapData::_signals, carla::road::Map::ComputeTransform(), carla::road::Lane::Driving, carla::road::Map::GetClosestWaypointOnRoad(), carla::road::Map::GetLane(), carla::road::Map::GetLaneType(), carla::road::Map::GetLaneWidth(), carla::road::Map::GetLeft(), carla::road::Map::GetRight(), GetRoad(), carla::road::Road::IsRHT(), carla::log_debug(), carla::road::Lane::None, and carla::road::Lane::Shoulder.
Referenced by Build().
|
private |
Compute the conflicts of the roads (intersecting roads)
Definition at line 1060 of file MapBuilder.cpp.
References carla::road::Map::_data, carla::road::Map::ComputeJunctionConflicts(), carla::road::MapData::GetJunctions(), and junction.
Referenced by Build().
|
private |
Definition at line 879 of file MapBuilder.cpp.
References carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::road::Road::GetDirectedPointInNoLaneOffset(), carla::road::MapData::GetRoad(), point, and carla::geom::Math::ToDegrees().
Referenced by SolveSignalReferencesAndTransforms().
|
private |
Definition at line 891 of file MapBuilder.cpp.
References carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::road::Road::GetDirectedPointInNoLaneOffset(), carla::road::MapData::GetRoad(), point, and carla::geom::Math::ToDegrees().
Referenced by SolveStencilReferencesAndTransforms().
| 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 | ||
| ) |
Definition at line 1032 of file MapBuilder.cpp.
References carla::road::MapData::_controllers, _map_data, carla::road::MapData::_signals, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ControllerParser::Parse().
|
private |
Create the bounding boxes of each junction.
Definition at line 964 of file MapBuilder.cpp.
References carla::road::Map::_data, carla::road::Lane::Any, carla::road::Map::ComputeTransform(), carla::road::Map::GetJunction(), carla::road::MapData::GetJunctions(), carla::road::Map::GetJunctionWaypoints(), carla::road::Map::GetNext(), junction, and carla::geom::Transform::location.
Referenced by Build().
| void carla::road::MapBuilder::CreateLaneAccess | ( | Lane * | lane, |
| const double | s, | ||
| const std::string | restriction | ||
| ) |
Definition at line 121 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneBorder | ( | Lane * | lane, |
| const double | s, | ||
| const double | a, | ||
| const double | b, | ||
| const double | c, | ||
| const double | d | ||
| ) |
Definition at line 129 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneHeight | ( | Lane * | lane, |
| const double | s, | ||
| const double | inner, | ||
| const double | outer | ||
| ) |
Definition at line 140 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneMaterial | ( | Lane * | lane, |
| const double | s, | ||
| const std::string | surface, | ||
| const double | friction, | ||
| const double | roughness | ||
| ) |
Definition at line 149 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneRule | ( | Lane * | lane, |
| const double | s, | ||
| const std::string | value | ||
| ) |
Definition at line 160 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneSpeed | ( | Lane * | lane, |
| const double | s, | ||
| const double | max, | ||
| const std::string | unit | ||
| ) |
Definition at line 245 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneVisibility | ( | Lane * | lane, |
| const double | s, | ||
| const double | forward, | ||
| const double | back, | ||
| const double | left, | ||
| const double | right | ||
| ) |
Definition at line 168 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateLaneWidth | ( | Lane * | lane, |
| const double | s, | ||
| const double | a, | ||
| const double | b, | ||
| const double | c, | ||
| const double | d | ||
| ) |
Definition at line 180 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
|
private |
Create the pointers between RoadSegments based on the ids.
Definition at line 808 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::_roads, DEBUG_ASSERT, GetLaneNext(), and road.
Referenced by Build().
| 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, | ||
| const bool | is_rht | ||
| ) |
Definition at line 191 of file MapBuilder.cpp.
References _temp_lane_info_container, DEBUG_ASSERT, and carla::StringUtil::ToLower().
Referenced by carla::opendrive::parser::ParseLanes().
| 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 | ||
| ) |
Definition at line 224 of file MapBuilder.cpp.
References _temp_lane_info_container, and DEBUG_ASSERT.
Referenced by carla::opendrive::parser::ParseLanes().
| void carla::road::MapBuilder::CreateRoadSpeed | ( | Road * | road, |
| const double | s, | ||
| const std::string | type, | ||
| const double | max, | ||
| const std::string | unit | ||
| ) |
Definition at line 492 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, and road.
Referenced by carla::opendrive::parser::RoadParser::Parse().
| void carla::road::MapBuilder::CreateSectionOffset | ( | Road * | road, |
| const double | s, | ||
| const double | a, | ||
| const double | b, | ||
| const double | c, | ||
| const double | d | ||
| ) |
Definition at line 502 of file MapBuilder.cpp.
References _temp_road_info_container, DEBUG_ASSERT, and road.
Referenced by carla::opendrive::parser::RoadParser::Parse().
|
private |
Debug the built connections through the terminal.
Definition at line 863 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::_roads, and road.
|
private |
Generates a default validity field for signal references with missing validity record in OpenDRIVE.
Definition at line 1067 of file MapBuilder.cpp.
References _temp_signal_reference_container, AddValidityToSignalReference(), carla::road::Both, GetRoad(), carla::road::Negative, carla::road::Positive, and road.
Referenced by SolveSignalReferencesAndTransforms().
Return the pointer to a lane object.
Definition at line 671 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::ContainsRoad(), DEBUG_ASSERT, carla::road::LaneSection::GetLane(), carla::road::MapData::GetRoad(), road, and road_id.
Referenced by GetLaneNext().
|
private |
Definition at line 768 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::GetJunction(), GetRoad(), junction, and road_id.
Referenced by GetLaneNext().
| Lane * carla::road::MapBuilder::GetLane | ( | const RoadId | road_id, |
| const LaneId | lane_id, | ||
| const double | s | ||
| ) |
Definition at line 658 of file MapBuilder.cpp.
References _map_data, carla::road::Road::GetLaneByDistance(), carla::road::MapData::GetRoad(), and road_id.
Referenced by carla::opendrive::parser::ParseLanes().
|
private |
Return a list of pointers to all lanes from a lane (using road and junction info).
Definition at line 701 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::ContainsRoad(), DEBUG_ASSERT, carla::road::LaneSection::GetDistance(), GetEdgeLanePointer(), GetJunctionLanes(), carla::road::LaneSection::GetLane(), carla::road::Lane::GetPredecessor(), carla::road::MapData::GetRoad(), carla::road::Lane::GetSuccessor(), carla::road::Lane::IsPositiveDirection(), road, and road_id.
Referenced by CreatePointersBetweenRoadSegments().
Definition at line 665 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::GetRoad(), and road_id.
Referenced by CheckSignalsOnRoads(), GenerateDefaultValiditiesForSignalReferences(), GetJunctionLanes(), carla::opendrive::parser::GeometryParser::Parse(), carla::opendrive::parser::ObjectParser::Parse(), carla::opendrive::parser::ProfilesParser::Parse(), carla::opendrive::parser::SignalParser::Parse(), and RemoveZeroLaneValiditySignalReferences().
|
private |
Removes signal references with lane validity equal to [0,0] as they have no effect on any road.
Definition at line 1134 of file MapBuilder.cpp.
References _temp_road_info_container, _temp_signal_reference_container, GetRoad(), and road_id.
Referenced by Build().
|
inline |
Definition at line 394 of file MapBuilder.h.
References carla::road::MapData::_geo_projection, and _map_data.
|
inline |
Definition at line 390 of file MapBuilder.h.
References carla::road::MapData::_geo_reference, and _map_data.
| 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.
Definition at line 945 of file MapBuilder.cpp.
References carla::road::MapData::_controllers, carla::road::MapData::_junctions, _map_data, carla::road::MapData::_signals, and junction.
Referenced by Build().
|
private |
Solves the signal references in the road.
Definition at line 903 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::_signals, _temp_signal_container, _temp_signal_reference_container, ComputeSignalTransform(), GenerateDefaultValiditiesForSignalReferences(), and carla::road::SignalType::IsTrafficLight().
Referenced by Build().
|
private |
Solves the stencil references in the road.
Definition at line 927 of file MapBuilder.cpp.
References _map_data, carla::road::MapData::_stencils, _temp_stencil_container, _temp_stencil_reference_container, and ComputeStencilTransform().
Referenced by Build().
|
private |
Definition at line 400 of file MapBuilder.h.
Referenced by AddConnection(), AddJunction(), AddJunctionController(), AddLaneLink(), AddRoad(), Build(), CreateController(), CreatePointersBetweenRoadSegments(), DebugRoadConnections(), GetEdgeLanePointer(), GetJunctionLanes(), GetLane(), GetLaneNext(), GetRoad(), SetGeoProjection(), SetGeoReference(), SolveControllerAndJuntionReferences(), SolveSignalReferencesAndTransforms(), and SolveStencilReferencesAndTransforms().
|
private |
Definition at line 458 of file MapBuilder.h.
Referenced by Build(), CreateLaneAccess(), CreateLaneBorder(), CreateLaneHeight(), CreateLaneMaterial(), CreateLaneRule(), CreateLaneSpeed(), CreateLaneVisibility(), CreateLaneWidth(), CreateRoadMark(), and CreateRoadMarkTypeLine().
|
private |
Map to temporary store all the road and lane infos until the map is built, so they can be added all together.
Definition at line 455 of file MapBuilder.h.
Referenced by AddRoadElevationProfile(), AddRoadGeometryArc(), AddRoadGeometryLine(), AddRoadGeometryParamPoly3(), AddRoadGeometryPoly3(), AddRoadGeometrySpiral(), AddRoadLateralShape(), AddRoadObjectCrosswalk(), AddSignalReference(), AddStencil(), Build(), CreateRoadSpeed(), CreateSectionOffset(), and RemoveZeroLaneValiditySignalReferences().
|
private |
Definition at line 461 of file MapBuilder.h.
Referenced by AddDependencyToSignal(), AddSignal(), AddSignalPositionInertial(), AddSignalPositionRoad(), and SolveSignalReferencesAndTransforms().
|
private |
Definition at line 463 of file MapBuilder.h.
Referenced by AddSignalReference(), GenerateDefaultValiditiesForSignalReferences(), RemoveZeroLaneValiditySignalReferences(), and SolveSignalReferencesAndTransforms().
|
private |
Definition at line 466 of file MapBuilder.h.
Referenced by AddStencil(), and SolveStencilReferencesAndTransforms().
|
private |
Definition at line 468 of file MapBuilder.h.
Referenced by AddStencil(), and SolveStencilReferencesAndTransforms().