Skip to content

Commit

Permalink
refactor(radar_object_clustering)!: fix namespace and directory struc…
Browse files Browse the repository at this point in the history
…ture (autowarefoundation#7654)

* refactor: refactor radar object clustering node and related files

Signed-off-by: Taekjin LEE <[email protected]>

* refactor: fix the node name

Signed-off-by: Taekjin LEE <[email protected]>

* refactor: move the node header to src

Signed-off-by: Taekjin LEE <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Signed-off-by: palas21 <[email protected]>
  • Loading branch information
technolojin authored and palas21 committed Jul 12, 2024
1 parent b3ac599 commit a1f606a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
8 changes: 4 additions & 4 deletions perception/radar_object_clustering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ find_package(autoware_cmake REQUIRED)
autoware_package()

# Targets
ament_auto_add_library(radar_object_clustering_node_component SHARED
src/radar_object_clustering_node/radar_object_clustering_node.cpp
ament_auto_add_library(${PROJECT_NAME} SHARED
src/radar_object_clustering_node.cpp
)

rclcpp_components_register_node(radar_object_clustering_node_component
PLUGIN "radar_object_clustering::RadarObjectClusteringNode"
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::radar_object_clustering::RadarObjectClusteringNode"
EXECUTABLE radar_object_clustering_node
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radar_object_clustering/radar_object_clustering_node.hpp"
#include "radar_object_clustering_node.hpp"

#include "autoware/universe_utils/geometry/geometry.hpp"
#include "autoware/universe_utils/math/unit_conversion.hpp"
#include "object_recognition_utils/object_recognition_utils.hpp"

#include <tf2/utils.h>

#include <cmath>
#include <memory>
#include <string>
#include <vector>

#ifdef ROS_DISTRO_GALACTIC
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

#include <algorithm>
#include <cmath>
#include <memory>
#include <string>
#include <vector>

namespace
{
template <class T>
Expand Down Expand Up @@ -58,7 +59,7 @@ double get_distance(const autoware_perception_msgs::msg::DetectedObject & object

} // namespace

namespace radar_object_clustering
namespace autoware::radar_object_clustering
{
using autoware_perception_msgs::msg::DetectedObject;
using autoware_perception_msgs::msg::DetectedObjects;
Expand Down Expand Up @@ -229,7 +230,7 @@ rcl_interfaces::msg::SetParametersResult RadarObjectClusteringNode::onSetParam(
result.reason = "success";
return result;
}
} // namespace radar_object_clustering
} // namespace autoware::radar_object_clustering

#include "rclcpp_components/register_node_macro.hpp"
RCLCPP_COMPONENTS_REGISTER_NODE(radar_object_clustering::RadarObjectClusteringNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::radar_object_clustering::RadarObjectClusteringNode)
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef RADAR_OBJECT_CLUSTERING__RADAR_OBJECT_CLUSTERING_NODE_HPP_
#define RADAR_OBJECT_CLUSTERING__RADAR_OBJECT_CLUSTERING_NODE_HPP_
#ifndef RADAR_OBJECT_CLUSTERING_NODE_HPP_
#define RADAR_OBJECT_CLUSTERING_NODE_HPP_

#include "rclcpp/rclcpp.hpp"

Expand All @@ -24,7 +24,7 @@
#include <string>
#include <vector>

namespace radar_object_clustering
namespace autoware::radar_object_clustering
{
using autoware_perception_msgs::msg::DetectedObject;
using autoware_perception_msgs::msg::DetectedObjects;
Expand Down Expand Up @@ -72,6 +72,6 @@ class RadarObjectClusteringNode : public rclcpp::Node
bool isSameObject(const DetectedObject & object_1, const DetectedObject & object_2);
};

} // namespace radar_object_clustering
} // namespace autoware::radar_object_clustering

#endif // RADAR_OBJECT_CLUSTERING__RADAR_OBJECT_CLUSTERING_NODE_HPP_
#endif // RADAR_OBJECT_CLUSTERING_NODE_HPP_

0 comments on commit a1f606a

Please sign in to comment.