Skip to content

Commit

Permalink
refactor(autoware_iv_external_api_adaptor): update component_interfac…
Browse files Browse the repository at this point in the history
…e_specs dependency (#126)

* refactor(autoware_iv_external_api_adaptor): update component_interface_specs dependency

Signed-off-by: Esteve Fernandez <[email protected]>

* shorten namespaces

Signed-off-by: Esteve Fernandez <[email protected]>

* update includes

Signed-off-by: Esteve Fernandez <[email protected]>

---------

Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve authored Oct 29, 2024
1 parent 5effcb8 commit 3de19bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion autoware_iv_external_api_adaptor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_ad_api_specs</depend>
<depend>autoware_component_interface_specs</depend>
<depend>autoware_control_msgs</depend>
<depend>autoware_external_api_msgs</depend>
<depend>autoware_system_msgs</depend>
<depend>autoware_vehicle_msgs</depend>
<depend>component_interface_specs</depend>
<depend>component_interface_utils</depend>
<depend>nlohmann-json-dev</depend>
<depend>rclcpp</depend>
Expand Down
12 changes: 8 additions & 4 deletions autoware_iv_external_api_adaptor/src/initial_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ void InitialPose::setInitializePose(
const tier4_external_api_msgs::srv::InitializePose::Request::SharedPtr request,
const tier4_external_api_msgs::srv::InitializePose::Response::SharedPtr response)
{
const auto req = std::make_shared<localization_interface::Initialize::Service::Request>();
req->method = localization_interface::Initialize::Service::Request::AUTO;
const auto req = std::make_shared<
autoware::component_interface_specs::localization::Initialize::Service::Request>();
req->method =
autoware::component_interface_specs::localization::Initialize::Service::Request::AUTO;
req->pose_with_covariance.push_back(request->pose);
req->pose_with_covariance.back().pose.covariance = particle_covariance;

Expand All @@ -77,8 +79,10 @@ void InitialPose::setInitializePoseAuto(
const tier4_external_api_msgs::srv::InitializePoseAuto::Request::SharedPtr,
const tier4_external_api_msgs::srv::InitializePoseAuto::Response::SharedPtr response)
{
const auto req = std::make_shared<localization_interface::Initialize::Service::Request>();
req->method = localization_interface::Initialize::Service::Request::AUTO;
const auto req = std::make_shared<
autoware::component_interface_specs::localization::Initialize::Service::Request>();
req->method =
autoware::component_interface_specs::localization::Initialize::Service::Request::AUTO;

try {
const auto res = cli_localization_initialize_->call(req, initial_pose_timeout);
Expand Down
6 changes: 3 additions & 3 deletions autoware_iv_external_api_adaptor/src/initial_pose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef INITIAL_POSE_HPP_
#define INITIAL_POSE_HPP_

#include <component_interface_specs/localization.hpp>
#include <autoware/component_interface_specs/localization.hpp>
#include <component_interface_utils/rclcpp.hpp>
#include <rclcpp/rclcpp.hpp>
#include <tier4_api_utils/tier4_api_utils.hpp>
Expand All @@ -39,8 +39,8 @@ class InitialPose : public rclcpp::Node
rclcpp::CallbackGroup::SharedPtr group_;
tier4_api_utils::Service<InitializePose>::SharedPtr srv_set_initialize_pose_;
tier4_api_utils::Service<InitializePoseAuto>::SharedPtr srv_set_initialize_pose_auto_;
component_interface_utils::Client<localization_interface::Initialize>::SharedPtr
cli_localization_initialize_;
component_interface_utils::Client<autoware::component_interface_specs::localization::Initialize>::
SharedPtr cli_localization_initialize_;

// ros callback
void setInitializePose(
Expand Down

0 comments on commit 3de19bc

Please sign in to comment.