Skip to content

Commit

Permalink
feat(autoware_geography_utils)!: replace dependency from tier4_map_ms…
Browse files Browse the repository at this point in the history
…gs to autoware_map_msgs

Signed-off-by: Ryohsuke Mitsudome <[email protected]>
  • Loading branch information
mitsudome-r committed Nov 14, 2024
1 parent 8577b9c commit c9e8804
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#ifndef AUTOWARE__GEOGRAPHY_UTILS__LANELET2_PROJECTOR_HPP_
#define AUTOWARE__GEOGRAPHY_UTILS__LANELET2_PROJECTOR_HPP_

#include <tier4_map_msgs/msg/map_projector_info.hpp>
#include <autoware_map_msgs/msg/map_projector_info.hpp>

#include <lanelet2_io/Projection.h>

#include <memory>

namespace autoware::geography_utils
{
using MapProjectorInfo = tier4_map_msgs::msg::MapProjectorInfo;
using MapProjectorInfo = autoware_map_msgs::msg::MapProjectorInfo;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

#include <geographic_msgs/msg/geo_point.hpp>
#include <geometry_msgs/msg/point.hpp>
#include <tier4_map_msgs/msg/map_projector_info.hpp>
#include <autoware_map_msgs/msg/map_projector_info.hpp>

namespace autoware::geography_utils
{
using MapProjectorInfo = tier4_map_msgs::msg::MapProjectorInfo;
using MapProjectorInfo = autoware_map_msgs::msg::MapProjectorInfo;
using GeoPoint = geographic_msgs::msg::GeoPoint;
using LocalPoint = geometry_msgs::msg::Point;

Expand Down
2 changes: 1 addition & 1 deletion autoware_geography_utils/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<depend>geographiclib</depend>
<depend>geometry_msgs</depend>
<depend>lanelet2_io</depend>
<depend>tier4_map_msgs</depend>
<depend>autoware_map_msgs</depend>

<test_depend>ament_cmake_ros</test_depend>
<test_depend>ament_lint_auto</test_depend>
Expand Down
30 changes: 15 additions & 15 deletions autoware_geography_utils/test/test_projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ TEST(GeographyUtilsProjection, ProjectForwardToMGRS)
local_point.z = 10.0;

// projector info
tier4_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
autoware_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
projector_info.mgrs_grid = "54SUE";
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;

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

// projector info
tier4_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
autoware_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
projector_info.mgrs_grid = "54SUE";
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;

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

// projector info
tier4_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::MGRS;
autoware_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::MGRS;
projector_info.mgrs_grid = "54SUE";
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;

// conversion
const geometry_msgs::msg::Point converted_local_point =
Expand Down Expand Up @@ -117,9 +117,9 @@ TEST(GeographyUtilsProjection, ProjectForwardToLocalCartesianUTMOrigin)
local_point.z = 20.0;

// projector info
tier4_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
autoware_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
projector_info.map_origin.latitude = 35.62426;
projector_info.map_origin.longitude = 139.74252;
projector_info.map_origin.altitude = -10.0;
Expand All @@ -142,9 +142,9 @@ TEST(GeographyUtilsProjection, ProjectForwardAndReverseLocalCartesianUTMOrigin)
geo_point.altitude = 10.0;

// projector info
tier4_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = tier4_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
projector_info.vertical_datum = tier4_map_msgs::msg::MapProjectorInfo::WGS84;
autoware_map_msgs::msg::MapProjectorInfo projector_info;
projector_info.projector_type = autoware_map_msgs::msg::MapProjectorInfo::LOCAL_CARTESIAN_UTM;
projector_info.vertical_datum = autoware_map_msgs::msg::MapProjectorInfo::WGS84;
projector_info.map_origin.latitude = 35.0;
projector_info.map_origin.longitude = 139.0;
projector_info.map_origin.altitude = 0.0;
Expand Down

0 comments on commit c9e8804

Please sign in to comment.