Skip to content

Commit

Permalink
fix(geo_pose_projector): fix -Werror=deprecated-declarations (#5599)
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored Nov 16, 2023
1 parent 2a1ad67 commit 7c66660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions localization/geo_pose_projector/src/geo_pose_projector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ GeoPoseProjector::GeoPoseProjector()

// Subscribe to geo_pose topic
geo_pose_sub_ = create_subscription<GeoPoseWithCovariance>(
"input_geo_pose", 10, [this](const GeoPoseWithCovariance::SharedPtr msg) { on_geo_pose(msg); });
"input_geo_pose", 10,
[this](const GeoPoseWithCovariance::ConstSharedPtr msg) { on_geo_pose(msg); });

// Publish pose topic
pose_pub_ = create_publisher<PoseWithCovariance>("output_pose", 10);
Expand All @@ -49,7 +50,7 @@ GeoPoseProjector::GeoPoseProjector()
}
}

void GeoPoseProjector::on_geo_pose(const GeoPoseWithCovariance::SharedPtr msg)
void GeoPoseProjector::on_geo_pose(const GeoPoseWithCovariance::ConstSharedPtr msg)
{
if (!projector_info_) {
RCLCPP_WARN_THROTTLE(
Expand Down
2 changes: 1 addition & 1 deletion localization/geo_pose_projector/src/geo_pose_projector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class GeoPoseProjector : public rclcpp::Node
GeoPoseProjector();

private:
void on_geo_pose(const GeoPoseWithCovariance::SharedPtr msg);
void on_geo_pose(const GeoPoseWithCovariance::ConstSharedPtr msg);

component_interface_utils::Subscription<MapProjectorInfo>::SharedPtr sub_map_projector_info_;
rclcpp::Subscription<GeoPoseWithCovariance>::SharedPtr geo_pose_sub_;
Expand Down

0 comments on commit 7c66660

Please sign in to comment.