Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add map packages #8

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
6b276e7
release v0.4.0
mitsudome-r Nov 30, 2021
e2e8d42
add resolution param in lanelet2_extension (#760)
Nov 30, 2021
c482204
Fix/extend drivable area beyond goal (#781)
k0suke-murakami Nov 30, 2021
cb89d24
Fix intersection preceeding lane query (#807)
mitsudome-r Nov 30, 2021
e56f474
Install executables in lanelet2_map_preprocessor (#834)
mitsudome-r Nov 30, 2021
108f2c7
remove ROS1 packages temporarily
mitsudome-r Nov 30, 2021
3dc7ce8
Revert "remove ROS1 packages temporarily"
mitsudome-r Nov 30, 2021
5365110
add COLCON_IGNORE to ros1 packages
mitsudome-r Nov 30, 2021
8649e82
Rename launch files to launch.xml (#28)
nnmm Nov 30, 2021
ea3bcb3
port map_tf_generator (#32)
TakaHoribe Nov 30, 2021
b0121de
Port lanelet2 extension (#36)
mitsudome-r Nov 30, 2021
a599d1d
Port map loader (#44)
mitsudome-r Nov 30, 2021
86e242e
Add geometry2 to repos (#76)
mitsudome-r Nov 30, 2021
417446b
Revert "Add geometry2 to repos (#76)" (#96)
nnmm Nov 30, 2021
015abc6
Rename h files to hpp (#142)
nnmm Nov 30, 2021
5325540
Adjust copyright notice on 532 out of 699 source files (#143)
nnmm Nov 30, 2021
9321020
Use quotes for includes where appropriate (#144)
nnmm Nov 30, 2021
5f8f234
Run uncrustify on the entire Pilot.Auto codebase (#151)
nnmm Nov 30, 2021
d9e815e
fixing trasient_local in ROS2 packages (#160)
nik-tier4 Nov 30, 2021
2c21101
added linters to lanelet1_extension (#170)
nik-tier4 Nov 30, 2021
f6a235f
adding linters to map_loader (#171)
nik-tier4 Nov 30, 2021
cacf53c
adding linters to map_tf_generator (#172)
nik-tier4 Nov 30, 2021
9610c23
apply env_var to use_sim_time (#222)
k0suke-murakami Nov 30, 2021
67c254b
Ros2 v0.8.0 map loader and lanelet2 extension (#279)
TakaHoribe Nov 30, 2021
cabccf9
Ros2 v0.8 fix typo of "preceding" (#323)
isamu-takagi Nov 30, 2021
cc7f0fb
Fix rviz2 low FPS (#390)
isamu-takagi Nov 30, 2021
52ae2bd
[map_loader] modify colors for lane markers for better visualization …
mitsudome-r Nov 30, 2021
5e4d064
fix empty marker (#423)
taikitanaka3 Nov 30, 2021
88b3f3f
Fix typo in map module (#437)
kmiya Nov 30, 2021
b9c009e
add license (#443)
k0suke-murakami Nov 30, 2021
63c32e9
avoid pushing empty marker (#441)
taikitanaka3 Nov 30, 2021
8423a01
add use_sim-time option (#454)
tkimura4 Nov 30, 2021
4eede82
Sync public repo (#1228)
mitsudome-r Nov 30, 2021
28aba63
Revert "fix: re-construct laneletMapLayer for reindex RTree (#463)" (…
wep21 Nov 30, 2021
a367794
add pcd file check (#1232)
tkimura4 Nov 30, 2021
4ec0cad
Unify Apache-2.0 license name (#1242)
kmiya Nov 30, 2021
6750243
Remove use_sim_time for set_parameter (#1260)
wep21 Nov 30, 2021
6e2d072
Map components (#1311)
wep21 Nov 30, 2021
c9dc075
Fix dependency for query (#1519)
wep21 Nov 30, 2021
38a15ed
Fix a small bug (#1644)
kenji-miyake Nov 30, 2021
56db0d0
Fix minor flaws detected by Clang-Tidy (#1647)
kmiya Nov 30, 2021
ad37f17
Add pre-commit (#1560)
KeisukeShima Nov 30, 2021
262c2e0
Porting traffic light viz (#1284)
KeisukeShima Nov 30, 2021
6cfbddf
Add markdownlint and prettier (#1661)
kenji-miyake Nov 30, 2021
85d73f5
Feature/compare elevation map (#1488)
kosuke55 Nov 30, 2021
4d6844f
suppress warnings for declare parameters (#1724)
h-ohta Nov 30, 2021
9e92758
suppress warnings for map (#1773)
h-ohta Nov 30, 2021
2a1b070
Fix clang warnings (#1859)
kenji-miyake Nov 30, 2021
94ef0bf
Sync v1.3.0 (#1909)
kosuke55 Nov 30, 2021
03fee6b
Fix typos in README of map_loader (#1923)
kmiya Nov 30, 2021
16d47b9
fix some typos (#1941)
h-ohta Nov 30, 2021
b340698
Add autoware api (#1979)
isamu-takagi Nov 30, 2021
4a330af
Invoke code formatter at pre-commit (#1935)
IshitaTakeshi Nov 30, 2021
8d806c2
Save elevation_map with pcd md5sum (#1988)
kosuke55 Nov 30, 2021
a7cb078
Feature/add virtual traffic light planner (#1588)
kenji-miyake Nov 30, 2021
9e055a4
Fix deprecated constant of transient local (#1994)
isamu-takagi Nov 30, 2021
2aecae3
Fix lint errors in lanelet2_extension (#2028)
kenji-miyake Nov 30, 2021
6e24f2e
add sort-package-xml hook in pre-commit (#1881)
KeisukeShima Nov 30, 2021
01445ca
Revert "[map_loader] modify colors for lane markers for better visual…
yukkysaito Nov 30, 2021
75554c3
Fix elevation_map_loader downsample (#2055)
kosuke55 Nov 30, 2021
c137b82
Add elevation_map data dir (#2093)
kosuke55 Nov 30, 2021
9fd8ed6
Minor fixes of map_loader's README (#2116)
kmiya Nov 30, 2021
ab1679e
Fix elevation_map hash due to mutiple slashes of pcd path (#2192)
kosuke55 Nov 30, 2021
4e5729f
Fix broken links of images on lanelet2_extension docs (#2206)
kmiya Nov 30, 2021
ce8f1b8
Add lanelet XML API (#2262)
isamu-takagi Nov 30, 2021
62b1287
show traffic light id marker (#1554) (#1678)
wep21 Nov 30, 2021
463b501
Feature/porting behavior path planner (#1645)
wep21 Nov 30, 2021
aaba179
change type of traffic light marker (SPHERE_LIST->SPHERE) (#1789)
tkimura4 Nov 30, 2021
40e2141
fix alpha (#1797)
tkimura4 Nov 30, 2021
1356fff
Feature/improve intersection detection area (#1958)
tkimura4 Nov 30, 2021
d84bfa7
Apply format (#1999)
Nov 30, 2021
363e880
Feature/expand drivable area (#1812)
satoshi-ota Nov 30, 2021
4f168e3
add shoulder road lanelets (#2121)
tkimura4 Nov 30, 2021
4a1fc22
Feature/no stopping area reg element (#2144)
taikitanaka3 Nov 30, 2021
cf13aa5
Add document for new map format (#1778)
kyoichi-sugahara Nov 30, 2021
95ee12d
Change formatter to clang-format and black (#2332)
kenji-miyake Nov 30, 2021
f8ed8e6
Add COLCON_IGNORE (#500)
kenji-miyake Nov 30, 2021
d4e20e0
port lanelet2_extension (#483)
k0suke-murakami Nov 30, 2021
6abb935
port map loader (#508)
1222-takeshi Nov 30, 2021
5988a7c
remove COLCON_IGNORE in system_packages and map_tf_generator (#532)
1222-takeshi Nov 30, 2021
d885217
add readme (#561)
tkimura4 Nov 30, 2021
87cba84
fix old description
taikitanaka3 Nov 30, 2021
6569427
Merge branch 'tier4/proposal' into filter/map_pkg
taikitanaka3 Dec 1, 2021
7331618
Merge branch 'tier4/proposal' into filter/map_pkg
taikitanaka3 Dec 1, 2021
fc103f1
Merge branch 'tier4/proposal' into filter/map_pkg
taikitanaka3 Dec 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions map/lanelet2_extension/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
cmake_minimum_required(VERSION 3.5)
project(lanelet2_extension)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

find_package(PkgConfig)
find_path(GeographicLib_INCLUDE_DIR GeographicLib/Config.h
PATH_SUFFIXES GeographicLib
)
set(GeographicLib_INCLUDE_DIRS ${GeographicLib_INCLUDE_DIR})

find_library(GeographicLib_LIBRARIES
NAMES Geographic
)

find_library(PUGIXML_LIBRARIES
NAMES pugixml
)

find_path(PUGIXML_INCLUDE_DIRS
NAMES pugixml.hpp
PATH_SUFFIXES pugixml
)

include_directories(
${GeographicLib_INCLUDE_DIRS}
${PUGIXML_INCLUDE_DIRS}
)

add_definitions(${GeographicLib_DEFINITIONS})

ament_auto_add_library(lanelet2_extension_lib SHARED
lib/autoware_osm_parser.cpp
lib/autoware_traffic_light.cpp
lib/detection_area.cpp
lib/no_stopping_area.cpp
lib/message_conversion.cpp
lib/mgrs_projector.cpp
lib/query.cpp
lib/road_marking.cpp
lib/utilities.cpp
lib/virtual_traffic_light.cpp
lib/visualization.cpp
)
target_link_libraries(lanelet2_extension_lib
${GeographicLib_LIBRARIES}
)

ament_auto_add_executable(lanelet2_extension_sample src/sample_code.cpp)
add_dependencies(lanelet2_extension_sample lanelet2_extension_lib)
target_link_libraries(lanelet2_extension_sample
lanelet2_extension_lib
)

ament_auto_add_executable(autoware_lanelet2_validation src/validation.cpp)
add_dependencies(autoware_lanelet2_validation lanelet2_extension_lib)
target_link_libraries(autoware_lanelet2_validation
${catkin_LIBRARIES}
${PUGIXML_LIBRARIES}
lanelet2_extension_lib
)

if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(message_conversion-test test/src/test_message_conversion.cpp)
target_link_libraries(message_conversion-test lanelet2_extension_lib)
ament_add_gtest(projector-test test/src/test_projector.cpp)
target_link_libraries(projector-test lanelet2_extension_lib)
ament_add_gtest(query-test test/src/test_query.cpp)
target_link_libraries(query-test lanelet2_extension_lib)
ament_add_gtest(regulatory_elements-test test/src/test_regulatory_elements.cpp)
target_link_libraries(regulatory_elements-test lanelet2_extension_lib)
ament_add_gtest(utilities-test test/src/test_utilities.cpp)
target_link_libraries(utilities-test lanelet2_extension_lib)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package()
87 changes: 87 additions & 0 deletions map/lanelet2_extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# lanelet2_extension package

This package contains external library for Lanelet2 and is meant to ease the use of Lanelet2 in Autoware.

## Lanelet Format for Autoware

Autoware uses extended Lanelet2 Format for Autoware, which means you need to add some tags to default OSM file if you want to fully use Lanelet2 maps. For details about custom tags, please refer to this [document](./docs/lanelet2_format_extension.md).

## Code API

### IO

#### Autoware OSM Parser

Autoware Lanelet2 Format uses .osm extension as original Lanelet2.
However, there are some custom tags that is used by the parser.

Currently, this includes:

- overwriting x,y values with `local_x` and `local_y` tags.
- reading `<MapMetaInfo>` tag which contains information about map format version and map version.

The parser is registered as "autoware_osm_handler" as lanelet parser

### Projection

#### MGRS Projector

MGRS projector projects latitude longitude into MGRS Coordinates.

### Regulatory Elements

#### Autoware Traffic Light

Autoware Traffic Light class allows you to retrieve information about traffic lights.
Autoware Traffic Light class contains following members:

- traffic light shape
- light bulbs information of traffic lights
- stopline associated to traffic light

### Utility

#### Message Conversion

This contains functions to convert lanelet map objects into ROS messages.
Currently it contains following conversions:

- lanelet::LaneletMapPtr to/from autoware_auto_mapping_msgs::msg::HADMapBin
- lanelet::Point3d to geometry_msgs::Point
- lanelet::Point2d to geometry_msgs::Point
- lanelet::BasicPoint3d to geometry_msgs::Point

#### Query

This module contains functions to retrieve various information from maps.
e.g. crosswalks, trafficlights, stoplines

#### Utilities

This module contains other useful functions related to Lanelet.
e.g. matching waypoint with lanelets

### Visualization

Visualization contains functions to convert lanelet objects into visualization marker messages.
Currently it contains following conversions:

- lanelet::Lanelet to Triangle Markers
- lanelet::LineString to LineStrip Markers
- TrafficLights to Triangle Markers

## Nodes

### lanelet2_extension_sample

Code for this explains how this lanelet2_extension library is used.
The executable is not meant to do anything.

### autoware_lanelet2_extension

This node checks if an .osm file follows the Autoware version of Lanelet2 format.
You can check by running:

```sh
ros2 run lanelet2_extension autoware_lanelet2_validation _map_file:=<path/to/map.osm>
```
Binary file added map/lanelet2_extension/docs/detection_area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions map/lanelet2_extension/docs/extra_lanelet_subtypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Extra Lanelet Subtypes

## Roadside Lane

The subtypes for this lanelet classify the outer lanes adjacent to the driving lane.Since the list of lanelet subtypes defined in this [link](https://github.com/fzi-forschungszentrum-informatik/Lanelet2/blob/master/lanelet2_core/doc/LaneletAndAreaTagging.md) cannot represent the shoulder lane and pedestrian lane described below, two new subtypes are defined.When parking on the street, it is necessary to distinguish between a shoulder lane which can be used by vehicles, and a pedestrian lane which can be used by pedestrians and bicycles.If you park in a shoulder lane, you can use the entire lane for temporary parking, but if you park in a pedestrian lane, you must leave a space of at least 75cm.

### Road shoulder subtype

- refers: lanelet with subtype attribute. Subtype explains what the type of roadside it represents. If there is an area outside of this roadside lane that is open to traffic, such as a sidewalk or bike lane, select the road_shoulder subtype.

![Road shoulder](road_shoulder.svg)

Sample road shoulder in .osm format is shown below:

```xml
<relation id="120700">
<member type="way" role="left" ref="34577"/>
<member type="way" role="right" ref="120694"/>
<tag k="type" v="lanelet"/>
<tag k="subtype" v="road_shoulder"/>
<tag k="speed_limit" v="10"/>
<tag k="location" v="urban"/>
<tag k="one_way" v="yes"/>
</relation>
```

### Pedestrian lane subtype

- refers: lanelet with subtype attribute. Subtype explains what the type of roadside it represents. If there are no passable areas outside of this roadside lane, select the pedestrian_lane subtype.

![Pedestrian lane](pedestrian_lane.svg)

Sample pedestrian lane in .osm format is shown below:

```xml
<relation id="120700">
<member type="way" role="left" ref="34577"/>
<member type="way" role="right" ref="120694"/>
<tag k="type" v="lanelet"/>
<tag k="subtype" v="pedestrian_lane"/>
<tag k="speed_limit" v="10"/>
<tag k="location" v="urban"/>
<tag k="one_way" v="yes"/>
</relation>
```
63 changes: 63 additions & 0 deletions map/lanelet2_extension/docs/extra_regulatory_elements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Extra Regulatory Elements

## Detection Area

This regulatory element specifies region of interest which vehicle must pay attention whenever it is driving along the associated lanelet. When there are any obstacle in the detection area, vehicle must stop at specified stopline.

- refers: refers to detection area polygon. There could be multiple detection areas registered to a single regulatory element.
- refline: refers to stop line of the detection area

![Detection area](detection_area.png)

Sample detection area in .osm format is shown below:

```xml
<node id=1 version='1' lat='49.00541994701' lon='8.41565013855'>
<tag k=’ele’ v=’0’/>
</node>
<node id=2 version='1' lat='49.00542091657' lon='8.4156469497'>
<tag k=’ele’ v=’0’/>
</node>
<node id=3 version='1' lat='49.00542180052' lon='8.41564400223'>
<tag k=’ele’ v=’0’/>
</node>
<node id=4 version='1' lat='49.00541994701' lon='8.41564400223'>
<tag k=’ele’ v=’0’/>
</node>
<node id=5 version='1' lat='49.00542180052' lon='8.41564400223'>
<tag k=’ele’ v=’0’/>
</node>
<node id=6 version='1' lat='49.00541994701' lon='8.41564400223'>
<tag k=’ele’ v=’0’/>
</node>
<way id=11 version='1'>
<nd ref=1 />
<nd ref=2 />
<nd ref=3 />
<nd ref=4 />
<nd ref=1 />
<tag k='type' v=’detection_area’ />
<tag k='area' v=’yes’ />
</way>
<way id=12 version="1">
<nd ref=5 />
<nd ref=6 />
<tag k='type' v=stop_line’ />
</way>
<relation id="13">
<tag k="type" v="regulatory_element"/>
<tag k="subtype" v="detection_area"/>
<member type="way" ref="11" role="refers"/>
<member type="way" ref="12" role="ref_line"/>
</relation>
```

## Road Marking

This regulatory element specifies related road markings to a lanelet as shown below.

\* Note that the stopline in the image is for stoplines that are for reference, and normal stoplines should be expressed using TrafficSign regulatory element.

refers: linestring with type attribute. Type explains what road marking it represents (e.g. stopline).

![Road marking](road_mark.png)
Loading