From b793f0f3d3590763e3953c429acd102be31d3060 Mon Sep 17 00:00:00 2001 From: Marc Garcia Puig Date: Tue, 2 Apr 2019 16:15:15 +0200 Subject: [PATCH] Deleted obsolete constructor --- .../carla/road/element/LaneCrossingCalculator.cpp | 9 ++++++--- LibCarla/source/carla/road/element/LaneMarking.cpp | 14 -------------- LibCarla/source/carla/road/element/LaneMarking.h | 3 --- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/LibCarla/source/carla/road/element/LaneCrossingCalculator.cpp b/LibCarla/source/carla/road/element/LaneCrossingCalculator.cpp index 801aedadd..98c28920f 100644 --- a/LibCarla/source/carla/road/element/LaneCrossingCalculator.cpp +++ b/LibCarla/source/carla/road/element/LaneCrossingCalculator.cpp @@ -14,7 +14,12 @@ namespace carla { namespace road { namespace element { - constexpr uint32_t FLAGS = + /// @todo Temporary flags to search lanes where we can find road marks. + /// This needs to be expanded searching in shoulders too, but since + /// shouders have a small width, they can cause problems while finding + /// the nearest center of a lane given a location that are in a road, + /// but very close to a shoulder. + static constexpr uint32_t FLAGS = static_cast(Lane::LaneType::Driving) | static_cast(Lane::LaneType::Bidirectional) | static_cast(Lane::LaneType::Biking) | @@ -22,8 +27,6 @@ namespace element { /// Calculate the lane markings that need to be crossed from @a lane_id_origin /// to @a lane_id_destination. - /// - /// @todo This should use the info in the OpenDrive instead. static std::vector CrossingAtSameSection( const Map &map, const Waypoint *w0, diff --git a/LibCarla/source/carla/road/element/LaneMarking.cpp b/LibCarla/source/carla/road/element/LaneMarking.cpp index 317696335..76714ae0a 100644 --- a/LibCarla/source/carla/road/element/LaneMarking.cpp +++ b/LibCarla/source/carla/road/element/LaneMarking.cpp @@ -73,20 +73,6 @@ namespace element { } } - LaneMarking::LaneMarking(Type in_type) - : type(in_type) { - switch (type) { - case Type::Broken: - lane_change = LaneChange::Both; - break; - case Type::Solid: - lane_change = LaneChange::None; - break; - default: - throw_exception(std::runtime_error("lane type not supported")); - } - } - LaneMarking::LaneMarking(const RoadInfoMarkRecord &info) : type(GetType(info.GetType())), color(GetColor(info.GetColor())), diff --git a/LibCarla/source/carla/road/element/LaneMarking.h b/LibCarla/source/carla/road/element/LaneMarking.h index 13a8b26b3..997dad4e0 100644 --- a/LibCarla/source/carla/road/element/LaneMarking.h +++ b/LibCarla/source/carla/road/element/LaneMarking.h @@ -53,9 +53,6 @@ namespace element { Both = 0x03 // 11 }; - /// @todo Temporary constructor until LaneCrossingCalculator is fixed. - LaneMarking(Type type); - explicit LaneMarking(const RoadInfoMarkRecord &info); Type type = Type::None;