Skip to content

Commit b0efbe4

Browse files
author
Bernd Gassmann
committed
Version 3.0.0: Major naming updates
Updating the variable naming of the generated datatypes from CamelCase to under_score_case and some other naming conventions. These are interface braking changes, therefore updating to 3.0.0 Providing basic renaming script that covers for many of the changes. Building: - support gcc-13 and Ubuntu 24.04 - support newer spdlog: adding formatters for datatype logging - remove spdlog submodule to make use of system delivered version - Harmonize CXX standard to 17 - update BUILDING.md on how to work with python venv (enforced with Ubunut 24.04) - fix python binding build and test Generated DataTypes: introduced more safe datatype operations by restricting their values to the limits after the operations allow automatic conversion of datatypes to their basetypes with "operator double()" if explicit type conversion is disabled added ad::geometry namespace and library added some ad::physics operations ad_map_access: - extended and hardened route/routing and predictions operations - added support for qgis correction functions - Added route::planning::predictRoutes* overloads which already provide the object yaw via the object data to get rid of extra calculation efforts - Fix getLaneENUHeading(match::MapMatchedPosition): set correct geo reference, otherwise returned heading is wrong - Add Heading constants - Add allowedObjectDistanceToLane to getMapMatchedBoundingBox() - Add ad::map::geometry namespace with polygon operations and extraction of occluded regions - Allow getLateralAlignementEdge() for physics::RatioValue - Fix ad::map::route::findWaypoint( distance == 0., route) - Added match:getENUBorder(LaneOccupiedRegion) function - Added point::getUnion(BoundingSphere, BoundingSphere) for use in python - Allow shortenRouteToDistance to cut intersections on request ad_map_access_qgis: - add polygon operations - remove unused partition manager - add lane correction abilities - add lane contact correction abilities - add traffic light layer - add ClickedPoint debug output and support altitude unknown matching - Support default intersection contact creation on adm load - Add support for exporting adm files
1 parent 4dd22d4 commit b0efbe4

File tree

917 files changed

+39189
-19473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

917 files changed

+39189
-19473
lines changed

.github/workflows/code_format_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Code Formatting for AD-Map Library
1+
name: Check Code Formatting for carla-map libraries
22

33
on:
44
push:
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
check_cpp:
14-
14+
1515
name: Check Code Formatting
1616

