Skip to content

Commit 1758df5

Browse files
sebekxSebastian ZęderowskixmfcxTaikiYamada4
authored
feat(map_loader): add support for local cartesian projection (autowarefoundation#9238)
* feat(map_loader): add support for local cartesian projection to lanelet map loader Signed-off-by: Sebastian Zęderowski <[email protected]> * feat(map_loader): udpate readme Signed-off-by: Sebastian Zęderowski <[email protected]> * feat(map_loader): add support for local cartesian projection Signed-off-by: Sebastian Zęderowski <[email protected]> * bump autoware_msgs to 1.4.0 Signed-off-by: Mete Fatih Cırıt <[email protected]> --------- Signed-off-by: Sebastian Zęderowski <[email protected]> Signed-off-by: Mete Fatih Cırıt <[email protected]> Co-authored-by: Sebastian Zęderowski <[email protected]> Co-authored-by: Mete Fatih Cırıt <[email protected]> Co-authored-by: TaikiYamada4 <[email protected]>
1 parent af4fcb2 commit 1758df5

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

build_depends_humble.repos

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repositories:
1919
core/autoware_msgs:
2020
type: git
2121
url: https://github.com/autowarefoundation/autoware_msgs.git
22-
version: 1.3.0
22+
version: 1.4.0
2323
core/autoware_adapi_msgs:
2424
type: git
2525
url: https://github.com/autowarefoundation/autoware_adapi_msgs.git

map/autoware_map_projection_loader/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ map_origin:
7070
altitude: 0.0 # [m]
7171
```
7272
73+
### Using LocalCartesian
74+
75+
If you want to use local cartesian WGS84, please specify the map origin as well.
76+
77+
Currently LocalCartesian can only be used in lanelet2_map_loader, packages like gnss_poser doesn't support it right now.
78+
79+
```yaml
80+
# map_projector_info.yaml
81+
projector_type: LocalCartesian
82+
vertical_datum: WGS84
83+
map_origin:
84+
latitude: 35.6762 # [deg]
85+
longitude: 139.6503 # [deg]
86+
altitude: 0.0 # [m]
87+
```
88+
7389
### Using TransverseMercator
7490
7591
If you want to use Transverse Mercator projection, please specify the map origin as well.

map/autoware_map_projection_loader/src/map_projection_loader.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ autoware_map_msgs::msg::MapProjectorInfo load_info_from_yaml(const std::string &
3939

4040
} else if (
4141
msg.projector_type == autoware_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM ||
42+
msg.projector_type == autoware_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN ||
4243
msg.projector_type == autoware_map_msgs::msg::MapProjectorInfo::TRANSVERSE_MERCATOR) {
4344
msg.vertical_datum = data["vertical_datum"].as<std::string>();
4445
msg.map_origin.latitude = data["map_origin"]["latitude"].as<double>();
@@ -59,8 +60,9 @@ autoware_map_msgs::msg::MapProjectorInfo load_info_from_yaml(const std::string &
5960
msg.projector_type = autoware_map_msgs::msg::MapProjectorInfo::LOCAL;
6061
} else {
6162
throw std::runtime_error(
62-
"Invalid map projector type. Currently supported types: MGRS, LocalCartesianUTM, "
63-
"TransverseMercator, and Local");
63+
"Invalid map projector type. Currently supported types: MGRS, LocalCartesian, "
64+
"LocalCartesianUTM, "
65+
"TransverseMercator, and local");
6466
}
6567
return msg;
6668
}

0 commit comments

Comments
 (0)