From ff0ed495e5670b9a0bc7dfdc98d81cf22daae8e4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:41:03 +0000 Subject: [PATCH] style(pre-commit): autofix --- .../component_interface_specs/control.hpp | 6 +- .../localization.hpp | 6 +- .../component_interface_specs/map.hpp | 6 +- .../component_interface_specs/perception.hpp | 6 +- .../component_interface_specs/planning.hpp | 6 +- .../component_interface_specs/system.hpp | 6 +- .../component_interface_specs/vehicle.hpp | 6 +- .../autoware_test_utils.hpp | 2 +- common/autoware_test_utils/package.xml | 2 +- .../package.xml | 2 +- .../src/node.hpp | 11 ++-- control/autoware_vehicle_cmd_gate/package.xml | 2 +- .../predicted_path_checker_node.hpp | 15 +++-- control/predicted_path_checker/package.xml | 2 +- .../predicted_path_checker_node.cpp | 6 +- .../autoware_geo_pose_projector/package.xml | 2 +- .../autoware_pose_initializer/package.xml | 2 +- .../src/pose_initializer_core.hpp | 2 +- .../package.xml | 2 +- .../map_loader/lanelet2_map_loader_node.hpp | 2 +- map/map_loader/package.xml | 2 +- .../package.xml | 2 +- sensing/autoware_gnss_poser/package.xml | 2 +- system/autoware_default_adapi/package.xml | 2 +- .../autoware_default_adapi/src/fail_safe.hpp | 2 +- .../src/localization.hpp | 2 +- system/autoware_default_adapi/src/motion.cpp | 10 +++- system/autoware_default_adapi/src/motion.hpp | 13 ++-- .../src/operation_mode.hpp | 8 ++- .../autoware_default_adapi/src/perception.cpp | 3 +- .../autoware_default_adapi/src/perception.hpp | 8 ++- .../autoware_default_adapi/src/planning.hpp | 10 ++-- system/autoware_default_adapi/src/routing.cpp | 3 +- system/autoware_default_adapi/src/routing.hpp | 17 ++++-- system/autoware_default_adapi/src/vehicle.cpp | 23 ++++--- system/autoware_default_adapi/src/vehicle.hpp | 60 ++++++++++++------- .../src/vehicle_door.cpp | 7 ++- .../src/vehicle_door.hpp | 9 ++- 38 files changed, 166 insertions(+), 111 deletions(-) diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/control.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/control.hpp index ef4ab601511de..ead0ae859c14a 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/control.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/control.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__CONTROL_HPP_ -#define COMPONENT_INTERFACE_SPECS__CONTROL_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_ #include @@ -67,4 +67,4 @@ struct IsStopped } // namespace autoware::component_interface_specs::control_interface -#endif // COMPONENT_INTERFACE_SPECS__CONTROL_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_ diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/localization.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/localization.hpp index d7e6270e8bd86..b854d4a230731 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/localization.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/localization.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_ -#define COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_ #include @@ -60,4 +60,4 @@ struct Acceleration } // namespace autoware::component_interface_specs::localization_interface -#endif // COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_ diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/map.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/map.hpp index a1bad060f65d0..58cea59338b5b 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/map.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/map.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__MAP_HPP_ -#define COMPONENT_INTERFACE_SPECS__MAP_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_ #include @@ -33,4 +33,4 @@ struct MapProjectorInfo } // namespace autoware::component_interface_specs::map_interface -#endif // COMPONENT_INTERFACE_SPECS__MAP_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_ diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/perception.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/perception.hpp index bf4be29be24c1..fe441360d4d44 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/perception.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/perception.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_ -#define COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_ #include @@ -33,4 +33,4 @@ struct ObjectRecognition } // namespace autoware::component_interface_specs::perception_interface -#endif // COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_ diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/planning.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/planning.hpp index b81f52213c06c..e4b97bda94d95 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/planning.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/planning.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__PLANNING_HPP_ -#define COMPONENT_INTERFACE_SPECS__PLANNING_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_ #include @@ -75,4 +75,4 @@ struct Trajectory } // namespace autoware::component_interface_specs::planning_interface -#endif // COMPONENT_INTERFACE_SPECS__PLANNING_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_ diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/system.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/system.hpp index 2dee7d561d15a..0274142744f2e 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/system.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/system.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_ -#define COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_ #include @@ -57,4 +57,4 @@ struct OperationModeState } // namespace autoware::component_interface_specs::system_interface -#endif // COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__SYSTEM_HPP_ diff --git a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/vehicle.hpp b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/vehicle.hpp index b47f400ad06ac..13939e5f1b86d 100644 --- a/common/autoware_component_interface_specs/include/autoware/component_interface_specs/vehicle.hpp +++ b/common/autoware_component_interface_specs/include/autoware/component_interface_specs/vehicle.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_ -#define COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_ +#ifndef AUTOWARE__COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_ +#define AUTOWARE__COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_ #include @@ -97,4 +97,4 @@ struct DoorStatus } // namespace autoware::component_interface_specs::vehicle_interface -#endif // COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_ +#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__VEHICLE_HPP_ diff --git a/common/autoware_test_utils/include/autoware_test_utils/autoware_test_utils.hpp b/common/autoware_test_utils/include/autoware_test_utils/autoware_test_utils.hpp index 73647cd957575..27bd3d9fc2d12 100644 --- a/common/autoware_test_utils/include/autoware_test_utils/autoware_test_utils.hpp +++ b/common/autoware_test_utils/include/autoware_test_utils/autoware_test_utils.hpp @@ -15,12 +15,12 @@ #ifndef AUTOWARE_TEST_UTILS__AUTOWARE_TEST_UTILS_HPP_ #define AUTOWARE_TEST_UTILS__AUTOWARE_TEST_UTILS_HPP_ +#include #include #include #include #include #include -#include #include #include diff --git a/common/autoware_test_utils/package.xml b/common/autoware_test_utils/package.xml index 8227ba518e765..40edd451f3cab 100644 --- a/common/autoware_test_utils/package.xml +++ b/common/autoware_test_utils/package.xml @@ -16,6 +16,7 @@ autoware_cmake ament_index_cpp + autoware_component_interface_specs autoware_control_msgs autoware_lanelet2_extension autoware_map_msgs @@ -23,7 +24,6 @@ autoware_planning_msgs autoware_universe_utils autoware_vehicle_msgs - autoware_component_interface_specs component_interface_utils lanelet2_io nav_msgs diff --git a/control/autoware_operation_mode_transition_manager/package.xml b/control/autoware_operation_mode_transition_manager/package.xml index 30e0883808af5..ef6c0bc8d252b 100644 --- a/control/autoware_operation_mode_transition_manager/package.xml +++ b/control/autoware_operation_mode_transition_manager/package.xml @@ -12,12 +12,12 @@ autoware_cmake rosidl_default_generators + autoware_component_interface_specs autoware_control_msgs autoware_motion_utils autoware_universe_utils autoware_vehicle_info_utils autoware_vehicle_msgs - autoware_component_interface_specs component_interface_utils geometry_msgs rclcpp diff --git a/control/autoware_operation_mode_transition_manager/src/node.hpp b/control/autoware_operation_mode_transition_manager/src/node.hpp index 930017281b062..d600bea805656 100644 --- a/control/autoware_operation_mode_transition_manager/src/node.hpp +++ b/control/autoware_operation_mode_transition_manager/src/node.hpp @@ -18,8 +18,8 @@ #include "compatibility.hpp" #include "state.hpp" -#include #include +#include #include #include @@ -35,9 +35,12 @@ class OperationModeTransitionManager : public rclcpp::Node explicit OperationModeTransitionManager(const rclcpp::NodeOptions & options); private: - using ChangeAutowareControlAPI = autoware::component_interface_specs::system_interface::ChangeAutowareControl; - using ChangeOperationModeAPI = autoware::component_interface_specs::system_interface::ChangeOperationMode; - using OperationModeStateAPI = autoware::component_interface_specs::system_interface::OperationModeState; + using ChangeAutowareControlAPI = + autoware::component_interface_specs::system_interface::ChangeAutowareControl; + using ChangeOperationModeAPI = + autoware::component_interface_specs::system_interface::ChangeOperationMode; + using OperationModeStateAPI = + autoware::component_interface_specs::system_interface::OperationModeState; component_interface_utils::Service::SharedPtr srv_autoware_control_; component_interface_utils::Service::SharedPtr srv_operation_mode_; component_interface_utils::Publisher::SharedPtr pub_operation_mode_; diff --git a/control/autoware_vehicle_cmd_gate/package.xml b/control/autoware_vehicle_cmd_gate/package.xml index aa7b7c4832136..532553da103e9 100644 --- a/control/autoware_vehicle_cmd_gate/package.xml +++ b/control/autoware_vehicle_cmd_gate/package.xml @@ -16,12 +16,12 @@ rosidl_default_generators autoware_adapi_v1_msgs + autoware_component_interface_specs autoware_control_msgs autoware_motion_utils autoware_universe_utils autoware_vehicle_info_utils autoware_vehicle_msgs - autoware_component_interface_specs component_interface_utils diagnostic_updater geometry_msgs diff --git a/control/predicted_path_checker/include/predicted_path_checker/predicted_path_checker_node.hpp b/control/predicted_path_checker/include/predicted_path_checker/predicted_path_checker_node.hpp index 558ce69574a90..973c250ff6718 100644 --- a/control/predicted_path_checker/include/predicted_path_checker/predicted_path_checker_node.hpp +++ b/control/predicted_path_checker/include/predicted_path_checker/predicted_path_checker_node.hpp @@ -15,13 +15,13 @@ #ifndef PREDICTED_PATH_CHECKER__PREDICTED_PATH_CHECKER_NODE_HPP_ #define PREDICTED_PATH_CHECKER__PREDICTED_PATH_CHECKER_NODE_HPP_ +#include #include #include #include #include #include #include -#include #include #include #include @@ -96,10 +96,12 @@ class PredictedPathCheckerNode : public rclcpp::Node sub_predicted_trajectory_; rclcpp::Subscription::SharedPtr sub_odom_; rclcpp::Subscription::SharedPtr sub_accel_; - component_interface_utils::Subscription::SharedPtr sub_stop_state_; + component_interface_utils::Subscription< + autoware::component_interface_specs::control_interface::IsStopped>::SharedPtr sub_stop_state_; // Client - component_interface_utils::Client::SharedPtr cli_set_stop_; + component_interface_utils::Client< + autoware::component_interface_specs::control_interface::SetStop>::SharedPtr cli_set_stop_; // Data Buffer geometry_msgs::msg::PoseStamped::ConstSharedPtr current_pose_; @@ -108,7 +110,8 @@ class PredictedPathCheckerNode : public rclcpp::Node PredictedObjects::ConstSharedPtr object_ptr_{nullptr}; autoware_planning_msgs::msg::Trajectory::ConstSharedPtr reference_trajectory_; autoware_planning_msgs::msg::Trajectory::ConstSharedPtr predicted_trajectory_; - autoware::component_interface_specs::control_interface::IsStopped::Message::ConstSharedPtr is_stopped_ptr_{nullptr}; + autoware::component_interface_specs::control_interface::IsStopped::Message::ConstSharedPtr + is_stopped_ptr_{nullptr}; // Core std::unique_ptr collision_checker_; @@ -126,7 +129,9 @@ class PredictedPathCheckerNode : public rclcpp::Node void onPredictedTrajectory(const autoware_planning_msgs::msg::Trajectory::SharedPtr msg); void onOdom(const nav_msgs::msg::Odometry::SharedPtr msg); void onAccel(const geometry_msgs::msg::AccelWithCovarianceStamped::SharedPtr msg); - void onIsStopped(const autoware::component_interface_specs::control_interface::IsStopped::Message::ConstSharedPtr msg); + void onIsStopped( + const autoware::component_interface_specs::control_interface::IsStopped::Message::ConstSharedPtr + msg); // Timer rclcpp::TimerBase::SharedPtr timer_; diff --git a/control/predicted_path_checker/package.xml b/control/predicted_path_checker/package.xml index d3b229e0a6daa..6bceb24c4439d 100644 --- a/control/predicted_path_checker/package.xml +++ b/control/predicted_path_checker/package.xml @@ -12,13 +12,13 @@ ament_cmake autoware_cmake + autoware_component_interface_specs autoware_motion_utils autoware_perception_msgs autoware_planning_msgs autoware_universe_utils autoware_vehicle_info_utils boost - autoware_component_interface_specs component_interface_utils diagnostic_updater eigen diff --git a/control/predicted_path_checker/src/predicted_path_checker_node/predicted_path_checker_node.cpp b/control/predicted_path_checker/src/predicted_path_checker_node/predicted_path_checker_node.cpp index 3c29ed526b965..9bd7816566cf3 100644 --- a/control/predicted_path_checker/src/predicted_path_checker_node/predicted_path_checker_node.cpp +++ b/control/predicted_path_checker/src/predicted_path_checker_node/predicted_path_checker_node.cpp @@ -132,7 +132,8 @@ void PredictedPathCheckerNode::onAccel( } void PredictedPathCheckerNode::onIsStopped( - const autoware::component_interface_specs::control_interface::IsStopped::Message::ConstSharedPtr msg) + const autoware::component_interface_specs::control_interface::IsStopped::Message::ConstSharedPtr + msg) { is_stopped_ptr_ = msg; @@ -415,7 +416,8 @@ void PredictedPathCheckerNode::checkVehicleState(diagnostic_updater::DiagnosticS void PredictedPathCheckerNode::sendRequest(bool make_stop_vehicle) { if (!is_calling_set_stop_ && cli_set_stop_->service_is_ready()) { - const auto req = std::make_shared(); + const auto req = std::make_shared< + autoware::component_interface_specs::control_interface::SetStop::Service::Request>(); req->stop = make_stop_vehicle; req->request_source = "predicted_path_checker"; is_calling_set_stop_ = true; diff --git a/localization/autoware_geo_pose_projector/package.xml b/localization/autoware_geo_pose_projector/package.xml index 72cfc200cbd24..4f02d4ff40981 100644 --- a/localization/autoware_geo_pose_projector/package.xml +++ b/localization/autoware_geo_pose_projector/package.xml @@ -17,8 +17,8 @@ ament_cmake_auto autoware_cmake - autoware_geography_utils autoware_component_interface_specs + autoware_geography_utils component_interface_utils geographic_msgs geometry_msgs diff --git a/localization/autoware_pose_initializer/package.xml b/localization/autoware_pose_initializer/package.xml index c780e33fd870c..83a961a322c6a 100644 --- a/localization/autoware_pose_initializer/package.xml +++ b/localization/autoware_pose_initializer/package.xml @@ -19,11 +19,11 @@ ament_cmake autoware_cmake + autoware_component_interface_specs autoware_localization_util autoware_map_height_fitter autoware_motion_utils autoware_universe_utils - autoware_component_interface_specs component_interface_utils geometry_msgs rclcpp diff --git a/localization/autoware_pose_initializer/src/pose_initializer_core.hpp b/localization/autoware_pose_initializer/src/pose_initializer_core.hpp index e76cc9914d500..c1adde1dcbb5b 100644 --- a/localization/autoware_pose_initializer/src/pose_initializer_core.hpp +++ b/localization/autoware_pose_initializer/src/pose_initializer_core.hpp @@ -17,8 +17,8 @@ #include "autoware/localization_util/diagnostics_module.hpp" -#include #include +#include #include #include diff --git a/map/autoware_map_projection_loader/package.xml b/map/autoware_map_projection_loader/package.xml index ede27312d87c5..d58d4191300a3 100644 --- a/map/autoware_map_projection_loader/package.xml +++ b/map/autoware_map_projection_loader/package.xml @@ -16,8 +16,8 @@ ament_cmake_auto autoware_cmake - autoware_lanelet2_extension autoware_component_interface_specs + autoware_lanelet2_extension component_interface_utils rclcpp rclcpp_components diff --git a/map/map_loader/include/map_loader/lanelet2_map_loader_node.hpp b/map/map_loader/include/map_loader/lanelet2_map_loader_node.hpp index 2aa2afb3054e0..ca1077d336ede 100644 --- a/map/map_loader/include/map_loader/lanelet2_map_loader_node.hpp +++ b/map/map_loader/include/map_loader/lanelet2_map_loader_node.hpp @@ -15,8 +15,8 @@ #ifndef MAP_LOADER__LANELET2_MAP_LOADER_NODE_HPP_ #define MAP_LOADER__LANELET2_MAP_LOADER_NODE_HPP_ -#include #include +#include #include #include diff --git a/map/map_loader/package.xml b/map/map_loader/package.xml index 676a560aad31e..6ab72f3d5f95b 100644 --- a/map/map_loader/package.xml +++ b/map/map_loader/package.xml @@ -19,10 +19,10 @@ ament_cmake_auto autoware_cmake + autoware_component_interface_specs autoware_geography_utils autoware_lanelet2_extension autoware_map_msgs - autoware_component_interface_specs component_interface_utils fmt geometry_msgs diff --git a/planning/autoware_planning_test_manager/package.xml b/planning/autoware_planning_test_manager/package.xml index 3a1c8b3f821cc..898c78391fb72 100644 --- a/planning/autoware_planning_test_manager/package.xml +++ b/planning/autoware_planning_test_manager/package.xml @@ -13,6 +13,7 @@ ament_cmake_auto autoware_cmake + autoware_component_interface_specs autoware_control_msgs autoware_lanelet2_extension autoware_map_msgs @@ -23,7 +24,6 @@ autoware_test_utils autoware_universe_utils autoware_vehicle_msgs - autoware_component_interface_specs component_interface_utils lanelet2_io nav_msgs diff --git a/sensing/autoware_gnss_poser/package.xml b/sensing/autoware_gnss_poser/package.xml index 295c51b33fa39..6565148df73cd 100644 --- a/sensing/autoware_gnss_poser/package.xml +++ b/sensing/autoware_gnss_poser/package.xml @@ -19,9 +19,9 @@ libboost-dev + autoware_component_interface_specs autoware_geography_utils autoware_sensing_msgs - autoware_component_interface_specs component_interface_utils geographic_msgs geographiclib diff --git a/system/autoware_default_adapi/package.xml b/system/autoware_default_adapi/package.xml index ad4ba4674d40c..4c9664912db40 100644 --- a/system/autoware_default_adapi/package.xml +++ b/system/autoware_default_adapi/package.xml @@ -15,13 +15,13 @@ autoware_ad_api_specs autoware_adapi_v1_msgs autoware_adapi_version_msgs + autoware_component_interface_specs autoware_geography_utils autoware_motion_utils autoware_planning_msgs autoware_system_msgs autoware_vehicle_info_utils autoware_vehicle_msgs - autoware_component_interface_specs component_interface_utils diagnostic_graph_utils geographic_msgs diff --git a/system/autoware_default_adapi/src/fail_safe.hpp b/system/autoware_default_adapi/src/fail_safe.hpp index 5bca37dd3ab76..9e7a77d944523 100644 --- a/system/autoware_default_adapi/src/fail_safe.hpp +++ b/system/autoware_default_adapi/src/fail_safe.hpp @@ -15,8 +15,8 @@ #ifndef FAIL_SAFE_HPP_ #define FAIL_SAFE_HPP_ -#include #include +#include #include #include diff --git a/system/autoware_default_adapi/src/localization.hpp b/system/autoware_default_adapi/src/localization.hpp index 2a91b31b23d8d..23f83738cf25f 100644 --- a/system/autoware_default_adapi/src/localization.hpp +++ b/system/autoware_default_adapi/src/localization.hpp @@ -15,8 +15,8 @@ #ifndef LOCALIZATION_HPP_ #define LOCALIZATION_HPP_ -#include #include +#include #include // This file should be included after messages. diff --git a/system/autoware_default_adapi/src/motion.cpp b/system/autoware_default_adapi/src/motion.cpp index 651392ec253ba..96a3d964c1d0a 100644 --- a/system/autoware_default_adapi/src/motion.cpp +++ b/system/autoware_default_adapi/src/motion.cpp @@ -121,7 +121,8 @@ void MotionNode::update_pause(const State state) void MotionNode::change_pause(bool pause) { if (!is_calling_set_pause_ && cli_set_pause_->service_is_ready()) { - const auto req = std::make_shared(); + const auto req = std::make_shared< + autoware::component_interface_specs::control_interface::SetPause::Service::Request>(); req->pause = pause; is_calling_set_pause_ = true; cli_set_pause_->async_send_request(req, [this](auto) { is_calling_set_pause_ = false; }); @@ -133,14 +134,17 @@ void MotionNode::on_timer() update_state(); } -void MotionNode::on_is_paused(const autoware::component_interface_specs::control_interface::IsPaused::Message::ConstSharedPtr msg) +void MotionNode::on_is_paused( + const autoware::component_interface_specs::control_interface::IsPaused::Message::ConstSharedPtr + msg) { is_paused_ = msg->data; update_state(); } void MotionNode::on_is_start_requested( - const autoware::component_interface_specs::control_interface::IsStartRequested::Message::ConstSharedPtr msg) + const autoware::component_interface_specs::control_interface::IsStartRequested::Message:: + ConstSharedPtr msg) { is_start_requested_ = msg->data; update_state(); diff --git a/system/autoware_default_adapi/src/motion.hpp b/system/autoware_default_adapi/src/motion.hpp index 1ac55a2e2518c..367f502e38d83 100644 --- a/system/autoware_default_adapi/src/motion.hpp +++ b/system/autoware_default_adapi/src/motion.hpp @@ -15,9 +15,9 @@ #ifndef MOTION_HPP_ #define MOTION_HPP_ +#include #include #include -#include #include #include #include @@ -41,7 +41,8 @@ class MotionNode : public rclcpp::Node Pub pub_state_; Cli cli_set_pause_; Sub sub_is_paused_; - Sub sub_is_start_requested_; + Sub + sub_is_start_requested_; enum class State { Unknown, Pausing, Paused, Starting, Resuming, Resumed, Moving }; State state_; @@ -57,9 +58,11 @@ class MotionNode : public rclcpp::Node void update_pause(const State state); void change_pause(bool pause); void on_timer(); - void on_is_paused(const autoware::component_interface_specs::control_interface::IsPaused::Message::ConstSharedPtr msg); - void on_is_start_requested( - const autoware::component_interface_specs::control_interface::IsStartRequested::Message::ConstSharedPtr msg); + void on_is_paused( + const autoware::component_interface_specs::control_interface::IsPaused::Message::ConstSharedPtr + msg); + void on_is_start_requested(const autoware::component_interface_specs::control_interface:: + IsStartRequested::Message::ConstSharedPtr msg); void on_accept( const autoware_ad_api::motion::AcceptStart::Service::Request::SharedPtr req, const autoware_ad_api::motion::AcceptStart::Service::Response::SharedPtr res); diff --git a/system/autoware_default_adapi/src/operation_mode.hpp b/system/autoware_default_adapi/src/operation_mode.hpp index fc7cd75e5f839..d6dbc68027229 100644 --- a/system/autoware_default_adapi/src/operation_mode.hpp +++ b/system/autoware_default_adapi/src/operation_mode.hpp @@ -15,8 +15,8 @@ #ifndef OPERATION_MODE_HPP_ #define OPERATION_MODE_HPP_ -#include #include +#include #include #include @@ -45,8 +45,10 @@ class OperationModeNode : public rclcpp::Node using ChangeToAutonomous = autoware_ad_api::operation_mode::ChangeToAutonomous; using ChangeToLocal = autoware_ad_api::operation_mode::ChangeToLocal; using ChangeToRemote = autoware_ad_api::operation_mode::ChangeToRemote; - using OperationModeRequest = autoware::component_interface_specs::system_interface::ChangeOperationMode::Service::Request; - using AutowareControlRequest = autoware::component_interface_specs::system_interface::ChangeAutowareControl::Service::Request; + using OperationModeRequest = + autoware::component_interface_specs::system_interface::ChangeOperationMode::Service::Request; + using AutowareControlRequest = + autoware::component_interface_specs::system_interface::ChangeAutowareControl::Service::Request; using OperationModeAvailability = tier4_system_msgs::msg::OperationModeAvailability; OperationModeState::Message curr_state_; diff --git a/system/autoware_default_adapi/src/perception.cpp b/system/autoware_default_adapi/src/perception.cpp index 210fdfabc324f..2e751d4ced2e5 100644 --- a/system/autoware_default_adapi/src/perception.cpp +++ b/system/autoware_default_adapi/src/perception.cpp @@ -50,7 +50,8 @@ uint8_t PerceptionNode::mapping( } void PerceptionNode::object_recognize( - const autoware::component_interface_specs::perception_interface::ObjectRecognition::Message::ConstSharedPtr msg) + const autoware::component_interface_specs::perception_interface::ObjectRecognition::Message:: + ConstSharedPtr msg) { DynamicObjectArray::Message objects; objects.header = msg->header; diff --git a/system/autoware_default_adapi/src/perception.hpp b/system/autoware_default_adapi/src/perception.hpp index bb76b2ac004b8..342059571a8b3 100644 --- a/system/autoware_default_adapi/src/perception.hpp +++ b/system/autoware_default_adapi/src/perception.hpp @@ -15,8 +15,8 @@ #ifndef PERCEPTION_HPP_ #define PERCEPTION_HPP_ -#include #include +#include #include #include @@ -41,8 +41,10 @@ class PerceptionNode : public rclcpp::Node private: Pub pub_object_recognized_; - Sub sub_object_recognized_; - void object_recognize(const autoware::component_interface_specs::perception_interface::ObjectRecognition::Message::ConstSharedPtr msg); + Sub + sub_object_recognized_; + void object_recognize(const autoware::component_interface_specs::perception_interface:: + ObjectRecognition::Message::ConstSharedPtr msg); uint8_t mapping( std::unordered_map hash_map, uint8_t input, uint8_t default_value); }; diff --git a/system/autoware_default_adapi/src/planning.hpp b/system/autoware_default_adapi/src/planning.hpp index 5f68a325102dd..ae70162a72205 100644 --- a/system/autoware_default_adapi/src/planning.hpp +++ b/system/autoware_default_adapi/src/planning.hpp @@ -15,10 +15,10 @@ #ifndef PLANNING_HPP_ #define PLANNING_HPP_ -#include -#include #include #include +#include +#include #include #include @@ -41,7 +41,8 @@ class PlanningNode : public rclcpp::Node Pub pub_velocity_factors_; Pub pub_steering_factors_; Sub sub_trajectory_; - Sub sub_kinematic_state_; + Sub + sub_kinematic_state_; std::vector::SharedPtr> sub_velocity_factors_; std::vector::SharedPtr> sub_steering_factors_; std::vector velocity_factors_; @@ -50,7 +51,8 @@ class PlanningNode : public rclcpp::Node using VehicleStopChecker = autoware::motion_utils::VehicleStopCheckerBase; using Trajectory = autoware::component_interface_specs::planning_interface::Trajectory::Message; - using KinematicState = autoware::component_interface_specs::localization_interface::KinematicState::Message; + using KinematicState = + autoware::component_interface_specs::localization_interface::KinematicState::Message; void on_trajectory(const Trajectory::ConstSharedPtr msg); void on_kinematic_state(const KinematicState::ConstSharedPtr msg); void on_timer(); diff --git a/system/autoware_default_adapi/src/routing.cpp b/system/autoware_default_adapi/src/routing.cpp index 6a992a5ae39f6..460cf73659890 100644 --- a/system/autoware_default_adapi/src/routing.cpp +++ b/system/autoware_default_adapi/src/routing.cpp @@ -74,7 +74,8 @@ RoutingNode::RoutingNode(const rclcpp::NodeOptions & options) : Node("routing", void RoutingNode::change_stop_mode() { - using OperationModeRequest = autoware::component_interface_specs::system_interface::ChangeOperationMode::Service::Request; + using OperationModeRequest = + autoware::component_interface_specs::system_interface::ChangeOperationMode::Service::Request; if (is_auto_mode_) { const auto req = std::make_shared(); req->mode = OperationModeRequest::STOP; diff --git a/system/autoware_default_adapi/src/routing.hpp b/system/autoware_default_adapi/src/routing.hpp index bffe92a44eea3..3eabb4b619904 100644 --- a/system/autoware_default_adapi/src/routing.hpp +++ b/system/autoware_default_adapi/src/routing.hpp @@ -15,9 +15,9 @@ #ifndef ROUTING_HPP_ #define ROUTING_HPP_ -#include #include #include +#include #include #include @@ -33,7 +33,8 @@ class RoutingNode : public rclcpp::Node explicit RoutingNode(const rclcpp::NodeOptions & options); private: - using OperationModeState = autoware::component_interface_specs::system_interface::OperationModeState; + using OperationModeState = + autoware::component_interface_specs::system_interface::OperationModeState; using State = autoware::component_interface_specs::planning_interface::RouteState; using Route = autoware::component_interface_specs::planning_interface::LaneletRoute; @@ -47,11 +48,15 @@ class RoutingNode : public rclcpp::Node Srv srv_clear_route_; Sub sub_state_; Sub sub_route_; - Cli cli_set_waypoint_route_; - Cli cli_set_lanelet_route_; + Cli + cli_set_waypoint_route_; + Cli + cli_set_lanelet_route_; Cli cli_clear_route_; - Cli cli_operation_mode_; - Sub sub_operation_mode_; + Cli + cli_operation_mode_; + Sub + sub_operation_mode_; bool is_auto_mode_; State::Message state_; diff --git a/system/autoware_default_adapi/src/vehicle.cpp b/system/autoware_default_adapi/src/vehicle.cpp index 5428158077ec7..8542fa1b973c1 100644 --- a/system/autoware_default_adapi/src/vehicle.cpp +++ b/system/autoware_default_adapi/src/vehicle.cpp @@ -26,11 +26,14 @@ namespace autoware::default_adapi using GearReport = autoware::component_interface_specs::vehicle_interface::GearStatus::Message; using ApiGear = autoware_adapi_v1_msgs::msg::Gear; -using TurnIndicatorsReport = autoware::component_interface_specs::vehicle_interface::TurnIndicatorStatus::Message; +using TurnIndicatorsReport = + autoware::component_interface_specs::vehicle_interface::TurnIndicatorStatus::Message; using ApiTurnIndicator = autoware_adapi_v1_msgs::msg::TurnIndicators; -using HazardLightsReport = autoware::component_interface_specs::vehicle_interface::HazardLightStatus::Message; +using HazardLightsReport = + autoware::component_interface_specs::vehicle_interface::HazardLightStatus::Message; using ApiHazardLight = autoware_adapi_v1_msgs::msg::HazardLights; -using MapProjectorInfo = autoware::component_interface_specs::map_interface::MapProjectorInfo::Message; +using MapProjectorInfo = + autoware::component_interface_specs::map_interface::MapProjectorInfo::Message; std::unordered_map gear_type_ = { {GearReport::NONE, ApiGear::UNKNOWN}, {GearReport::NEUTRAL, ApiGear::NEUTRAL}, @@ -89,19 +92,21 @@ uint8_t VehicleNode::mapping( } void VehicleNode::kinematic_state( - const autoware::component_interface_specs::localization_interface::KinematicState::Message::ConstSharedPtr msg_ptr) + const autoware::component_interface_specs::localization_interface::KinematicState::Message:: + ConstSharedPtr msg_ptr) { kinematic_state_msgs_ = msg_ptr; } void VehicleNode::acceleration_status( - const autoware::component_interface_specs::localization_interface::Acceleration::Message::ConstSharedPtr msg_ptr) + const autoware::component_interface_specs::localization_interface::Acceleration::Message:: + ConstSharedPtr msg_ptr) { acceleration_msgs_ = msg_ptr; } -void VehicleNode::steering_status( - const autoware::component_interface_specs::vehicle_interface::SteeringStatus::Message::ConstSharedPtr msg_ptr) +void VehicleNode::steering_status(const autoware::component_interface_specs::vehicle_interface:: + SteeringStatus::Message::ConstSharedPtr msg_ptr) { steering_status_msgs_ = msg_ptr; } @@ -121,8 +126,8 @@ void VehicleNode::hazard_light_status(const HazardLightsReport::ConstSharedPtr m hazard_light_status_msgs_ = msg_ptr; } -void VehicleNode::energy_status( - const autoware::component_interface_specs::vehicle_interface::EnergyStatus::Message::ConstSharedPtr msg_ptr) +void VehicleNode::energy_status(const autoware::component_interface_specs::vehicle_interface:: + EnergyStatus::Message::ConstSharedPtr msg_ptr) { energy_status_msgs_ = msg_ptr; } diff --git a/system/autoware_default_adapi/src/vehicle.hpp b/system/autoware_default_adapi/src/vehicle.hpp index c971948329d84..fbe6fb5e97aec 100644 --- a/system/autoware_default_adapi/src/vehicle.hpp +++ b/system/autoware_default_adapi/src/vehicle.hpp @@ -15,10 +15,10 @@ #ifndef VEHICLE_HPP_ #define VEHICLE_HPP_ -#include #include #include #include +#include #include #include @@ -42,37 +42,51 @@ class VehicleNode : public rclcpp::Node rclcpp::CallbackGroup::SharedPtr group_cli_; Pub pub_kinematics_; Pub pub_status_; - Sub sub_kinematic_state_; + Sub + sub_kinematic_state_; Sub sub_acceleration_; Sub sub_steering_; Sub sub_gear_state_; - Sub sub_turn_indicator_; + Sub + sub_turn_indicator_; Sub sub_hazard_light_; Sub sub_energy_level_; Sub sub_map_projector_info_; rclcpp::TimerBase::SharedPtr timer_; - autoware::component_interface_specs::localization_interface::KinematicState::Message::ConstSharedPtr kinematic_state_msgs_; - autoware::component_interface_specs::localization_interface::Acceleration::Message::ConstSharedPtr acceleration_msgs_; - autoware::component_interface_specs::vehicle_interface::SteeringStatus::Message::ConstSharedPtr steering_status_msgs_; - autoware::component_interface_specs::vehicle_interface::GearStatus::Message::ConstSharedPtr gear_status_msgs_; - autoware::component_interface_specs::vehicle_interface::TurnIndicatorStatus::Message::ConstSharedPtr turn_indicator_status_msgs_; - autoware::component_interface_specs::vehicle_interface::HazardLightStatus::Message::ConstSharedPtr hazard_light_status_msgs_; - autoware::component_interface_specs::vehicle_interface::EnergyStatus::Message::ConstSharedPtr energy_status_msgs_; - autoware::component_interface_specs::map_interface::MapProjectorInfo::Message::ConstSharedPtr map_projector_info_; + autoware::component_interface_specs::localization_interface::KinematicState::Message:: + ConstSharedPtr kinematic_state_msgs_; + autoware::component_interface_specs::localization_interface::Acceleration::Message::ConstSharedPtr + acceleration_msgs_; + autoware::component_interface_specs::vehicle_interface::SteeringStatus::Message::ConstSharedPtr + steering_status_msgs_; + autoware::component_interface_specs::vehicle_interface::GearStatus::Message::ConstSharedPtr + gear_status_msgs_; + autoware::component_interface_specs::vehicle_interface::TurnIndicatorStatus::Message:: + ConstSharedPtr turn_indicator_status_msgs_; + autoware::component_interface_specs::vehicle_interface::HazardLightStatus::Message::ConstSharedPtr + hazard_light_status_msgs_; + autoware::component_interface_specs::vehicle_interface::EnergyStatus::Message::ConstSharedPtr + energy_status_msgs_; + autoware::component_interface_specs::map_interface::MapProjectorInfo::Message::ConstSharedPtr + map_projector_info_; - void kinematic_state( - const autoware::component_interface_specs::localization_interface::KinematicState::Message::ConstSharedPtr msg_ptr); - void acceleration_status( - const autoware::component_interface_specs::localization_interface::Acceleration::Message::ConstSharedPtr msg_ptr); - void steering_status(const autoware::component_interface_specs::vehicle_interface::SteeringStatus::Message::ConstSharedPtr msg_ptr); - void gear_status(const autoware::component_interface_specs::vehicle_interface::GearStatus::Message::ConstSharedPtr msg_ptr); - void turn_indicator_status( - const autoware::component_interface_specs::vehicle_interface::TurnIndicatorStatus::Message::ConstSharedPtr msg_ptr); - void map_projector_info(const autoware::component_interface_specs::map_interface::MapProjectorInfo::Message::ConstSharedPtr msg_ptr); - void hazard_light_status( - const autoware::component_interface_specs::vehicle_interface::HazardLightStatus::Message::ConstSharedPtr msg_ptr); - void energy_status(const autoware::component_interface_specs::vehicle_interface::EnergyStatus::Message::ConstSharedPtr msg_ptr); + void kinematic_state(const autoware::component_interface_specs::localization_interface:: + KinematicState::Message::ConstSharedPtr msg_ptr); + void acceleration_status(const autoware::component_interface_specs::localization_interface:: + Acceleration::Message::ConstSharedPtr msg_ptr); + void steering_status(const autoware::component_interface_specs::vehicle_interface:: + SteeringStatus::Message::ConstSharedPtr msg_ptr); + void gear_status(const autoware::component_interface_specs::vehicle_interface::GearStatus:: + Message::ConstSharedPtr msg_ptr); + void turn_indicator_status(const autoware::component_interface_specs::vehicle_interface:: + TurnIndicatorStatus::Message::ConstSharedPtr msg_ptr); + void map_projector_info(const autoware::component_interface_specs::map_interface:: + MapProjectorInfo::Message::ConstSharedPtr msg_ptr); + void hazard_light_status(const autoware::component_interface_specs::vehicle_interface:: + HazardLightStatus::Message::ConstSharedPtr msg_ptr); + void energy_status(const autoware::component_interface_specs::vehicle_interface::EnergyStatus:: + Message::ConstSharedPtr msg_ptr); uint8_t mapping( std::unordered_map hash_map, uint8_t input, uint8_t default_value); void publish_kinematics(); diff --git a/system/autoware_default_adapi/src/vehicle_door.cpp b/system/autoware_default_adapi/src/vehicle_door.cpp index f197f7fb57fad..091b189c8a058 100644 --- a/system/autoware_default_adapi/src/vehicle_door.cpp +++ b/system/autoware_default_adapi/src/vehicle_door.cpp @@ -30,10 +30,13 @@ VehicleDoorNode::VehicleDoorNode(const rclcpp::NodeOptions & options) adaptor.init_sub(sub_status_, this, &VehicleDoorNode::on_status); } -void VehicleDoorNode::on_status(autoware::component_interface_specs::vehicle_interface::DoorStatus::Message::ConstSharedPtr msg) +void VehicleDoorNode::on_status( + autoware::component_interface_specs::vehicle_interface::DoorStatus::Message::ConstSharedPtr msg) { utils::notify( - pub_status_, status_, *msg, utils::ignore_stamp); + pub_status_, status_, *msg, + utils::ignore_stamp< + autoware::component_interface_specs::vehicle_interface::DoorStatus::Message>); } } // namespace autoware::default_adapi diff --git a/system/autoware_default_adapi/src/vehicle_door.hpp b/system/autoware_default_adapi/src/vehicle_door.hpp index 6bd8ba22e3427..f0a461acc86ef 100644 --- a/system/autoware_default_adapi/src/vehicle_door.hpp +++ b/system/autoware_default_adapi/src/vehicle_door.hpp @@ -15,8 +15,8 @@ #ifndef VEHICLE_DOOR_HPP_ #define VEHICLE_DOOR_HPP_ -#include #include +#include #include #include @@ -33,7 +33,9 @@ class VehicleDoorNode : public rclcpp::Node explicit VehicleDoorNode(const rclcpp::NodeOptions & options); private: - void on_status(autoware::component_interface_specs::vehicle_interface::DoorStatus::Message::ConstSharedPtr msg); + void on_status( + autoware::component_interface_specs::vehicle_interface::DoorStatus::Message::ConstSharedPtr + msg); rclcpp::CallbackGroup::SharedPtr group_cli_; Srv srv_command_; Srv srv_layout_; @@ -41,7 +43,8 @@ class VehicleDoorNode : public rclcpp::Node Cli cli_command_; Cli cli_layout_; Sub sub_status_; - std::optional status_; + std::optional + status_; }; } // namespace autoware::default_adapi