From a47e1aa72e9dcd12949932ede57b765281cfe2d9 Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Mon, 20 Jan 2025 18:26:11 +0900 Subject: [PATCH 01/12] feat(dummy_perception_publisher): apply `autoware_` prefix (see below): Note: * In this commit, I did not organize a folder structure. The folder structure will be organized in the next some commits. * The changes will follow the Autoware's guideline as below: - https://autowarefoundation.github.io/autoware-documentation/main/contributing/coding-guidelines/ros-nodes/directory-structure/#package-folder Signed-off-by: Junya Sasaki --- .../dummy_perception_publisher/CMakeLists.txt | 18 +++++++++--------- .../dummy_perception_publisher/node.hpp | 12 ++++++++---- .../signed_distance_function.hpp | 12 ++++++------ .../dummy_perception_publisher.launch.xml | 4 ++-- .../dummy_perception_publisher/package.xml | 3 ++- .../src/empty_objects_publisher.cpp | 9 +++++++-- .../dummy_perception_publisher/src/main.cpp | 4 ++-- .../dummy_perception_publisher/src/node.cpp | 7 ++++++- .../src/pointcloud_creator.cpp | 8 ++++---- .../src/signed_distance_function.cpp | 6 +++--- .../test/src/test_signed_distance_function.cpp | 7 ++++++- 11 files changed, 55 insertions(+), 35 deletions(-) diff --git a/simulator/dummy_perception_publisher/CMakeLists.txt b/simulator/dummy_perception_publisher/CMakeLists.txt index 0acf4694d03a6..9ac146b182a9a 100644 --- a/simulator/dummy_perception_publisher/CMakeLists.txt +++ b/simulator/dummy_perception_publisher/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(dummy_perception_publisher) +project(autoware_dummy_perception_publisher) find_package(autoware_cmake REQUIRED) autoware_package() @@ -23,19 +23,19 @@ ament_auto_add_library(signed_distance_function SHARED src/signed_distance_function.cpp ) -ament_auto_add_executable(dummy_perception_publisher_node +ament_auto_add_executable(${PROJECT_NAME}_node src/main.cpp src/node.cpp src/pointcloud_creator.cpp ) -target_link_libraries(dummy_perception_publisher_node +target_link_libraries(${PROJECT_NAME}_node signed_distance_function ) -ament_target_dependencies(dummy_perception_publisher_node ${${PROJECT_NAME}_DEPENDENCIES}) +ament_target_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_DEPENDENCIES}) -target_include_directories(dummy_perception_publisher_node +target_include_directories(${PROJECT_NAME}_node PUBLIC $ $) @@ -43,14 +43,14 @@ target_include_directories(dummy_perception_publisher_node # PCL dependencies - `ament_target_dependencies` doesn't respect the # components/modules selected above and only links in `common` ,so we need # to do this manually. -target_compile_definitions(dummy_perception_publisher_node PRIVATE ${PCL_DEFINITIONS}) -target_include_directories(dummy_perception_publisher_node PRIVATE ${PCL_INCLUDE_DIRS}) +target_compile_definitions(${PROJECT_NAME}_node PRIVATE ${PCL_DEFINITIONS}) +target_include_directories(${PROJECT_NAME}_node PRIVATE ${PCL_INCLUDE_DIRS}) # Unfortunately, this one can't be PRIVATE because only the plain or only the # keyword (PRIVATE) signature of target_link_libraries can be used for one # target, not both. The plain signature is already used inside # `ament_target_dependencies` and possibly rosidl_target_interfaces. -target_link_libraries(dummy_perception_publisher_node ${PCL_LIBRARIES}) -target_link_directories(dummy_perception_publisher_node PRIVATE ${PCL_LIBRARY_DIRS}) +target_link_libraries(${PROJECT_NAME}_node ${PCL_LIBRARIES}) +target_link_directories(${PROJECT_NAME}_node PRIVATE ${PCL_LIBRARY_DIRS}) ament_auto_add_executable(empty_objects_publisher diff --git a/simulator/dummy_perception_publisher/include/dummy_perception_publisher/node.hpp b/simulator/dummy_perception_publisher/include/dummy_perception_publisher/node.hpp index cf46ecddf516f..7b552367f08c6 100644 --- a/simulator/dummy_perception_publisher/include/dummy_perception_publisher/node.hpp +++ b/simulator/dummy_perception_publisher/include/dummy_perception_publisher/node.hpp @@ -1,4 +1,4 @@ -// Copyright 2020 Tier IV, Inc. +// Copyright 2025 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. @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ -#define DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ +#ifndef AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ +#define AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ #include @@ -41,6 +41,8 @@ #include #include +namespace autoware::simulator::dummy_perception_publisher +{ struct ObjectInfo { ObjectInfo( @@ -139,4 +141,6 @@ class DummyPerceptionPublisherNode : public rclcpp::Node ~DummyPerceptionPublisherNode() {} }; -#endif // DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ +} // namespace autoware::simulator::dummy_perception_publisher + +#endif // AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ diff --git a/simulator/dummy_perception_publisher/include/dummy_perception_publisher/signed_distance_function.hpp b/simulator/dummy_perception_publisher/include/dummy_perception_publisher/signed_distance_function.hpp index abf24cb8dd4e6..fbe1c86b61d62 100644 --- a/simulator/dummy_perception_publisher/include/dummy_perception_publisher/signed_distance_function.hpp +++ b/simulator/dummy_perception_publisher/include/dummy_perception_publisher/signed_distance_function.hpp @@ -1,4 +1,4 @@ -// Copyright 2022 Tier IV, Inc. +// Copyright 2025 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. @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ -#define DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ +#ifndef AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ +#define AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ #include @@ -23,7 +23,7 @@ #include #include -namespace signed_distance_function +namespace autoware::simulator::dummy_perception_publisher::signed_distance_function { class AbstractSignedDistanceFunction @@ -69,6 +69,6 @@ class CompositeSDF : public AbstractSignedDistanceFunction std::vector> sdf_ptrs_; }; -} // namespace signed_distance_function +} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function -#endif // DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ +#endif // AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ diff --git a/simulator/dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml b/simulator/dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml index 41025f74cbe50..a79bd77496af1 100644 --- a/simulator/dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml +++ b/simulator/dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml @@ -9,7 +9,7 @@ - + @@ -30,7 +30,7 @@ - + diff --git a/simulator/dummy_perception_publisher/package.xml b/simulator/dummy_perception_publisher/package.xml index 4f78acd6c07f2..395e9a0275f3a 100644 --- a/simulator/dummy_perception_publisher/package.xml +++ b/simulator/dummy_perception_publisher/package.xml @@ -1,10 +1,11 @@ - dummy_perception_publisher + autoware_dummy_perception_publisher 0.40.0 The dummy_perception_publisher package Yukihiro Saito + Junya Sasaki Apache License 2.0 ament_cmake_auto diff --git a/simulator/dummy_perception_publisher/src/empty_objects_publisher.cpp b/simulator/dummy_perception_publisher/src/empty_objects_publisher.cpp index 2d1ea626fb1ac..beadf6bb45f46 100644 --- a/simulator/dummy_perception_publisher/src/empty_objects_publisher.cpp +++ b/simulator/dummy_perception_publisher/src/empty_objects_publisher.cpp @@ -1,4 +1,4 @@ -// Copyright 2020 Tier IV, Inc. +// Copyright 2025 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. @@ -19,6 +19,9 @@ #include #include +namespace autoware::simulator::dummy_perception_publisher +{ + class EmptyObjectsPublisher : public rclcpp::Node { public: @@ -45,10 +48,12 @@ class EmptyObjectsPublisher : public rclcpp::Node } }; +} // namespace autoware::simulator::dummy_perception_publisher + int main(int argc, char ** argv) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/simulator/dummy_perception_publisher/src/main.cpp b/simulator/dummy_perception_publisher/src/main.cpp index 5e627f2cbc8ed..c4fc4042c6ae9 100644 --- a/simulator/dummy_perception_publisher/src/main.cpp +++ b/simulator/dummy_perception_publisher/src/main.cpp @@ -1,4 +1,4 @@ -// Copyright 2020 Tier IV, Inc. +// Copyright 2025 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. @@ -21,7 +21,7 @@ int main(int argc, char ** argv) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0; diff --git a/simulator/dummy_perception_publisher/src/node.cpp b/simulator/dummy_perception_publisher/src/node.cpp index d72b16d303cec..70a958f717cf8 100644 --- a/simulator/dummy_perception_publisher/src/node.cpp +++ b/simulator/dummy_perception_publisher/src/node.cpp @@ -1,4 +1,4 @@ -// Copyright 2020 Tier IV, Inc. +// Copyright 2025 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. @@ -35,6 +35,9 @@ #include #include +namespace autoware::simulator::dummy_perception_publisher +{ + using autoware_perception_msgs::msg::TrackedObject; using autoware_perception_msgs::msg::TrackedObjects; @@ -428,3 +431,5 @@ void DummyPerceptionPublisherNode::objectCallback( } } } + +} // namespace autoware::simulator::dummy_perception_publisher diff --git a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp b/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp index 977336f63eee3..498a7d80110ca 100644 --- a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp +++ b/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp @@ -1,4 +1,4 @@ -// Copyright 2020 Tier IV, Inc. +// Copyright 2025 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. @@ -26,7 +26,7 @@ #include #include -namespace +namespace autoware::simulator::dummy_perception_publisher { static constexpr double epsilon = 0.001; @@ -45,8 +45,6 @@ pcl::PointXYZ getPointWrtBaseLink( return pcl::PointXYZ(p_wrt_base.x(), p_wrt_base.y(), p_wrt_base.z()); } -} // namespace - void ObjectCentricPointCloudCreator::create_object_pointcloud( const ObjectInfo & obj_info, const tf2::Transform & tf_base_link2map, std::mt19937 & random_generator, pcl::PointCloud::Ptr pointcloud) const @@ -261,3 +259,5 @@ std::vector::Ptr> EgoCentricPointCloudCreator::cr } return pointclouds; } + +} // namespace autoware::simulator::dummy_perception_publisher diff --git a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp b/simulator/dummy_perception_publisher/src/signed_distance_function.cpp index 01bef1851b25e..739cbcdcfbe2d 100644 --- a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp +++ b/simulator/dummy_perception_publisher/src/signed_distance_function.cpp @@ -1,4 +1,4 @@ -// Copyright 2022 Tier IV, Inc. +// Copyright 2025 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. @@ -20,7 +20,7 @@ #include #include -namespace signed_distance_function +namespace autoware::simulator::dummy_perception_publisher::signed_distance_function { double AbstractSignedDistanceFunction::getSphereTracingDist( @@ -89,4 +89,4 @@ size_t CompositeSDF::nearest_sdf_index(double x, double y) const return idx_min; } -} // namespace signed_distance_function +} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function diff --git a/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp b/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp index 5b8dcee549ea7..a496d41cea541 100644 --- a/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp +++ b/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp @@ -1,4 +1,4 @@ -// Copyright 2022 Tier IV, Inc. All rights reserved. +// Copyright 2025 Tier IV, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,9 @@ #include #include +namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +{ + namespace sdf = signed_distance_function; TEST(SignedDistanceFunctionTest, BoxSDF) @@ -77,6 +80,8 @@ TEST(SignedDistanceFunctionTest, CompositeSDF) // ASSERT_NEAR(func.getSphereTracingDist(0.0, 1.0, M_PI * -0.5, eps), 0.5, eps); } +} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function + int main(int argc, char ** argv) { testing::InitGoogleTest(&argc, argv); From 3ae179d2c12e0bdbd1c6c9bbc04c5d3f92abb4d1 Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Mon, 20 Jan 2025 18:50:17 +0900 Subject: [PATCH 02/12] rename(dummy_perception_publisher): move headers under `include/autoware` * Fixes due to this changes for .hpp/.cpp files will be applied in the next commit Signed-off-by: Junya Sasaki --- .../include/{ => autoware}/dummy_perception_publisher/node.hpp | 0 .../dummy_perception_publisher/signed_distance_function.hpp | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename simulator/dummy_perception_publisher/include/{ => autoware}/dummy_perception_publisher/node.hpp (100%) rename simulator/dummy_perception_publisher/include/{ => autoware}/dummy_perception_publisher/signed_distance_function.hpp (100%) diff --git a/simulator/dummy_perception_publisher/include/dummy_perception_publisher/node.hpp b/simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp similarity index 100% rename from simulator/dummy_perception_publisher/include/dummy_perception_publisher/node.hpp rename to simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp diff --git a/simulator/dummy_perception_publisher/include/dummy_perception_publisher/signed_distance_function.hpp b/simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp similarity index 100% rename from simulator/dummy_perception_publisher/include/dummy_perception_publisher/signed_distance_function.hpp rename to simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp From 19b16ad5e7aad1abc5ca045ec3f527b6912479dd Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Mon, 20 Jan 2025 18:54:31 +0900 Subject: [PATCH 03/12] fix(dummy_perception_publisher): fix include header paths * To follow the previous commit Signed-off-by: Junya Sasaki --- simulator/dummy_perception_publisher/src/main.cpp | 2 +- simulator/dummy_perception_publisher/src/node.cpp | 2 +- .../dummy_perception_publisher/src/pointcloud_creator.cpp | 4 ++-- .../src/signed_distance_function.cpp | 2 +- .../test/src/test_signed_distance_function.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/simulator/dummy_perception_publisher/src/main.cpp b/simulator/dummy_perception_publisher/src/main.cpp index c4fc4042c6ae9..15a76748dcfff 100644 --- a/simulator/dummy_perception_publisher/src/main.cpp +++ b/simulator/dummy_perception_publisher/src/main.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dummy_perception_publisher/node.hpp" +#include "autoware/dummy_perception_publisher/node.hpp" #include diff --git a/simulator/dummy_perception_publisher/src/node.cpp b/simulator/dummy_perception_publisher/src/node.cpp index 70a958f717cf8..5b6776b53aba9 100644 --- a/simulator/dummy_perception_publisher/src/node.cpp +++ b/simulator/dummy_perception_publisher/src/node.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dummy_perception_publisher/node.hpp" +#include "autoware/dummy_perception_publisher/node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" diff --git a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp b/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp index 498a7d80110ca..5734178802057 100644 --- a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp +++ b/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dummy_perception_publisher/node.hpp" -#include "dummy_perception_publisher/signed_distance_function.hpp" +#include "autoware/dummy_perception_publisher/node.hpp" +#include "autoware/dummy_perception_publisher/signed_distance_function.hpp" #include diff --git a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp b/simulator/dummy_perception_publisher/src/signed_distance_function.cpp index 739cbcdcfbe2d..cbb172deb395e 100644 --- a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp +++ b/simulator/dummy_perception_publisher/src/signed_distance_function.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dummy_perception_publisher/signed_distance_function.hpp" +#include "autoware/dummy_perception_publisher/signed_distance_function.hpp" #include diff --git a/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp b/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp index a496d41cea541..cdcf0a717d42d 100644 --- a/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp +++ b/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dummy_perception_publisher/signed_distance_function.hpp" +#include "autoware/dummy_perception_publisher/signed_distance_function.hpp" #include #include From 2b6cc5eba0ac0d138644c9daf32039248f2de287 Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Mon, 20 Jan 2025 18:56:40 +0900 Subject: [PATCH 04/12] rename: `dummy_perception_publisher` => `autoware_dummy_perception_publisher` Signed-off-by: Junya Sasaki --- .../CHANGELOG.rst | 0 .../CMakeLists.txt | 0 .../README.md | 0 .../include/autoware/dummy_perception_publisher/node.hpp | 0 .../dummy_perception_publisher/signed_distance_function.hpp | 0 .../launch/dummy_perception_publisher.launch.xml | 0 .../package.xml | 0 .../src/empty_objects_publisher.cpp | 0 .../src/main.cpp | 0 .../src/node.cpp | 0 .../src/pointcloud_creator.cpp | 0 .../src/signed_distance_function.cpp | 0 .../test/src/test_signed_distance_function.cpp | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/CHANGELOG.rst (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/CMakeLists.txt (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/README.md (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/include/autoware/dummy_perception_publisher/node.hpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/include/autoware/dummy_perception_publisher/signed_distance_function.hpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/launch/dummy_perception_publisher.launch.xml (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/package.xml (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/src/empty_objects_publisher.cpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/src/main.cpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/src/node.cpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/src/pointcloud_creator.cpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/src/signed_distance_function.cpp (100%) rename simulator/{dummy_perception_publisher => autoware_dummy_perception_publisher}/test/src/test_signed_distance_function.cpp (100%) diff --git a/simulator/dummy_perception_publisher/CHANGELOG.rst b/simulator/autoware_dummy_perception_publisher/CHANGELOG.rst similarity index 100% rename from simulator/dummy_perception_publisher/CHANGELOG.rst rename to simulator/autoware_dummy_perception_publisher/CHANGELOG.rst diff --git a/simulator/dummy_perception_publisher/CMakeLists.txt b/simulator/autoware_dummy_perception_publisher/CMakeLists.txt similarity index 100% rename from simulator/dummy_perception_publisher/CMakeLists.txt rename to simulator/autoware_dummy_perception_publisher/CMakeLists.txt diff --git a/simulator/dummy_perception_publisher/README.md b/simulator/autoware_dummy_perception_publisher/README.md similarity index 100% rename from simulator/dummy_perception_publisher/README.md rename to simulator/autoware_dummy_perception_publisher/README.md diff --git a/simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp similarity index 100% rename from simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp rename to simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp diff --git a/simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp similarity index 100% rename from simulator/dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp rename to simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp diff --git a/simulator/dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml b/simulator/autoware_dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml similarity index 100% rename from simulator/dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml rename to simulator/autoware_dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml diff --git a/simulator/dummy_perception_publisher/package.xml b/simulator/autoware_dummy_perception_publisher/package.xml similarity index 100% rename from simulator/dummy_perception_publisher/package.xml rename to simulator/autoware_dummy_perception_publisher/package.xml diff --git a/simulator/dummy_perception_publisher/src/empty_objects_publisher.cpp b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp similarity index 100% rename from simulator/dummy_perception_publisher/src/empty_objects_publisher.cpp rename to simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp diff --git a/simulator/dummy_perception_publisher/src/main.cpp b/simulator/autoware_dummy_perception_publisher/src/main.cpp similarity index 100% rename from simulator/dummy_perception_publisher/src/main.cpp rename to simulator/autoware_dummy_perception_publisher/src/main.cpp diff --git a/simulator/dummy_perception_publisher/src/node.cpp b/simulator/autoware_dummy_perception_publisher/src/node.cpp similarity index 100% rename from simulator/dummy_perception_publisher/src/node.cpp rename to simulator/autoware_dummy_perception_publisher/src/node.cpp diff --git a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp b/simulator/autoware_dummy_perception_publisher/src/pointcloud_creator.cpp similarity index 100% rename from simulator/dummy_perception_publisher/src/pointcloud_creator.cpp rename to simulator/autoware_dummy_perception_publisher/src/pointcloud_creator.cpp diff --git a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp b/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp similarity index 100% rename from simulator/dummy_perception_publisher/src/signed_distance_function.cpp rename to simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp diff --git a/simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp b/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp similarity index 100% rename from simulator/dummy_perception_publisher/test/src/test_signed_distance_function.cpp rename to simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp From 2cbf5531b52a730bcaaf680a03bce71f38b8c43a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:06:49 +0000 Subject: [PATCH 05/12] style(pre-commit): autofix --- .../include/autoware/dummy_perception_publisher/node.hpp | 6 +++--- .../dummy_perception_publisher/signed_distance_function.hpp | 6 +++--- .../src/empty_objects_publisher.cpp | 3 ++- simulator/autoware_dummy_perception_publisher/src/main.cpp | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp index 7b552367f08c6..149ecf0c9438b 100644 --- a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp +++ b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ -#define AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ +#ifndef AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ +#define AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ #include @@ -143,4 +143,4 @@ class DummyPerceptionPublisherNode : public rclcpp::Node } // namespace autoware::simulator::dummy_perception_publisher -#endif // AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ +#endif // AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ diff --git a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp index fbe1c86b61d62..176bf828ab09c 100644 --- a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp +++ b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ -#define AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ +#ifndef AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ +#define AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ #include @@ -71,4 +71,4 @@ class CompositeSDF : public AbstractSignedDistanceFunction } // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function -#endif // AUTOWARE__SIMULATOR__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ +#endif // AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ diff --git a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp index beadf6bb45f46..145d3aa8144fd 100644 --- a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp @@ -53,7 +53,8 @@ class EmptyObjectsPublisher : public rclcpp::Node int main(int argc, char ** argv) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin( + std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/simulator/autoware_dummy_perception_publisher/src/main.cpp b/simulator/autoware_dummy_perception_publisher/src/main.cpp index 15a76748dcfff..de79cddeaa287 100644 --- a/simulator/autoware_dummy_perception_publisher/src/main.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/main.cpp @@ -21,7 +21,8 @@ int main(int argc, char ** argv) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared< + autoware::simulator::dummy_perception_publisher::DummyPerceptionPublisherNode>()); rclcpp::shutdown(); return 0; From 2f8d6671835540b9892fd09ce01a01ca54d1950c Mon Sep 17 00:00:00 2001 From: Ryohsuke Mitsudome Date: Wed, 22 Jan 2025 23:29:53 +0900 Subject: [PATCH 06/12] fix: fix package name in the launch files Signed-off-by: Ryohsuke Mitsudome --- launch/tier4_perception_launch/launch/perception.launch.xml | 2 +- launch/tier4_simulator_launch/launch/simulator.launch.xml | 4 ++-- launch/tier4_simulator_launch/package.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/launch/tier4_perception_launch/launch/perception.launch.xml b/launch/tier4_perception_launch/launch/perception.launch.xml index 02a34eab8fe9a..e652552fe7a87 100644 --- a/launch/tier4_perception_launch/launch/perception.launch.xml +++ b/launch/tier4_perception_launch/launch/perception.launch.xml @@ -287,7 +287,7 @@ - + diff --git a/launch/tier4_simulator_launch/launch/simulator.launch.xml b/launch/tier4_simulator_launch/launch/simulator.launch.xml index 73b00adf923be..13e2396046f43 100644 --- a/launch/tier4_simulator_launch/launch/simulator.launch.xml +++ b/launch/tier4_simulator_launch/launch/simulator.launch.xml @@ -47,7 +47,7 @@ - + @@ -111,7 +111,7 @@ - + diff --git a/launch/tier4_simulator_launch/package.xml b/launch/tier4_simulator_launch/package.xml index 19bc81b056b60..b438493848c66 100644 --- a/launch/tier4_simulator_launch/package.xml +++ b/launch/tier4_simulator_launch/package.xml @@ -14,7 +14,7 @@ ament_cmake_auto autoware_cmake - dummy_perception_publisher + autoware_dummy_perception_publisher fault_injection simple_planning_simulator From 78556ba8aec1eb8d77faaf46d19a4043fa51ad8e Mon Sep 17 00:00:00 2001 From: Ryohsuke Mitsudome Date: Wed, 22 Jan 2025 23:30:19 +0900 Subject: [PATCH 07/12] docs: fix package name in package.xml and CHANGELOG.rst Signed-off-by: Ryohsuke Mitsudome --- simulator/autoware_dummy_perception_publisher/CHANGELOG.rst | 6 +++--- simulator/autoware_dummy_perception_publisher/package.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/simulator/autoware_dummy_perception_publisher/CHANGELOG.rst b/simulator/autoware_dummy_perception_publisher/CHANGELOG.rst index 50b2396ae0311..ada832a084f22 100644 --- a/simulator/autoware_dummy_perception_publisher/CHANGELOG.rst +++ b/simulator/autoware_dummy_perception_publisher/CHANGELOG.rst @@ -1,6 +1,6 @@ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package dummy_perception_publisher -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package autoware_dummy_perception_publisher +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.40.0 (2024-12-12) ------------------- diff --git a/simulator/autoware_dummy_perception_publisher/package.xml b/simulator/autoware_dummy_perception_publisher/package.xml index 395e9a0275f3a..6c75a9b3c0277 100644 --- a/simulator/autoware_dummy_perception_publisher/package.xml +++ b/simulator/autoware_dummy_perception_publisher/package.xml @@ -3,7 +3,7 @@ autoware_dummy_perception_publisher 0.40.0 - The dummy_perception_publisher package + The autoware_dummy_perception_publisher package Yukihiro Saito Junya Sasaki Apache License 2.0 From b2ac1a46a74814d9337fa9b9005d8dd50f8e51d3 Mon Sep 17 00:00:00 2001 From: Ryohsuke Mitsudome Date: Wed, 22 Jan 2025 23:34:38 +0900 Subject: [PATCH 08/12] fix: revert unnecessary modification in Copyright notice Signed-off-by: Ryohsuke Mitsudome --- .../include/autoware/dummy_perception_publisher/node.hpp | 2 +- .../dummy_perception_publisher/signed_distance_function.hpp | 2 +- .../src/empty_objects_publisher.cpp | 2 +- simulator/autoware_dummy_perception_publisher/src/main.cpp | 2 +- simulator/autoware_dummy_perception_publisher/src/node.cpp | 2 +- .../src/signed_distance_function.cpp | 2 +- .../test/src/test_signed_distance_function.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp index 149ecf0c9438b..25bfa08c11bd2 100644 --- a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp +++ b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. +// Copyright 2020 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. diff --git a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp index 176bf828ab09c..dddd37ab4bf29 100644 --- a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp +++ b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. +// Copyright 2022 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. diff --git a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp index 145d3aa8144fd..13fb4734fb12e 100644 --- a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. +// Copyright 2020 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. diff --git a/simulator/autoware_dummy_perception_publisher/src/main.cpp b/simulator/autoware_dummy_perception_publisher/src/main.cpp index de79cddeaa287..2d7a81c135fd9 100644 --- a/simulator/autoware_dummy_perception_publisher/src/main.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/main.cpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. +// Copyright 2020 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. diff --git a/simulator/autoware_dummy_perception_publisher/src/node.cpp b/simulator/autoware_dummy_perception_publisher/src/node.cpp index 5b6776b53aba9..5d2b894cf3223 100644 --- a/simulator/autoware_dummy_perception_publisher/src/node.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/node.cpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. +// Copyright 2020 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. diff --git a/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp b/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp index cbb172deb395e..589bffd0b96bc 100644 --- a/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. +// Copyright 2022 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. diff --git a/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp b/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp index cdcf0a717d42d..edcc8862ab196 100644 --- a/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp +++ b/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp @@ -1,4 +1,4 @@ -// Copyright 2025 Tier IV, Inc. All rights reserved. +// Copyright 2022 Tier IV, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From ef6f534db01125ac347282b8695d3466bb4ff652 Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Thu, 23 Jan 2025 13:46:05 +0900 Subject: [PATCH 09/12] Update launch/tier4_simulator_launch/launch/simulator.launch.xml Signed-off-by: Junya Sasaki Co-authored-by: SakodaShintaro --- launch/tier4_simulator_launch/launch/simulator.launch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch/tier4_simulator_launch/launch/simulator.launch.xml b/launch/tier4_simulator_launch/launch/simulator.launch.xml index 13e2396046f43..c3882bc5e7a8d 100644 --- a/launch/tier4_simulator_launch/launch/simulator.launch.xml +++ b/launch/tier4_simulator_launch/launch/simulator.launch.xml @@ -47,7 +47,7 @@ - + From a42c5da92912d1b34a9cbf54ec108d9094803bb6 Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Thu, 23 Jan 2025 18:24:38 +0900 Subject: [PATCH 10/12] bug(autoware_dummy_perception_publisher): fix naming consistency bugs * The node name does not need `autoware_` prefix Signed-off-by: Junya Sasaki --- .../launch/dummy_perception_publisher.launch.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simulator/autoware_dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml b/simulator/autoware_dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml index a79bd77496af1..ed9c38f7dc9b5 100644 --- a/simulator/autoware_dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml +++ b/simulator/autoware_dummy_perception_publisher/launch/dummy_perception_publisher.launch.xml @@ -9,7 +9,7 @@ - + @@ -30,7 +30,7 @@ - + From deea2de3e5d8974586d915c33d5f8d88beb76aa5 Mon Sep 17 00:00:00 2001 From: Junya Sasaki Date: Thu, 23 Jan 2025 19:14:14 +0900 Subject: [PATCH 11/12] bug(autoware_dummy_perception_publisher): fix inconsistent namespacings Signed-off-by: Junya Sasaki --- .../autoware/dummy_perception_publisher/node.hpp | 4 ++-- .../signed_distance_function.hpp | 4 ++-- .../src/empty_objects_publisher.cpp | 6 +++--- .../src/main.cpp | 2 +- .../src/node.cpp | 4 ++-- .../src/pointcloud_creator.cpp | 10 +++++----- .../src/signed_distance_function.cpp | 4 ++-- .../test/src/test_signed_distance_function.cpp | 16 +++++++--------- 8 files changed, 24 insertions(+), 26 deletions(-) diff --git a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp index 25bfa08c11bd2..413ba4d82b836 100644 --- a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp +++ b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/node.hpp @@ -41,7 +41,7 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher +namespace autoware::dummy_perception_publisher { struct ObjectInfo { @@ -141,6 +141,6 @@ class DummyPerceptionPublisherNode : public rclcpp::Node ~DummyPerceptionPublisherNode() {} }; -} // namespace autoware::simulator::dummy_perception_publisher +} // namespace autoware::dummy_perception_publisher #endif // AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_ diff --git a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp index dddd37ab4bf29..349cbe42ec0bc 100644 --- a/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp +++ b/simulator/autoware_dummy_perception_publisher/include/autoware/dummy_perception_publisher/signed_distance_function.hpp @@ -23,7 +23,7 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +namespace autoware::dummy_perception_publisher { class AbstractSignedDistanceFunction @@ -69,6 +69,6 @@ class CompositeSDF : public AbstractSignedDistanceFunction std::vector> sdf_ptrs_; }; -} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +} // namespace autoware::dummy_perception_publisher #endif // AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_ diff --git a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp index 13fb4734fb12e..a1b8b4ca44850 100644 --- a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp @@ -19,7 +19,7 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher +namespace autoware::dummy_perception_publisher { class EmptyObjectsPublisher : public rclcpp::Node @@ -48,13 +48,13 @@ class EmptyObjectsPublisher : public rclcpp::Node } }; -} // namespace autoware::simulator::dummy_perception_publisher +} // namespace autoware::dummy_perception_publisher int main(int argc, char ** argv) { rclcpp::init(argc, argv); rclcpp::spin( - std::make_shared()); + std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/simulator/autoware_dummy_perception_publisher/src/main.cpp b/simulator/autoware_dummy_perception_publisher/src/main.cpp index 2d7a81c135fd9..28b9cc90e142e 100644 --- a/simulator/autoware_dummy_perception_publisher/src/main.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/main.cpp @@ -22,7 +22,7 @@ int main(int argc, char ** argv) { rclcpp::init(argc, argv); rclcpp::spin(std::make_shared< - autoware::simulator::dummy_perception_publisher::DummyPerceptionPublisherNode>()); + autoware::dummy_perception_publisher::DummyPerceptionPublisherNode>()); rclcpp::shutdown(); return 0; diff --git a/simulator/autoware_dummy_perception_publisher/src/node.cpp b/simulator/autoware_dummy_perception_publisher/src/node.cpp index 5d2b894cf3223..22797e252813c 100644 --- a/simulator/autoware_dummy_perception_publisher/src/node.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/node.cpp @@ -35,7 +35,7 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher +namespace autoware::dummy_perception_publisher { using autoware_perception_msgs::msg::TrackedObject; @@ -432,4 +432,4 @@ void DummyPerceptionPublisherNode::objectCallback( } } -} // namespace autoware::simulator::dummy_perception_publisher +} // namespace autoware::dummy_perception_publisher diff --git a/simulator/autoware_dummy_perception_publisher/src/pointcloud_creator.cpp b/simulator/autoware_dummy_perception_publisher/src/pointcloud_creator.cpp index 5734178802057..a2f84841e4ff2 100644 --- a/simulator/autoware_dummy_perception_publisher/src/pointcloud_creator.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/pointcloud_creator.cpp @@ -26,7 +26,7 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher +namespace autoware::dummy_perception_publisher { static constexpr double epsilon = 0.001; @@ -198,13 +198,13 @@ std::vector::Ptr> EgoCentricPointCloudCreator::cr const std::vector & obj_infos, const tf2::Transform & tf_base_link2map, std::mt19937 & random_generator, pcl::PointCloud::Ptr & merged_pointcloud) const { - std::vector> sdf_ptrs; + std::vector> sdf_ptrs; for (const auto & obj_info : obj_infos) { - const auto sdf_ptr = std::make_shared( + const auto sdf_ptr = std::make_shared( obj_info.length, obj_info.width, tf_base_link2map * obj_info.tf_map2moved_object); sdf_ptrs.push_back(sdf_ptr); } - const auto composite_sdf = signed_distance_function::CompositeSDF(sdf_ptrs); + const auto composite_sdf = CompositeSDF(sdf_ptrs); std::vector::Ptr> pointclouds(obj_infos.size()); for (size_t i = 0; i < obj_infos.size(); ++i) { @@ -260,4 +260,4 @@ std::vector::Ptr> EgoCentricPointCloudCreator::cr return pointclouds; } -} // namespace autoware::simulator::dummy_perception_publisher +} // namespace autoware::dummy_perception_publisher diff --git a/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp b/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp index 589bffd0b96bc..c6a720e33fefa 100644 --- a/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/signed_distance_function.cpp @@ -20,7 +20,7 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +namespace autoware::dummy_perception_publisher { double AbstractSignedDistanceFunction::getSphereTracingDist( @@ -89,4 +89,4 @@ size_t CompositeSDF::nearest_sdf_index(double x, double y) const return idx_min; } -} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +} // namespace autoware::dummy_perception_publisher diff --git a/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp b/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp index edcc8862ab196..e7bb667a1dec2 100644 --- a/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp +++ b/simulator/autoware_dummy_perception_publisher/test/src/test_signed_distance_function.cpp @@ -23,11 +23,9 @@ #include #include -namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +namespace autoware::dummy_perception_publisher { -namespace sdf = signed_distance_function; - TEST(SignedDistanceFunctionTest, BoxSDF) { const double eps = 1e-5; @@ -36,7 +34,7 @@ TEST(SignedDistanceFunctionTest, BoxSDF) // test with identity transform const auto q = tf2::Quaternion(tf2::Vector3(0, 0, 1.0), 0.0); const auto tf_global2local = tf2::Transform(q); - const auto func = sdf::BoxSDF(1., 2., tf_global2local); + const auto func = BoxSDF(1., 2., tf_global2local); ASSERT_NEAR(func(0.0, 0.0), -0.5, eps); ASSERT_NEAR(func(0.0, 1.0), 0.0, eps); ASSERT_NEAR(func(0.0, 1.5), 0.5, eps); @@ -53,7 +51,7 @@ TEST(SignedDistanceFunctionTest, BoxSDF) // test with rotation (90 deg) and translation const auto q = tf2::Quaternion(tf2::Vector3(0, 0, 1.0), M_PI * 0.5); const auto tf_global2local = tf2::Transform(q, tf2::Vector3(1.0, 1.0, 0.0)); - const auto func = sdf::BoxSDF(1., 2., tf_global2local); + const auto func = BoxSDF(1., 2., tf_global2local); ASSERT_NEAR(func(1.0, 1.0), -0.5, eps); ASSERT_NEAR(func(0.0, 0.0), 0.5, eps); @@ -66,11 +64,11 @@ TEST(SignedDistanceFunctionTest, CompositeSDF) const double eps = 1e-5; const auto q_identity = tf2::Quaternion(tf2::Vector3(0, 0, 1.0), 0.0); const auto f1 = - std::make_shared(1., 1., tf2::Transform(q_identity, tf2::Vector3(0, 0, 0))); + std::make_shared(1., 1., tf2::Transform(q_identity, tf2::Vector3(0, 0, 0))); const auto f2 = - std::make_shared(1., 1., tf2::Transform(q_identity, tf2::Vector3(0, 2.0, 0))); + std::make_shared(1., 1., tf2::Transform(q_identity, tf2::Vector3(0, 2.0, 0))); const auto func = - sdf::CompositeSDF(std::vector>{f1, f2}); + CompositeSDF(std::vector>{f1, f2}); ASSERT_NEAR(func(0.0, 0.9), 0.4, eps); ASSERT_NEAR(func(0.0, 1.1), 0.4, eps); ASSERT_NEAR(func(0.0, 0.1), -0.4, eps); @@ -80,7 +78,7 @@ TEST(SignedDistanceFunctionTest, CompositeSDF) // ASSERT_NEAR(func.getSphereTracingDist(0.0, 1.0, M_PI * -0.5, eps), 0.5, eps); } -} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function +} // namespace autoware::dummy_perception_publisher int main(int argc, char ** argv) { From 9ab4e6881b37fc6832d091da6c9dbb57ccb38990 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 10:20:01 +0000 Subject: [PATCH 12/12] style(pre-commit): autofix --- .../src/empty_objects_publisher.cpp | 3 +-- simulator/autoware_dummy_perception_publisher/src/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp index a1b8b4ca44850..2a2a1d89ffcb8 100644 --- a/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp @@ -53,8 +53,7 @@ class EmptyObjectsPublisher : public rclcpp::Node int main(int argc, char ** argv) { rclcpp::init(argc, argv); - rclcpp::spin( - std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/simulator/autoware_dummy_perception_publisher/src/main.cpp b/simulator/autoware_dummy_perception_publisher/src/main.cpp index 28b9cc90e142e..224074f15f3c5 100644 --- a/simulator/autoware_dummy_perception_publisher/src/main.cpp +++ b/simulator/autoware_dummy_perception_publisher/src/main.cpp @@ -21,8 +21,8 @@ int main(int argc, char ** argv) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared< - autoware::dummy_perception_publisher::DummyPerceptionPublisherNode>()); + rclcpp::spin( + std::make_shared()); rclcpp::shutdown(); return 0;