Skip to content

Commit 23b81e6

Browse files
authoredNov 2, 2023
docs: update LIO-SAM and vector map documentation (#465)
* init LIO-SAM Signed-off-by: ismetatabay <ismet@leodrive.ai> * init UTM to MGRS converter Signed-off-by: ismetatabay <ismet@leodrive.ai> * init downsampling Signed-off-by: ismetatabay <ismet@leodrive.ai> * init Vector map Signed-off-by: ismetatabay <ismet@leodrive.ai> * add lanelet page Signed-off-by: ismetatabay <ismet@leodrive.ai> * docs: update lio-sam (#2) Signed-off-by: ismetatabay <ismet@leodrive.ai> * init crosswalk Signed-off-by: ismetatabay <ismet@leodrive.ai> * init stop line Signed-off-by: ismetatabay <ismet@leodrive.ai> * init traffic light Signed-off-by: ismetatabay <ismet@leodrive.ai> * init speed bump Signed-off-by: ismetatabay <ismet@leodrive.ai> * init detection area Signed-off-by: ismetatabay <ismet@leodrive.ai> * fix some sentences and typos Signed-off-by: ismetatabay <ismet@leodrive.ai> * add LIO-SAM link to lanelet2 documentation Signed-off-by: ismetatabay <ismet@leodrive.ai> --------- Signed-off-by: ismetatabay <ismet@leodrive.ai>
1 parent ffa8491 commit 23b81e6

File tree

33 files changed

+949
-31
lines changed

33 files changed

+949
-31
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
nav:
22
- index.md
33
- Open-source SLAM algorithms: open-source-slam
4+
- Converting UTM map to MGRS map: converting-utm-to-mgrs-map
5+
- Pointcloud map downsampling: pointcloud-map-downsampling
6+
- Creating a vector map: creating-vector-map
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nav:
2+
- index.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Converting UTM maps to MGRS map format
2+
3+
## Overview
4+
5+
If you want to use MGRS (Military Grid Reference System) format in Autoware,
6+
you need to convert UTM (Universal Transverse Mercator) map to MGRS format.
7+
In order to do that, we will use [UTM to MGRS pointcloud converter](https://github.com/leo-drive/pc_utm_to_mgrs_converter) ROS 2 package provided by Leo Drive.
8+
9+
## Installation
10+
11+
### Dependencies
12+
13+
- ROS 2
14+
- PCL-conversions
15+
- [GeographicLib](https://geographiclib.sourceforge.io/C++/doc/install.html)
16+
17+
To install dependencies:
18+
19+
```bash
20+
sudo apt install ros-humble-pcl-conversions \
21+
geographiclib-tools
22+
```
23+
24+
### Building
25+
26+
```bash
27+
cd <PATH-TO-YOUR-ROS-2-WORKSPACE>/src
28+
git clone https://github.com/leo-drive/pc_utm_to_mgrs_converter.git
29+
cd ..
30+
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
31+
```
32+
33+
### Usage
34+
35+
After the installation of converter tool,
36+
we need to define northing,
37+
easting and ellipsoid height of local UTM map origin in `pc_utm_to_mgrs_converter.param.yaml`.
38+
For example, you can use latitude,
39+
longitude and altitude values in the navsatfix message from your GNSS/INS sensor.
40+
41+
??? note "Sample ROS 2 topic echo from navsatfix message"
42+
43+
```sh
44+
header:
45+
stamp:
46+
sec: 1694612439
47+
nanosec: 400000000
48+
frame_id: GNSS_INS/gnss_ins_link
49+
status:
50+
status: 0
51+
service: 1
52+
latitude: 41.0216110801253
53+
longitude: 28.887096461148346
54+
altitude: 74.28264078891529
55+
position_covariance:
56+
- 0.0014575386885553598
57+
- 0.0
58+
- 0.0
59+
- 0.0
60+
- 0.004014162812381983
61+
- 0.0
62+
- 0.0
63+
- 0.0
64+
- 0.0039727711118757725
65+
position_covariance_type: 2
66+
```
67+
68+
After that, you need to convert latitude and longitude values to northing and easting values.
69+
You can use any converter on the internet for converting latitude longitude values to UTM.
70+
(i.e., [UTMconverter](https://www.latlong.net/lat-long-utm.html))
71+
72+
Now, we are ready to update `pc_utm_to_mgrs_converter.param.yaml`,
73+
example for our navsatfix message:
74+
75+
```diff
76+
/**:
77+
ros__parameters:
78+
# Northing of local origin
79+
- Northing: 4520550.0
80+
+ Northing: 4542871.33
81+
82+
# Easting of local origin
83+
- Easting: 698891.0
84+
+ Easting: 658659.84
85+
86+
# Elipsoid Height of local origin
87+
- ElipsoidHeight: 47.62
88+
+ ElipsoidHeight: 74.28
89+
```
90+
91+
Lastly, we will update input and pointcloud the map path in `pc_utm_to_mgrs_converter.launch.xml`:
92+
93+
```diff
94+
...
95+
- <arg name="input_file_path" default="/home/melike/projects/autoware_data/gebze_pospac_map/pointcloud_map.pcd"/>
96+
+ <arg name="input_file_path" default="<PATH-TO-YOUR-INPUT-PCD-MAP>"/>
97+
- <arg name="output_file_path" default="/home/melike/projects/autoware_data/gebze_pospac_map/pointcloud_map_mgrs_orto.pcd"/>
98+
+ <arg name="output_file_path" default="<PATH-TO-YOUR-OUTPUT-PCD-MAP>"/>
99+
...
100+
```
101+
102+
After the setting of the package, we will launch pc_utm_to_mgrs_converter:
103+
104+
```bash
105+
ros2 launch pc_utm_to_mgrs_converter pc_utm_to_mgrs_converter.launch.xml
106+
```
107+
108+
The conversion process will be started,
109+
you should see `Saved <YOUR-MAP-POINTS-SIZE> data points saved to <YOUR-OUTPUT-MAP-PATH>` message on your terminal.
110+
MGRS format pointcloud map should be saved on your output map directory.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
nav:
2+
- index.md
3+
- Lanelet2: lanelet2
4+
- Crosswalk: crosswalk
5+
- Stop line: stop-line
6+
- Traffic light: traffic-light
7+
- Speed bump: speed-bump
8+
- Detection area: detection-area
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nav:
2+
- index.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Crosswalk attribute
2+
3+
Behavior velocity planner's [crosswalk module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_crosswalk_module/) plans velocity
4+
to stop or decelerate for pedestrians approaching or walking on a crosswalk.
5+
In order to operate that, we will add crosswalk attribute to our lanelet2 map.
6+
7+
## Creating a crosswalk attribute
8+
9+
In order to create a crosswalk on your map, please follow these steps:
10+
11+
1. Click `Abstraction` button on top panel.
12+
2. Select `Crosswalk` from the panel.
13+
3. Click and draw crosswalk on your pointcloud map.
14+
15+
You can see these steps in the crosswalk creating demonstration video:
16+
17+
![type:video](https://youtube.com/embed/J6WrL8dkFhI)
18+
19+
### Testing created crosswalk with planning simulator
20+
21+
After the completing of creating the map, we need to save it.
22+
To that please click `File` --> `Export Lanelet2Maps` then download.
23+
24+
After the download is finished,
25+
we need to put lanelet2 map and pointcloud map on the same location.
26+
The directory structure should be like this:
27+
28+
```diff
29+
+ <YOUR-MAP-DIRECTORY>/
30+
+ ├─ pointcloud_map.pcd
31+
+ └─ lanelet2_map.osm
32+
```
33+
34+
If your .osm or .pcd map file's name is different from these names,
35+
you need to update autoware.launch.xml:
36+
37+
```diff
38+
<!-- Map -->
39+
- <arg name="lanelet2_map_file" default="lanelet2_map.osm" description="lanelet2 map file name"/>
40+
+ <arg name="lanelet2_map_file" default="<YOUR-LANELET-MAP-NAME>.osm" description="lanelet2 map file name"/>
41+
- <arg name="pointcloud_map_file" default="pointcloud_map.pcd" description="pointcloud map file name"/>
42+
+ <arg name="pointcloud_map_file" default="<YOUR-POINTCLOUD-MAP-NAME>.pcd" description="pointcloud map file name"/>
43+
```
44+
45+
Now we are ready to launch the planning simulator:
46+
47+
```bash
48+
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=<YOUR-MAP-FOLDER-DIR> vehicle_model:=<YOUR-VEHICLE-MODEL> sensor_model:=<YOUR-SENSOR-KIT>
49+
```
50+
51+
Example for tutorial_vehicle:
52+
53+
```bash
54+
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/Files/autoware_map/tutorial_map/ vehicle_model:=tutorial_vehicle sensor_model:=tutorial_vehicle_sensor_kit vehicle_id:=tutorial_vehicle
55+
```
56+
57+
1. Click `2D Pose Estimate` button on rviz or press `P` and give a pose for initialization.
58+
2. Click `2D Goal Pose` button on rviz or press `G` and give a pose for goal point.
59+
3. We need to add pedestrians to crosswalk, so activate interactive pedestrians from `Tool Properties` panel on rviz.
60+
4. After that, please press `Shift`, then click right click button for inserting pedestrians.
61+
5. You can control inserted pedestrian via dragging right click.
62+
63+
Crosswalk markers on rviz:
64+
65+
<figure markdown>
66+
![crosswalk-test](images/crosswalk-test.png){ align=center }
67+
<figcaption>
68+
Crosswalk test on the created map.
69+
</figcaption>
70+
</figure>
71+
72+
You can check your crosswalk elements in the planning simulator as this demonstration video:
73+
74+
![type:video](https://youtube.com/embed/hhwBku_1qmA)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nav:
2+
- index.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Detection area element
2+
3+
Behavior velocity planner's [detection area](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_detection_area_module/) plans velocity
4+
when if pointcloud is detected in a detection area defined on a map, the stop planning will be executed at the predetermined point.
5+
In order to operate that, we will add a detection area element to our lanelet2 map.
6+
7+
## Creating a detection area element
8+
9+
In order to create a detection area on your map, please follow these steps:
10+
11+
1. Click `Lanelet2Maps` button on top panel.
12+
2. Select `Detection Area` from the panel.
13+
3. Please select lanelet which stop line to be added.
14+
4. Click and insert `Detection Area` on your pointcloud map.
15+
5. You can change the dimensions of the detection area with clicking points on the corners of the detection area. For more information, you can check the demonstration video.
16+
17+
You can see these steps in the detection area creating demonstration video:
18+
19+
![type:video](https://youtube.com/embed/RUJvXok-ncQ)
20+
21+
### Testing created detection area with planning simulator
22+
23+
After the completing of creating the map, we need to save it.
24+
To that please click `File` --> `Export Lanelet2Maps` then download.
25+
26+
After the download is finished,
27+
we need to put lanelet2 map and pointcloud map on the same location.
28+
The directory structure should be like this:
29+
30+
```diff
31+
+ <YOUR-MAP-DIRECTORY>/
32+
+ ├─ pointcloud_map.pcd
33+
+ └─ lanelet2_map.osm
34+
```
35+
36+
If your .osm or .pcd map file's name is different from these names,
37+
you need to update autoware.launch.xml:
38+
39+
```diff
40+
<!-- Map -->
41+
- <arg name="lanelet2_map_file" default="lanelet2_map.osm" description="lanelet2 map file name"/>
42+
+ <arg name="lanelet2_map_file" default="<YOUR-LANELET-MAP-NAME>.osm" description="lanelet2 map file name"/>
43+
- <arg name="pointcloud_map_file" default="pointcloud_map.pcd" description="pointcloud map file name"/>
44+
+ <arg name="pointcloud_map_file" default="<YOUR-POINTCLOUD-MAP-NAME>.pcd" description="pointcloud map file name"/>
45+
```
46+
47+
Now we are ready to launch the planning simulator:
48+
49+
```bash
50+
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=<YOUR-MAP-FOLDER-DIR> vehicle_model:=<YOUR-VEHICLE-MODEL> sensor_model:=<YOUR-SENSOR-KIT>
51+
```
52+
53+
Example for tutorial_vehicle:
54+
55+
```bash
56+
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/Files/autoware_map/tutorial_map/ vehicle_model:=tutorial_vehicle sensor_model:=tutorial_vehicle_sensor_kit vehicle_id:=tutorial_vehicle
57+
```
58+
59+
1. Click `2D Pose Estimate` button on rviz or press `P` and give a pose for initialization.
60+
2. Click `2D Goal Pose` button on rviz or press `G` and give a pose for goal point.
61+
3. We need to add pedestrians to detection area, so activate interactive pedestrians from `Tool Properties` panel on rviz.
62+
4. After that, please press `Shift`, then click right click button for inserting pedestrians.
63+
5. You can control inserted pedestrian via dragging right click. So, you should put pedestrian on the detection area for testing.
64+
65+
Stop detection area on rviz:
66+
67+
<figure markdown>
68+
![detection-area-test](images/detection-area-test.png){ align=center }
69+
<figcaption>
70+
Detection area test on the created map.
71+
</figcaption>
72+
</figure>
73+
74+
You can check your detection area elements in the planning simulator as this demonstration video:
75+
76+
![type:video](https://youtube.com/embed/zjfPnRIz8Xk)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Creating a vector map
2+
3+
## Overview
4+
5+
In this section, we will explain how to create Lanelet2 maps with TIER IV's [Vector Map Builder tool](https://tools.tier4.jp/feature/vector_map_builder_ll2/).
6+
7+
There are alternative tools such as
8+
Unity-based app [MapToolbox](https://github.com/autocore-ai/MapToolbox) and
9+
Java-based app [JOSM](https://josm.openstreetmap.de/) that you may use for creating a Lanelet2 map.
10+
We will be using TIER IV's Vector Map Builder in the tutorial
11+
since it works on a browser without installation of extra dependency applications.
12+
13+
## Vector Map Builder
14+
15+
You need a TIER IV account for using Vector Map Builder tool.
16+
If it is the first time to use the tool,
17+
[create a TIER IV account](https://docs.web.auto/en/user-manuals/tier-iv-account/quick-start)
18+
in order to use [Vector Map Builder tool](https://tools.tier4.jp/feature/vector_map_builder_ll2/).
19+
For more information about this tool,
20+
please check the [official guide](https://docs.web.auto/en/user-manuals/vector-map-builder/introduction).
21+
22+
You can follow these pages for creating a Lanelet2 map and understanding its regulatory elements.
23+
24+
- [Lanelet2](./lanelet2)
25+
- [Crosswalk](./crosswalk)
26+
- [Stop Line](./stop-line)
27+
- [Traffic Light](./traffic-light)
28+
- [Speed Bump](./speed-bump)
29+
- [Detection Area](./detection-area)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nav:
2+
- index.md

0 commit comments

Comments
 (0)
Please sign in to comment.