Skip to content

Commit 282a01d

Browse files
authored
feat!: replace tier4_map_msgs with autoware_map_msgs for MapProjectorInfo (#9392)
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
1 parent e511605 commit 282a01d

File tree

29 files changed

+75
-69
lines changed

29 files changed

+75
-69
lines changed

build_depends.repos

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repositories:
2424
core/autoware_msgs:
2525
type: git
2626
url: https://github.com/autowarefoundation/autoware_msgs.git
27-
version: 1.1.0
27+
version: 1.3.0
2828
core/autoware_adapi_msgs:
2929
type: git
3030
url: https://github.com/autowarefoundation/autoware_adapi_msgs.git

common/autoware_component_interface_specs/include/autoware/component_interface_specs/map.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
#include <rclcpp/qos.hpp>
1919

20-
#include <tier4_map_msgs/msg/map_projector_info.hpp>
20+
#include <autoware_map_msgs/msg/map_projector_info.hpp>
2121

2222
namespace autoware::component_interface_specs::map
2323
{
2424

2525
struct MapProjectorInfo
2626
{
27-
using Message = tier4_map_msgs::msg::MapProjectorInfo;
27+
using Message = autoware_map_msgs::msg::MapProjectorInfo;
2828
static constexpr char name[] = "/map/map_projector_info";
2929
static constexpr size_t depth = 1;
3030
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;

common/autoware_component_interface_specs/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<buildtool_depend>autoware_cmake</buildtool_depend>
1313

1414
<depend>autoware_adapi_v1_msgs</depend>
15+
<depend>autoware_map_msgs</depend>
1516
<depend>autoware_perception_msgs</depend>
1617
<depend>autoware_planning_msgs</depend>
1718
<depend>autoware_vehicle_msgs</depend>
@@ -21,7 +22,6 @@
2122
<depend>rosidl_runtime_cpp</depend>
2223
<depend>tier4_control_msgs</depend>
2324
<depend>tier4_localization_msgs</depend>
24-
<depend>tier4_map_msgs</depend>
2525
<depend>tier4_planning_msgs</depend>
2626
<depend>tier4_system_msgs</depend>
2727
<depend>tier4_vehicle_msgs</depend>

common/autoware_geography_utils/include/autoware/geography_utils/lanelet2_projector.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
#ifndef AUTOWARE__GEOGRAPHY_UTILS__LANELET2_PROJECTOR_HPP_
1616
#define AUTOWARE__GEOGRAPHY_UTILS__LANELET2_PROJECTOR_HPP_
1717

18-
#include <tier4_map_msgs/msg/map_projector_info.hpp>
18+
#include <autoware_map_msgs/msg/map_projector_info.hpp>
1919

2020
#include <lanelet2_io/Projection.h>
2121

2222
#include <memory>
2323

2424
namespace autoware::geography_utils
2525
{
26-
using MapProjectorInfo = tier4_map_msgs::msg::MapProjectorInfo;
26+
using MapProjectorInfo = autoware_map_msgs::msg::MapProjectorInfo;
2727

2828
std::unique_ptr<lanelet::Projector> get_lanelet2_projector(const MapProjectorInfo & projector_info);
2929

common/autoware_geography_utils/include/autoware/geography_utils/projection.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
#ifndef AUTOWARE__GEOGRAPHY_UTILS__PROJECTION_HPP_
1616
#define AUTOWARE__GEOGRAPHY_UTILS__PROJECTION_HPP_
1717

18+
#include <autoware_map_msgs/msg/map_projector_info.hpp>
1819
#include <geographic_msgs/msg/geo_point.hpp>
1920
#include <geometry_msgs/msg/point.hpp>
20-
#include <tier4_map_msgs/msg/map_projector_info.hpp>
2121

2222
namespace autoware::geography_utils
2323
{
24-
using MapProjectorInfo = tier4_map_msgs::msg::MapProjectorInfo;
24+
using MapProjectorInfo = autoware_map_msgs::msg::MapProjectorInfo;
2525
using GeoPoint = geographic_msgs::msg::GeoPoint;
2626
using LocalPoint = geometry_msgs::msg::Point;
2727

common/autoware_geography_utils/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<buildtool_depend>autoware_cmake</buildtool_depend>
1818

1919
<depend>autoware_lanelet2_extension</depend>
20+
<depend>autoware_map_msgs</depend>
2021
<depend>geographic_msgs</depend>
2122
<depend>geographiclib</depend>
2223
<depend>geometry_msgs</depend>
2324
<depend>lanelet2_io</depend>
24-
<depend>tier4_map_msgs</depend>
2525

2626
<test_depend>ament_cmake_ros</test_depend>
2727
<test_depend>ament_lint_auto</test_depend>

common/autoware_geography_utils/test/test_projection.cpp

+15-15
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ TEST(GeographyUtilsProjection, ProjectForwardToMGRS)
3434
local_point.z = 10.0;
3535

3636
// projector info
37-
tier4_map_msgs::msg::MapProjectorInfo projector_info;
38-
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
37+
autoware_map_msgs::msg::MapProjectorInfo projector_info;
38+
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
3939
projector_info.mgrs_grid = "54SUE";
40-
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
40+
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
4141

4242
// conversion
4343
const geometry_msgs::msg::Point converted_point =
@@ -63,10 +63,10 @@ TEST(GeographyUtilsProjection, ProjectReverseFromMGRS)
6363
geo_point.altitude = 10.0;
6464

6565
// projector info
66-
tier4_map_msgs::msg::MapProjectorInfo projector_info;
67-
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
66+
autoware_map_msgs::msg::MapProjectorInfo projector_info;
67+
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
6868
projector_info.mgrs_grid = "54SUE";
69-
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
69+
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
7070

7171
// conversion
7272
const geographic_msgs::msg::GeoPoint converted_point =
@@ -86,10 +86,10 @@ TEST(GeographyUtilsProjection, ProjectForwardAndReverseMGRS)
8686
geo_point.altitude = 10.0;
8787

8888
// projector info
89-
tier4_map_msgs::msg::MapProjectorInfo projector_info;
90-
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
89+
autoware_map_msgs::msg::MapProjectorInfo projector_info;
90+
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
9191
projector_info.mgrs_grid = "54SUE";
92-
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
92+
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
9393

9494
// conversion
9595
const geometry_msgs::msg::Point converted_local_point =
@@ -117,9 +117,9 @@ TEST(GeographyUtilsProjection, ProjectForwardToLocalCartesianUTMOrigin)
117117
local_point.z = 20.0;
118118

119119
// projector info
120-
tier4_map_msgs::msg::MapProjectorInfo projector_info;
121-
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
122-
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
120+
autoware_map_msgs::msg::MapProjectorInfo projector_info;
121+
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
122+
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
123123
projector_info.map_origin.latitude = 35.62426;
124124
projector_info.map_origin.longitude = 139.74252;
125125
projector_info.map_origin.altitude = -10.0;
@@ -142,9 +142,9 @@ TEST(GeographyUtilsProjection, ProjectForwardAndReverseLocalCartesianUTMOrigin)
142142
geo_point.altitude = 10.0;
143143

144144
// projector info
145-
tier4_map_msgs::msg::MapProjectorInfo projector_info;
146-
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
147-
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
145+
autoware_map_msgs::msg::MapProjectorInfo projector_info;
146+
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
147+
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
148148
projector_info.map_origin.latitude = 35.0;
149149
projector_info.map_origin.longitude = 139.0;
150150
projector_info.map_origin.altitude = 0.0;

localization/autoware_geo_pose_projector/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This node is a simple node that subscribes to the geo-referenced pose topic and
99
| Name | Type | Description |
1010
| ------------------------- | ---------------------------------------------------- | ------------------- |
1111
| `input_geo_pose` | `geographic_msgs::msg::GeoPoseWithCovarianceStamped` | geo-referenced pose |
12-
| `/map/map_projector_info` | `tier4_map_msgs::msg::MapProjectedObjectInfo` | map projector info |
12+
| `/map/map_projector_info` | `autoware_map_msgs::msg::MapProjectedObjectInfo` | map projector info |
1313

1414
## Published Topics
1515

map/autoware_lanelet2_map_visualizer/package.xml

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<depend>autoware_map_msgs</depend>
2525
<depend>rclcpp</depend>
2626
<depend>rclcpp_components</depend>
27-
<depend>tier4_map_msgs</depend>
2827
<depend>visualization_msgs</depend>
2928

3029
<test_depend>ament_lint_auto</test_depend>

map/autoware_map_loader/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ Please see [the description of `GetSelectedPointCloudMap.srv`](https://github.co
132132

133133
lanelet2_map_loader loads Lanelet2 file and publishes the map data as autoware_map_msgs/LaneletMapBin message.
134134
The node projects lan/lon coordinates into arbitrary coordinates defined in `/map/map_projector_info` from `map_projection_loader`.
135-
Please see [tier4_autoware_msgs/msg/MapProjectorInfo.msg](https://github.com/tier4/tier4_autoware_msgs/blob/tier4/universe/tier4_map_msgs/msg/MapProjectorInfo.msg) for supported projector types.
135+
Please see [autoware_map_msgs/msg/MapProjectorInfo.msg](https://github.com/autowarefoundation/autoware_msgs/blob/main/autoware_map_msgs/msg/MapProjectorInfo.msg) for supported projector types.
136136

137137
### How to run
138138

139139
`ros2 run autoware_map_loader lanelet2_map_loader --ros-args -p lanelet2_map_path:=path/to/map.osm`
140140

141141
### Subscribed Topics
142142

143-
- ~input/map_projector_info (tier4_map_msgs/MapProjectorInfo) : Projection type for Autoware
143+
- ~input/map_projector_info (autoware_map_msgs/MapProjectorInfo) : Projection type for Autoware
144144

145145
### Published Topics
146146

map/autoware_map_loader/include/autoware/map_loader/lanelet2_map_loader_node.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <rclcpp/rclcpp.hpp>
2222

2323
#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
24-
#include <tier4_map_msgs/msg/map_projector_info.hpp>
24+
#include <autoware_map_msgs/msg/map_projector_info.hpp>
2525

2626
#include <lanelet2_projection/UTM.h>
2727

@@ -40,7 +40,7 @@ class Lanelet2MapLoaderNode : public rclcpp::Node
4040

4141
static lanelet::LaneletMapPtr load_map(
4242
const std::string & lanelet2_filename,
43-
const tier4_map_msgs::msg::MapProjectorInfo & projector_info);
43+
const autoware_map_msgs::msg::MapProjectorInfo & projector_info);
4444
static autoware_map_msgs::msg::LaneletMapBin create_map_bin_msg(
4545
const lanelet::LaneletMapPtr map, const std::string & lanelet2_filename,
4646
const rclcpp::Time & now);

map/autoware_map_loader/package.xml

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<depend>pcl_conversions</depend>
3131
<depend>rclcpp</depend>
3232
<depend>rclcpp_components</depend>
33-
<depend>tier4_map_msgs</depend>
3433
<depend>visualization_msgs</depend>
3534
<depend>yaml-cpp</depend>
3635

map/autoware_map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
namespace autoware::map_loader
5656
{
5757
using autoware_map_msgs::msg::LaneletMapBin;
58-
using tier4_map_msgs::msg::MapProjectorInfo;
58+
using autoware_map_msgs::msg::MapProjectorInfo;
5959

6060
Lanelet2MapLoaderNode::Lanelet2MapLoaderNode(const rclcpp::NodeOptions & options)
6161
: Node("lanelet2_map_loader", options)
@@ -136,10 +136,10 @@ void Lanelet2MapLoaderNode::on_map_projector_info(
136136

137137
lanelet::LaneletMapPtr Lanelet2MapLoaderNode::load_map(
138138
const std::string & lanelet2_filename,
139-
const tier4_map_msgs::msg::MapProjectorInfo & projector_info)
139+
const autoware_map_msgs::msg::MapProjectorInfo & projector_info)
140140
{
141141
lanelet::ErrorMessages errors{};
142-
if (projector_info.projector_type != tier4_map_msgs::msg::MapProjectorInfo::LOCAL) {
142+
if (projector_info.projector_type != autoware_map_msgs::msg::MapProjectorInfo::LOCAL) {
143143
std::unique_ptr<lanelet::Projector> projector =
144144
autoware::geography_utils::get_lanelet2_projector(projector_info);
145145
lanelet::LaneletMapPtr map = lanelet::load(lanelet2_filename, *projector, &errors);

map/autoware_map_projection_loader/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There are three types of transformations from latitude and longitude to XYZ coor
2929

3030
```yaml
3131
# map_projector_info.yaml
32-
projector_type: local
32+
projector_type: Local
3333
```
3434
3535
#### Limitation
@@ -86,7 +86,7 @@ map_origin:
8686
8787
## Published Topics
8888
89-
- `~/map_projector_info` (tier4_map_msgs/MapProjectorInfo) : This topic shows the definition of map projector information
89+
- `~/map_projector_info` (autoware_map_msgs/MapProjectorInfo) : This topic shows the definition of map projector information
9090

9191
## Parameters
9292

map/autoware_map_projection_loader/include/autoware/map_projection_loader/load_info_from_lanelet2_map.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
#include <autoware_lanelet2_extension/utility/message_conversion.hpp>
2121
#include <autoware_lanelet2_extension/utility/utilities.hpp>
2222

23-
#include "tier4_map_msgs/msg/map_projector_info.hpp"
23+
#include "autoware_map_msgs/msg/map_projector_info.hpp"
2424

2525
#include <string>
2626

2727
namespace autoware::map_projection_loader
2828
{
29-
tier4_map_msgs::msg::MapProjectorInfo load_info_from_lanelet2_map(const std::string & filename);
29+
autoware_map_msgs::msg::MapProjectorInfo load_info_from_lanelet2_map(const std::string & filename);
3030
} // namespace autoware::map_projection_loader
3131

3232
#endif // AUTOWARE__MAP_PROJECTION_LOADER__LOAD_INFO_FROM_LANELET2_MAP_HPP_

map/autoware_map_projection_loader/include/autoware/map_projection_loader/map_projection_loader.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
namespace autoware::map_projection_loader
2626
{
27-
tier4_map_msgs::msg::MapProjectorInfo load_info_from_yaml(const std::string & filename);
28-
tier4_map_msgs::msg::MapProjectorInfo load_map_projector_info(
27+
autoware_map_msgs::msg::MapProjectorInfo load_info_from_yaml(const std::string & filename);
28+
autoware_map_msgs::msg::MapProjectorInfo load_map_projector_info(
2929
const std::string & yaml_filename, const std::string & lanelet2_map_filename);
3030

3131
class MapProjectionLoader : public rclcpp::Node

map/autoware_map_projection_loader/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
<depend>autoware_component_interface_specs</depend>
2020
<depend>autoware_component_interface_utils</depend>
2121
<depend>autoware_lanelet2_extension</depend>
22+
<depend>autoware_map_msgs</depend>
2223
<depend>rclcpp</depend>
2324
<depend>rclcpp_components</depend>
24-
<depend>tier4_map_msgs</depend>
2525
<depend>yaml-cpp</depend>
2626

2727
<test_depend>ament_cmake_gmock</test_depend>

map/autoware_map_projection_loader/src/load_info_from_lanelet2_map.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "autoware/map_projection_loader/load_info_from_lanelet2_map.hpp"
1616

17-
#include "tier4_map_msgs/msg/map_projector_info.hpp"
17+
#include "autoware_map_msgs/msg/map_projector_info.hpp"
1818

1919
#include <lanelet2_core/LaneletMap.h>
2020
#include <lanelet2_core/geometry/LineString.h>
@@ -25,7 +25,7 @@
2525

2626
namespace autoware::map_projection_loader
2727
{
28-
tier4_map_msgs::msg::MapProjectorInfo load_info_from_lanelet2_map(const std::string & filename)
28+
autoware_map_msgs::msg::MapProjectorInfo load_info_from_lanelet2_map(const std::string & filename)
2929
{
3030
lanelet::ErrorMessages errors{};
3131
lanelet::projection::MGRSProjector projector{};
@@ -46,18 +46,18 @@ tier4_map_msgs::msg::MapProjectorInfo load_info_from_lanelet2_map(const std::str
4646
}
4747
}
4848

49-
tier4_map_msgs::msg::MapProjectorInfo msg;
49+
autoware_map_msgs::msg::MapProjectorInfo msg;
5050
if (is_local) {
51-
msg.projector_type = tier4_map_msgs::msg::MapProjectorInfo::LOCAL;
51+
msg.projector_type = autoware_map_msgs::msg::MapProjectorInfo::LOCAL;
5252
} else {
53-
msg.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
53+
msg.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
5454
msg.mgrs_grid = projector.getProjectedMGRSGrid();
5555
}
5656

5757
// We assume that the vertical datum of the map is WGS84 when using lanelet2 map.
5858
// However, do note that this is not always true, and may cause problems in the future.
5959
// Thus, please consider using the map_projector_info.yaml instead of this deprecated function.
60-
msg.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
60+
msg.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
6161
return msg;
6262
}
6363
} // namespace autoware::map_projection_loader

0 commit comments

Comments
 (0)