1717
runs-on: ubuntu-22.04

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
/log/
44
__pycache__/
55
*\.pyc
6+
ad_map_access/tests/test_files/Town01.adm.txt
7+

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "dependencies/spdlog"]
2-
path = dependencies/spdlog
3-
url = https://github.com/gabime/spdlog.git
41
[submodule "dependencies/odrSpiral"]
52
path = dependencies/odrSpiral
63
url = https://github.com/DLR-TS/odrSpiral

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,19 @@ To download the library, you may run:
6666
```
6767

6868
#### Supported systems <a name="systems"></a>
69-
Development system is Ubuntu 22.04
69+
Development systems are Ubuntu 22.04 and 24.04
7070
Following compiler and Python combinations are [tested continously](.github/workflows/build_test.yml):
7171

72-
| | Ubuntu 22.04 |
73-
|:---------------:|:------------:|
74-
| GCC 11 | x |
75-
| Clang 14 | x |
76-
| Python 3.10 | x |
72+
| | Ubuntu 22.04 | Ubuntu 24.04 |
73+
|:---------------:|:------------:|:------------:|
74+
| GCC 11 | x | |
75+
| GCC 13 | | x |
76+
| Clang 14 | x | |
77+
| Clang 18 | | x |
78+
| Python 3.10 | x | |
79+
| Python 3.12 | | x |
7780

78-
Important: cmake is required to be at least version 3.5!
81+
Important: cmake is required to be at least version 3.10!
7982

8083
## Building the library <a name="building"></a>
8184
See the detailed [Build instructions](https://ad-map-access.readthedocs.io/en/latest/BUILDING/index.html).

ad_map_access/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ find_package(ad_map_opendrive_reader ${CARLA-MAP_VERSION} EXACT REQUIRED CONFIG)
3939
find_package(ad_physics ${CARLA-MAP_VERSION} EXACT REQUIRED CONFIG)
4040
find_package(spdlog REQUIRED CONFIG)
4141

42-
include(generated/ad_map_access.cmake)
42+
file(GLOB_RECURSE ad_map_access_GENERATED_SOURCES "${CMAKE_CURRENT_LIST_DIR}/generated/*.cpp")
4343

4444
add_library(${PROJECT_NAME}
4545
${ad_map_access_GENERATED_SOURCES}
@@ -51,19 +51,19 @@ add_library(${PROJECT_NAME}
5151
${CMAKE_CURRENT_SOURCE_DIR}/src/access/Store.cpp
5252
${CMAKE_CURRENT_SOURCE_DIR}/src/access/StoreSerialization.cpp
5353
${CMAKE_CURRENT_SOURCE_DIR}/src/config/MapConfigFileHandler.cpp
54+
${CMAKE_CURRENT_SOURCE_DIR}/src/geometry/PolygonOperation.cpp
5455
${CMAKE_CURRENT_SOURCE_DIR}/src/intersection/CoreIntersection.cpp
5556
${CMAKE_CURRENT_SOURCE_DIR}/src/intersection/Intersection.cpp
5657
${CMAKE_CURRENT_SOURCE_DIR}/src/landmark/LandmarkOperation.cpp
5758
${CMAKE_CURRENT_SOURCE_DIR}/src/lane/BorderOperation.cpp
5859
${CMAKE_CURRENT_SOURCE_DIR}/src/lane/LaneOperation.cpp
60+
${CMAKE_CURRENT_SOURCE_DIR}/src/lane/MapAreaOperation.cpp
5961
${CMAKE_CURRENT_SOURCE_DIR}/src/match/AdMapMatching.cpp
6062
${CMAKE_CURRENT_SOURCE_DIR}/src/match/MapMatchedOperation.cpp
6163
${CMAKE_CURRENT_SOURCE_DIR}/src/opendrive/AdMapFactory.cpp
6264
${CMAKE_CURRENT_SOURCE_DIR}/src/opendrive/DataTypeConversion.cpp
6365
${CMAKE_CURRENT_SOURCE_DIR}/src/point/BoundingSphereOperation.cpp
6466
${CMAKE_CURRENT_SOURCE_DIR}/src/point/CoordinateTransform.cpp
65-
${CMAKE_CURRENT_SOURCE_DIR}/src/point/ECEFOperation.cpp
66-
${CMAKE_CURRENT_SOURCE_DIR}/src/point/ENUOperation.cpp
6767
${CMAKE_CURRENT_SOURCE_DIR}/src/point/GeometryOperation.cpp
6868
${CMAKE_CURRENT_SOURCE_DIR}/src/point/GeoOperation.cpp
6969
${CMAKE_CURRENT_SOURCE_DIR}/src/point/HeadingOperation.cpp
@@ -149,6 +149,7 @@ install(FILES
149149
# Tests
150150
#####################################################################
151151
if (BUILD_TESTING)
152+
add_subdirectory(test_support)
152153
add_subdirectory(tests)
153154
endif()
154155

ad_map_access/cmake/Version.hpp.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Generated file
1313
* @file
1414
*
15-
* Generator Version : 11.0.0-1997
15+
* Generator Version : 11.0.0-2046
1616
*/
1717

1818
#pragma once

ad_map_access/generated/ad_map_access.cmake

Lines changed: 0 additions & 42 deletions
This file was deleted.

ad_map_access/generated/include/ad/map/access/GeometryStoreItem.hpp

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ----------------- BEGIN LICENSE BLOCK ---------------------------------
33
*
4-
* Copyright (C) 2018-2020 Intel Corporation
4+
* Copyright (C) 2018-2022 Intel Corporation
55
*
66
* SPDX-License-Identifier: MIT
77
*
@@ -12,7 +12,7 @@
1212
* Generated file
1313
* @file
1414
*
15-
* Generator Version : 11.0.0-1997
15+
* Generator Version : 11.0.0-2046
1616
*/
1717

1818
#pragma once
@@ -22,6 +22,9 @@
2222
#include <limits>
2323
#include <memory>
2424
#include <sstream>
25+
#include "spdlog/fmt/ostr.h"
26+
#include "spdlog/spdlog.h"
27+
2528
/*!
2629
* @brief namespace ad
2730
*/
@@ -99,8 +102,8 @@ struct GeometryStoreItem
99102
*/
100103
bool operator==(const GeometryStoreItem &other) const
101104
{
102-
return (leftEdgeOffset == other.leftEdgeOffset) && (rightEdgeOffset == other.rightEdgeOffset)
103-
&& (leftEdgePoints == other.leftEdgePoints) && (rightEdgePoints == other.rightEdgePoints);
105+
return (left_edge_offset == other.left_edge_offset) && (right_edge_offset == other.right_edge_offset)
106+
&& (left_edge_points == other.left_edge_points) && (right_edge_points == other.right_edge_points);
104107
}
105108

106109
/**
@@ -115,10 +118,10 @@ struct GeometryStoreItem
115118
return !operator==(other);
116119
}
117120

118-
uint32_t leftEdgeOffset{0};
119-
uint32_t rightEdgeOffset{0};
120-
uint32_t leftEdgePoints{0};
121-
uint32_t rightEdgePoints{0};
121+
uint32_t left_edge_offset{0};
122+
uint32_t right_edge_offset{0};
123+
uint32_t left_edge_points{0};
124+
uint32_t right_edge_points{0};
122125
};
123126

124127
} // namespace access
@@ -157,17 +160,17 @@ namespace access {
157160
inline std::ostream &operator<<(std::ostream &os, GeometryStoreItem const &_value)
158161
{
159162
os << "GeometryStoreItem(";
160-
os << "leftEdgeOffset:";
161-
os << _value.leftEdgeOffset;
163+
os << "left_edge_offset:";
164+
os << _value.left_edge_offset;
162165
os << ",";
163-
os << "rightEdgeOffset:";
164-
os << _value.rightEdgeOffset;
166+
os << "right_edge_offset:";
167+
os << _value.right_edge_offset;
165168
os << ",";
166-
os << "leftEdgePoints:";
167-
os << _value.leftEdgePoints;
169+
os << "left_edge_points:";
170+
os << _value.left_edge_points;
168171
os << ",";
169-
os << "rightEdgePoints:";
170-
os << _value.rightEdgePoints;
172+
os << "right_edge_points:";
173+
os << _value.right_edge_points;
171174
os << ")";
172175
return os;
173176
}
@@ -187,4 +190,16 @@ inline std::string to_string(::ad::map::access::GeometryStoreItem const &value)
187190
return sstream.str();
188191
}
189192
} // namespace std
193+
194+
/*!
195+
* \brief overload of fmt::formatter calling std::to_string
196+
*/
197+
template <> struct fmt::formatter<::ad::map::access::GeometryStoreItem> : formatter<string_view>
198+
{
199+
template <typename FormatContext> auto format(::ad::map::access::GeometryStoreItem const &value, FormatContext &ctx)
200+
{
201+
return formatter<string_view>::format(std::to_string(value), ctx);
202+
}
203+
};
204+
190205
#endif // GEN_GUARD_AD_MAP_ACCESS_GEOMETRYSTOREITEM

ad_map_access/generated/include/ad/map/access/MapMetaData.hpp

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ----------------- BEGIN LICENSE BLOCK ---------------------------------
33
*
4-
* Copyright (C) 2018-2020 Intel Corporation
4+
* Copyright (C) 2018-2022 Intel Corporation
55
*
66
* SPDX-License-Identifier: MIT
77
*
@@ -12,7 +12,7 @@
1212
* Generated file
1313
* @file
1414
*
15-
* Generator Version : 11.0.0-1997
15+
* Generator Version : 11.0.0-2046
1616
*/
1717

1818
#pragma once
@@ -100,7 +100,7 @@ struct MapMetaData
100100
*/
101101
bool operator==(const MapMetaData &other) const
102102
{
103-
return (trafficType == other.trafficType);
103+
return (traffic_type == other.traffic_type);
104104
}
105105

106106
/**
@@ -115,7 +115,7 @@ struct MapMetaData
115115
return !operator==(other);
116116
}
117117

118-
::ad::map::access::TrafficType trafficType;
118+
::ad::map::access::TrafficType traffic_type;
119119
};
120120

121121
} // namespace access
@@ -154,8 +154,8 @@ namespace access {
154154
inline std::ostream &operator<<(std::ostream &os, MapMetaData const &_value)
155155
{
156156
os << "MapMetaData(";
157-
os << "trafficType:";
158-
os << _value.trafficType;
157+
os << "traffic_type:";
158+
os << _value.traffic_type;
159159
os << ")";
160160
return os;
161161
}
@@ -175,4 +175,16 @@ inline std::string to_string(::ad::map::access::MapMetaData const &value)
175175
return sstream.str();
176176
}
177177
} // namespace std
178+
179+
/*!
180+
* \brief overload of fmt::formatter calling std::to_string
181+
*/
182+
template <> struct fmt::formatter<::ad::map::access::MapMetaData> : formatter<string_view>
183+
{
184+
template <typename FormatContext> auto format(::ad::map::access::MapMetaData const &value, FormatContext &ctx)
185+
{
186+
return formatter<string_view>::format(std::to_string(value), ctx);
187+
}
188+
};
189+
178190
#endif // GEN_GUARD_AD_MAP_ACCESS_MAPMETADATA

ad_map_access/generated/include/ad/map/access/MapMetaDataValidInputRange.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ----------------- BEGIN LICENSE BLOCK ---------------------------------
33
*
4-
* Copyright (C) 2018-2020 Intel Corporation
4+
* Copyright (C) 2018-2022 Intel Corporation
55
*
66
* SPDX-License-Identifier: MIT
77
*
@@ -12,7 +12,7 @@
1212
* Generated file
1313
* @file
1414
*
15-
* Generator Version : 11.0.0-1997
15+
* Generator Version : 11.0.0-2046
1616
*/
1717

1818
#pragma once
@@ -38,7 +38,7 @@ inline bool withinValidInputRange(::ad::map::access::MapMetaData const &input, b
3838
{
3939
// check for generic member input ranges
4040
bool inValidInputRange = true;
41-
inValidInputRange = withinValidInputRange(input.trafficType, logErrors);
41+
inValidInputRange = withinValidInputRange(input.traffic_type, logErrors);
4242
if (!inValidInputRange && logErrors)
4343
{
4444
spdlog::error("withinValidInputRange(::ad::map::access::MapMetaData)>> {} has invalid member",

0 commit comments

Comments
 (0)