Skip to content

Fix bugs and improve performance in map_maker, QGIS plugin, CMake, CI workflows, and docs - #266

Open
M-Colley wants to merge 1 commit into
carla-simulator:mainfrom
M-Colley:fix/tools-cmake-ci-and-docs
Open

M-Colley wants to merge 1 commit into
carla-simulator:mainfrom
M-Colley:fix/tools-cmake-ci-and-docs

Conversation

@M-Colley

@M-Colley M-Colley commented Nov 14, 2026 •

Copy link
Copy Markdown

Summary

Fixes bugs and performance bottlenecks across tools/map_maker, tools/ad_map_access_qgis, cmake/, CI workflows (.github/), and doc/ (including resolving the case-insensitive filename collision on Windows/macOS checkouts).

Note: Part 5 of 5 independent, modular PRs branched directly from main with strictly disjoint file sets (each builds, tests, and merges cleanly in any order).

Bug Fixes & Performance Improvements

  • tools/map_maker:
    • MapDataStore: Replace the hash-inconsistent Point2d unordered_map (whose 0.1m rounding hash disagreed with < 1e-9 operator==) with an exact $O(1)$ $3 \times 3$ spatial grid preserving squaredDistance < 1e-9; fix lat/lon aliasing in transformToGCS and rebuild the spatial grid; use .at() in non-const accessors and reserve() in ID list builders.
    • AdMapGenerator, Road, Intersection, BigIntersectionGenerator, Lane, MapDataValidator, PolyLineConversion: Fix perpendicular point-to-border distance check, speedLimit > 0 guard, $O(N^2/2)$ intersection overlap loop, and landmark AABB/border caching; fix invertRoadDirection width/speed swaps and convertToLeftHandTraffic double-swap; fix Intersection arm ordering, per-arm connection point offsets, zero speed limits, minimumAngleDifference magnitude, collinear determinant guard, and internal road ID lookup; merge transitive clusters and deduplicate road deletions in BigIntersectionGenerator; fix MapDataValidator backward left-border direction and polyline guards; guard unsigned underflow in PolyLineConversion and empty borders in Lane with fast AABB early-out.
    • OSM Converter: Index road geometries in $O(1)$ in OsmToInternalConverter and OsmTransitionDetector; optimize OsmPoiProcessor to a single pass over ways with pre-fetched POI coordinates and guard < 2-node ways; clamp negative/zero lane counts and use safe integer parsing in OsmWayProcessor; reset state and bounds-check sign strings in OsmPoiExtractor; fix decreasing-lane interpolation in OsmMultiLaneInterpolation and bounds checks in OsmWayIterator and OsmJunctionProcessor.
    • Geometry, Common & CLI: Replace dense $O(N^3)$ LU + <malloc.h> in CubicSpline with $O(N)$ tridiagonal LAPACKE_dgtsv and strict knot monotonicity checks; fix Clothoid forward arc-length parameterization, Circle angle normalization, CubicBezier/QuadraticBezier t = 1 endpoint evaluation, Line2d collinear segment intersection and docstrings, Polyline2d split/angle/bounds handling, Direction2d $O(1)$ std::fmod normalization, LineCoordinateSystem segment length, ArithmeticHelpers (vec2d, bisectingVector axis-aligned zero check, move(straight2d), closerCrossingPoint), Point::operator!= const, and duplicate Point2d operator*; fix StringTestHelper::readFile leaks, StringHelper::writeStringParam bounds, LogFactory default sink handling, ProgramOptions file/argv checks, osm_to_adm Main serializer error checks, and create_map_request.pl negative/double-quoted coordinate parsing.
  • tools/ad_map_access_qgis:
    • Fix undefined names, Qt/QGIS API mismatches, division-by-zero, mutable default arguments, bare except: clauses, and redundant feature/lane lookups across 18 plugin modules and metadata.txt.in.
  • CMake, CI & Docs:
    • Fix CMAKE_CXX_STANDARD_REQUIRED variable name in cmake/compile-options.cmake, shared-library detection and cleanup in python_wrapper_helper.py.in, and target/warning/gtest/python-binding CMake scripts.
    • Rename doc/ad_map_access_qgis/images/SetSnapAltitude.png to SetSnapAltitude_result.png (fixing collision with SetSnapAltitude.PNG on case-insensitive filesystems) and fix doc typos and GitHub Actions workflow configurations.

This change is Reviewable

…, and docs

- tools/map_maker:
  - Replace hash-inconsistent Point2d unordered_map with exact O(1) 3x3 spatial grid in MapDataStore; fix transformToGCS lat/lon aliasing and rebuild spatial index
  - Fix AdMapGenerator perpendicular distance check, speedLimit > 0 guard, O(N^2/2) overlap loop, and landmark AABB/border caching
  - Fix Road::invertRoadDirection width/speed swaps and convertToLeftHandTraffic double-swap; guard PolyLineConversion and Lane against empty/short polylines
  - Fix Intersection arm ordering/connection point indexing, zero speed limits, angle difference abs, collinear determinant guard, and internal road ID lookup; fix BigIntersectionGenerator cluster merging and duplicate deletions
  - Fix MapDataValidator backward left-border direction and invalid polyline checks
  - Optimize OsmToInternalConverter road geometry index to O(1) and OsmPoiProcessor to single-pass over ways with pre-fetched POI coordinates
  - Fix OsmWayProcessor negative/zero lane counts and integer parsing, OsmPoiExtractor state reset and sign parsing bounds, OsmWayIterator/OsmJunctionProcessor/OsmTransitionDetector/OsmMultiLaneInterpolation bounds and decreasing-lane interpolation
  - Fix geometry bugs and performance: O(N) tridiagonal LAPACKE_dgtsv in CubicSpline, Clothoid forward arc-length parameterization, Circle angle normalization, CubicBezier/QuadraticBezier t=1 endpoint, Line2d collinear segment intersection, Polyline2d split/angle/bounds fixes, Direction2d O(1) fmod normalization, LineCoordinateSystem segment length, ArithmeticHelpers vec2d/bisectingVector/move/closerCrossingPoint, Point constness, and Point2d duplicate operator*
  - Fix StringTestHelper::readFile leaks, StringHelper::writeStringParam bounds, LogFactory default sink handling, ProgramOptions file/argv checks, Main serializer checks, and create_map_request.pl regex
- tools/ad_map_access_qgis:
  - Fix undefined symbols, Qt/QGIS API bugs, division-by-zero, mutable default arguments, bare excepts, and repeated feature/lane lookups across 18 plugin modules and metadata.txt.in
- cmake & build:
  - Fix python_wrapper_helper.py.in shared-lib detection, python-binding.cmake/gtest.cmake/warnings.cmake/compile-options.cmake issues, and CMakeLists target configuration
- CI & docs:
  - Resolve case-insensitive filename collision (SetSnapAltitude_result.png), update GitHub Actions workflows and dependabot config, and fix documentation typos

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant