Skip to content

Commit

Permalink
fix: namespace
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed Nov 12, 2024
1 parent b26daa2 commit d130eab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions autoware_iv_external_api_adaptor/src/route.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void Route::setRoute(
}

try {
const auto req = std::make_shared<autoware_adapi::routing::SetRoute::Service::Request>();
const auto req = std::make_shared<autoware::adapi_specs::routing::SetRoute::Service::Request>();
*req = converter::convert(*request);
const auto res = cli_set_route_->call(req);
response->status = converter::convert(res->status);
Expand All @@ -76,15 +76,16 @@ void Route::clearRoute(
const tier4_external_api_msgs::srv::ClearRoute::Response::SharedPtr response)
{
try {
const auto req = std::make_shared<autoware_adapi::routing::ClearRoute::Service::Request>();
const auto req =
std::make_shared<autoware::adapi_specs::routing::ClearRoute::Service::Request>();
const auto res = cli_clear_route_->call(req);
response->status = converter::convert(res->status);
} catch (const autoware::component_interface_utils::ServiceException & error) {
response->status = tier4_api_utils::response_error(error.what());
}
}

void Route::onRoute(const autoware_adapi::routing::Route::Message::ConstSharedPtr message)
void Route::onRoute(const autoware::adapi_specs::routing::Route::Message::ConstSharedPtr message)
{
if (!message->data.empty()) {
pub_get_route_->publish(converter::convert(*message));
Expand Down
10 changes: 5 additions & 5 deletions autoware_iv_external_api_adaptor/src/route.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class Route : public rclcpp::Node
tier4_api_utils::Service<SetRoute>::SharedPtr srv_set_route_;
tier4_api_utils::Service<ClearRoute>::SharedPtr srv_clear_route_;
rclcpp::Publisher<RouteMsg>::SharedPtr pub_get_route_;
autoware::component_interface_utils::Client<autoware_adapi::routing::ClearRoute>::SharedPtr
autoware::component_interface_utils::Client<autoware::adapi_specs::routing::ClearRoute>::SharedPtr
cli_clear_route_;
autoware::component_interface_utils::Client<autoware_adapi::routing::SetRoute>::SharedPtr
autoware::component_interface_utils::Client<autoware::adapi_specs::routing::SetRoute>::SharedPtr
cli_set_route_;
autoware::component_interface_utils::Subscription<autoware_adapi::routing::Route>::SharedPtr
sub_get_route_;
autoware::component_interface_utils::Subscription<
autoware::adapi_specs::routing::Route>::SharedPtr sub_get_route_;

// ros callback
void setRoute(
Expand All @@ -58,7 +58,7 @@ class Route : public rclcpp::Node
void clearRoute(
const tier4_external_api_msgs::srv::ClearRoute::Request::SharedPtr request,
const tier4_external_api_msgs::srv::ClearRoute::Response::SharedPtr response);
void onRoute(const autoware_adapi::routing::Route::Message::ConstSharedPtr message);
void onRoute(const autoware::adapi_specs::routing::Route::Message::ConstSharedPtr message);
};

} // namespace external_api
Expand Down

0 comments on commit d130eab

Please sign in to comment.