From 4badabfd9bdc5760d5949adad728ce1e1b3da787 Mon Sep 17 00:00:00 2001 From: kminoda Date: Tue, 9 Apr 2024 10:36:34 +0900 Subject: [PATCH 1/2] feat(object_merger): add glog Signed-off-by: kminoda --- perception/object_merger/CMakeLists.txt | 9 +++-- .../src/object_association_merger/main.cpp | 34 +++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 perception/object_merger/src/object_association_merger/main.cpp diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt index b02983db11af3..721c5eff31ede 100644 --- a/perception/object_merger/CMakeLists.txt +++ b/perception/object_merger/CMakeLists.txt @@ -28,9 +28,12 @@ target_link_libraries(object_association_merger Eigen3::Eigen ) -rclcpp_components_register_node(object_association_merger - PLUGIN "object_association::ObjectAssociationMergerNode" - EXECUTABLE object_association_merger_node +ament_auto_add_executable(object_association_merger_node + src/object_association_merger/main.cpp +) + +target_link_libraries(object_association_merger_node + object_association_merger glog ) ament_auto_package(INSTALL_TO_SHARE diff --git a/perception/object_merger/src/object_association_merger/main.cpp b/perception/object_merger/src/object_association_merger/main.cpp new file mode 100644 index 0000000000000..480766fdcd496 --- /dev/null +++ b/perception/object_merger/src/object_association_merger/main.cpp @@ -0,0 +1,34 @@ +// Copyright 2024 TIER IV, inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "object_merger/node.hpp" + +#include + +#include + +int main(int argc, char ** argv) +{ + google::InitGoogleLogging(argv[0]); // NOLINT + google::InstallFailureSignalHandler(); + + rclcpp::init(argc, argv); + rclcpp::NodeOptions options; + auto object_association_merger = std::make_shared(options); + rclcpp::executors::SingleThreadedExecutor exec; + exec.add_node(object_association_merger); + exec.spin(); + rclcpp::shutdown(); + return 0; +} From c562db3e8f614ec20ae1424b49d5642d742942be Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 01:38:52 +0000 Subject: [PATCH 2/2] style(pre-commit): autofix --- .../object_merger/src/object_association_merger/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perception/object_merger/src/object_association_merger/main.cpp b/perception/object_merger/src/object_association_merger/main.cpp index 480766fdcd496..a4a7fee90e96b 100644 --- a/perception/object_merger/src/object_association_merger/main.cpp +++ b/perception/object_merger/src/object_association_merger/main.cpp @@ -25,7 +25,8 @@ int main(int argc, char ** argv) rclcpp::init(argc, argv); rclcpp::NodeOptions options; - auto object_association_merger = std::make_shared(options); + auto object_association_merger = + std::make_shared(options); rclcpp::executors::SingleThreadedExecutor exec; exec.add_node(object_association_merger); exec.spin();