22#include <boost/optional.hpp>
83 std::pair<const element::RoadInfoMarkRecord *, const element::RoadInfoMarkRecord *>
103 Waypoint waypoint,
double distance,
bool stop_at_junction =
false)
const;
106 std::vector<const element::RoadInfoSignal*>
121 std::vector<Waypoint>
GetNext(
Waypoint waypoint,
double distance)
const;
152 std::unordered_map<road::RoadId, std::unordered_set<road::RoadId>>
157 const double distance,
158 const float extra_width = 0.6f,
159 const bool smooth_junctions =
true)
const;
164 std::map<road::Lane::LaneType , std::vector<std::unique_ptr<geom::Mesh>>>
175 float distancebetweentrees,
176 float distancefromdrivinglineborder,
177 float s_offset = 0)
const;
186 std::vector<std::string>& outinfo )
const;
188 const std::unordered_map<SignId, std::unique_ptr<Signal>>&
GetSignals()
const {
192 const std::unordered_map<ContId, std::unique_ptr<Controller>>&
GetControllers()
const {
198#ifdef LIBCARLA_WITH_GTEST
216 std::vector<Rtree::TreeElement> &rtree_elements,
223 std::vector<Rtree::TreeElement> &rtree_elements,
231 std::map<road::Lane::LaneType, std::vector<std::unique_ptr<geom::Mesh>>>
233 const std::vector<RoadId>& RoadsID,
235 const size_t number_of_roads_per_thread)
const;
242 juntion_out_mesh_list)
const;
247 junction_out_mesh_list)
const;
258 std::unique_ptr<geom::Mesh>
SDFToMesh(
const road::Junction& jinput,
const std::vector<geom::Vector3D>& sdfinput,
int grid_cells_per_dim)
const;
Inherit (privately) to suppress copy construction and assignment.
Mesh data container, validator and exporter.
LaneType
Can be used as flags
const geom::GeoLocation & GetGeoReference() const
const std::unordered_map< SignId, std::unique_ptr< Signal > > & GetSignals() const
const std::unordered_map< ContId, std::unique_ptr< Controller > > & GetControllers() const
std::vector< std::pair< Waypoint, Waypoint > > GenerateTopology() const
Generate the minimum set of waypoints that define the topology of map.
std::vector< SignalSearchData > GetSignalsInDistance(Waypoint waypoint, double distance, bool stop_at_junction=false) const
Searches signals from an initial waypoint until the defined distance.
JuncId GetJunctionId(RoadId road_id) const
std::vector< Waypoint > GetPrevious(Waypoint waypoint, double distance) const
Return the list of waypoints at distance in the reversed direction that a vehicle at waypoint could d...
bool IsJunction(RoadId road_id) const
Lane::LaneType GetLaneType(Waypoint waypoint) const
std::unique_ptr< geom::Mesh > SDFToMesh(const road::Junction &jinput, const std::vector< geom::Vector3D > &sdfinput, int grid_cells_per_dim) const
std::vector< std::pair< geom::Transform, std::string > > GetTreesTransform(const geom::Vector3D &minpos, const geom::Vector3D &maxpos, float distancebetweentrees, float distancefromdrivinglineborder, float s_offset=0) const
double GetLaneWidth(Waypoint waypoint) const
std::vector< RoadId > FilterRoadsByPosition(const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const
void AddElementToRtreeAndUpdateTransforms(std::vector< Rtree::TreeElement > &rtree_elements, geom::Transform ¤t_transform, Waypoint ¤t_waypoint, Waypoint &next_waypoint)
boost::optional< element::Waypoint > GetClosestWaypointOnRoad(const geom::Location &location, int32_t lane_type=static_cast< int32_t >(Lane::LaneType::Driving)) const
========================================================================
boost::optional< element::Waypoint > GetWaypoint(const geom::Location &location, int32_t lane_type=static_cast< int32_t >(Lane::LaneType::Driving)) const
std::vector< Waypoint > GenerateWaypointsOnRoadEntries(Lane::LaneType lane_type=Lane::LaneType::Driving) const
Generate waypoints on each lane at the start of each road
std::pair< const element::RoadInfoMarkRecord *, const element::RoadInfoMarkRecord * > GetMarkRecord(Waypoint waypoint) const
std::vector< element::LaneMarking > CalculateCrossedLanes(const geom::Location &origin, const geom::Location &destination) const
geom::Mesh GenerateWalls(const double distance, const float wall_height) const
std::vector< carla::geom::BoundingBox > GetJunctionsBoundingBoxes() const
boost::optional< Waypoint > GetRight(Waypoint waypoint) const
Return a waypoint at the lane of waypoint's right lane.
std::vector< JuncId > FilterJunctionsByPosition(const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const
std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > GenerateRoadsMultithreaded(const carla::geom::MeshFactory &mesh_factory, const std::vector< RoadId > &RoadsID, const size_t index, const size_t number_of_roads_per_thread) const
boost::optional< Waypoint > GetLeft(Waypoint waypoint) const
Return a waypoint at the lane of waypoint's left lane.
geom::Mesh GetAllCrosswalkMesh() const
Buids a mesh of all crosswalks based on the OpenDRIVE
std::vector< Waypoint > GetNext(Waypoint waypoint, double distance) const
Return the list of waypoints at distance such that a vehicle at waypoint could drive to.
Junction * GetJunction(JuncId id)
Map(MapData m)
========================================================================
const geom::GeoLocation & GetGeoReference() const
========================================================================
void GenerateJunctions(const carla::geom::MeshFactory &mesh_factory, const rpc::OpendriveGenerationParameters ¶ms, const geom::Vector3D &minpos, const geom::Vector3D &maxpos, std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > *juntion_out_mesh_list) const
const std::unordered_map< SignId, std::unique_ptr< Signal > > & GetSignals() const
std::vector< Waypoint > GenerateWaypointsInRoad(RoadId road_id, Lane::LaneType lane_type=Lane::LaneType::Driving) const
Generate waypoints at the entry of each lane of the specified road
const std::unordered_map< ContId, std::unique_ptr< Controller > > & GetControllers() const
std::vector< std::unique_ptr< geom::Mesh > > GenerateChunkedMesh(const rpc::OpendriveGenerationParameters ¶ms) const
geom::Transform ComputeTransform(Waypoint waypoint) const
std::vector< Waypoint > GenerateWaypoints(double approx_distance) const
Generate all the waypoints in map separated by approx_distance.
std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > GenerateOrderedChunkedMeshInLocations(const rpc::OpendriveGenerationParameters ¶ms, const geom::Vector3D &minpos, const geom::Vector3D &maxpos) const
void GenerateSingleJunction(const carla::geom::MeshFactory &mesh_factory, const JuncId Id, std::map< road::Lane::LaneType, std::vector< std::unique_ptr< geom::Mesh > > > *junction_out_mesh_list) const
std::vector< Waypoint > GetPredecessors(Waypoint waypoint) const
std::vector< Waypoint > GetSuccessors(Waypoint waypoint) const
========================================================================
std::vector< geom::Location > GetAllCrosswalkZones() const
Returns a list of locations defining 2d areas, when a location is repeated an area is finished
std::vector< std::unique_ptr< geom::Mesh > > GenerateLineMarkings(const rpc::OpendriveGenerationParameters ¶ms, const geom::Vector3D &minpos, const geom::Vector3D &maxpos, std::vector< std::string > &outinfo) const
Buids a list of meshes related with LineMarkings
float GetZPosInDeformation(float posx, float posy) const
void AddElementToRtree(std::vector< Rtree::TreeElement > &rtree_elements, geom::Transform ¤t_transform, geom::Transform &next_transform, Waypoint ¤t_waypoint, Waypoint &next_waypoint)
Helper Functions for constructing the rtree element list
std::vector< const element::RoadInfoSignal * > GetAllSignalReferences() const
Return all RoadInfoSignal in the map
std::vector< std::pair< Waypoint, Waypoint > > GetJunctionWaypoints(JuncId id, Lane::LaneType lane_type) const
Generate waypoints of the junction
std::unordered_map< road::RoadId, std::unordered_set< road::RoadId > > ComputeJunctionConflicts(JuncId id) const
const Lane & GetLane(Waypoint waypoint) const
========================================================================
geom::Mesh GenerateMesh(const double distance, const float extra_width=0.6f, const bool smooth_junctions=true) const
Buids a mesh based on the OpenDRIVE
This file contains definitions of common data structures used in traffic manager.
Data structure for the signal search
const element::RoadInfoSignal * signal
Seting for map generation from opendrive without additional geometry