Skip to content

Commit

Permalink
refactor(radar_tracks_msgs_converter)!: fix namespace and directory s…
Browse files Browse the repository at this point in the history
…tructure (#7653)

* refactor: radar_tracks_msgs_converter library and node

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

* refactor: rename node.hpp to radar_tracks_msgs_converter_node.hpp

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

* refactor: fix the node name

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

* refactor: update include statement for radar_tracks_msgs_converter_node.hpp

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

* refactor: remove unused dependencies

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

* refactor: move header file to src

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

---------

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
  • Loading branch information
technolojin authored Jun 27, 2024
1 parent 963d264 commit 8614acc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
8 changes: 4 additions & 4 deletions perception/radar_tracks_msgs_converter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ find_package(autoware_cmake REQUIRED)
autoware_package()

## Targets
ament_auto_add_library(radar_tracks_msgs_converter_node_component SHARED
src/radar_tracks_msgs_converter_node/radar_tracks_msgs_converter_node.cpp
ament_auto_add_library(${PROJECT_NAME} SHARED
src/radar_tracks_msgs_converter_node.cpp
)

rclcpp_components_register_node(radar_tracks_msgs_converter_node_component
PLUGIN "radar_tracks_msgs_converter::RadarTracksMsgsConverterNode"
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::radar_tracks_msgs_converter::RadarTracksMsgsConverterNode"
EXECUTABLE radar_tracks_msgs_converter_node
)

Expand Down
2 changes: 0 additions & 2 deletions perception/radar_tracks_msgs_converter/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@

<depend>autoware_perception_msgs</depend>
<depend>autoware_universe_utils</depend>
<depend>geometry_msgs</depend>
<depend>nav_msgs</depend>
<depend>radar_msgs</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tf2</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_ros</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radar_tracks_msgs_converter/radar_tracks_msgs_converter_node.hpp"
#include "radar_tracks_msgs_converter_node.hpp"

#include "autoware/universe_utils/geometry/geometry.hpp"
#include "autoware/universe_utils/math/unit_conversion.hpp"
Expand Down Expand Up @@ -56,7 +56,7 @@ bool update_param(
}
} // namespace

namespace radar_tracks_msgs_converter
namespace autoware::radar_tracks_msgs_converter
{

enum class RadarTrackObjectID {
Expand Down Expand Up @@ -407,7 +407,7 @@ uint8_t RadarTracksMsgsConverterNode::convertClassification(const uint16_t class
}
}

} // namespace radar_tracks_msgs_converter
} // namespace autoware::radar_tracks_msgs_converter

#include "rclcpp_components/register_node_macro.hpp"
RCLCPP_COMPONENTS_REGISTER_NODE(radar_tracks_msgs_converter::RadarTracksMsgsConverterNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::radar_tracks_msgs_converter::RadarTracksMsgsConverterNode)
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_TRACKS_MSGS_CONVERTER__RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_
#define RADAR_TRACKS_MSGS_CONVERTER__RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_
#ifndef RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_
#define RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_

#include "autoware/universe_utils/ros/transform_listener.hpp"
#include "rclcpp/rclcpp.hpp"
Expand All @@ -32,7 +32,7 @@
#include <string>
#include <vector>

namespace radar_tracks_msgs_converter
namespace autoware::radar_tracks_msgs_converter
{
using autoware_perception_msgs::msg::DetectedObject;
using autoware_perception_msgs::msg::DetectedObjectKinematics;
Expand Down Expand Up @@ -114,6 +114,6 @@ class RadarTracksMsgsConverterNode : public rclcpp::Node
uint8_t convertClassification(const uint16_t classification);
};

} // namespace radar_tracks_msgs_converter
} // namespace autoware::radar_tracks_msgs_converter

#endif // RADAR_TRACKS_MSGS_CONVERTER__RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_
#endif // RADAR_TRACKS_MSGS_CONVERTER_NODE_HPP_

0 comments on commit 8614acc

Please sign in to comment.