MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / GetLaneWidth

Method GetLaneWidth

LibCarla/source/carla/road/Map.cpp:371–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369 }
370
371 double Map::GetLaneWidth(const Waypoint waypoint) const {
372 const auto s = waypoint.s;
373
374 const auto &lane = GetLane(waypoint);
375 RELEASE_ASSERT(lane.GetRoad() != nullptr);
376 RELEASE_ASSERT(s <= lane.GetRoad()->GetLength());
377
378 const auto lane_width_info = lane.GetInfo<RoadInfoLaneWidth>(s);
379 RELEASE_ASSERT(lane_width_info != nullptr);
380
381 return lane_width_info->GetPolynomial().Evaluate(s);
382 }
383
384 JuncId Map::GetJunctionId(RoadId road_id) const {
385 return _data.GetRoad(road_id).GetJunctionId();

Callers 2

Calls 3

GetRoadMethod · 0.45
GetLengthMethod · 0.45
EvaluateMethod · 0.45

Tested by

no test coverage detected