Skip to content

Commit e9474db

Browse files
committed
refactor(object_recognition_utils): add autoware prefix to object_recognition_utils
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent f256c0b commit e9474db

File tree

83 files changed

+255
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+255
-240
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ common/autoware_grid_map_utils/** maxime.clement@tier4.jp
66
common/autoware_interpolation/** fumiya.watanabe@tier4.jp takayuki.murooka@tier4.jp
77
common/autoware_kalman_filter/** koji.minoda@tier4.jp takeshi.ishita@tier4.jp yukihiro.saito@tier4.jp
88
common/autoware_motion_utils/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp satoshi.ota@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
9+
common/autoware_object_recognition_utils/** shunsuke.miura@tier4.jp takayuki.murooka@tier4.jp yoshi.ri@tier4.jp
910
common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin/** ahmed.ebrahim@leodrive.ai
1011
common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/** khalil@leodrive.ai
1112
common/autoware_path_distance_calculator/** isamu.takagi@tier4.jp
@@ -24,7 +25,6 @@ common/fake_test_node/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.wakabay
2425
common/global_parameter_loader/** ryohsuke.mitsudome@tier4.jp
2526
common/glog_component/** takamasa.horibe@tier4.jp
2627
common/goal_distance_calculator/** taiki.tanaka@tier4.jp
27-
common/object_recognition_utils/** shunsuke.miura@tier4.jp takayuki.murooka@tier4.jp yoshi.ri@tier4.jp
2828
common/osqp_interface/** fumiya.watanabe@tier4.jp maxime.clement@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp
2929
common/polar_grid/** yukihiro.saito@tier4.jp
3030
common/qp_interface/** fumiya.watanabe@tier4.jp maxime.clement@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp

common/object_recognition_utils/CMakeLists.txt common/autoware_object_recognition_utils/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
cmake_minimum_required(VERSION 3.14)
2-
project(object_recognition_utils)
2+
project(autoware_object_recognition_utils)
33

44
find_package(autoware_cmake REQUIRED)
55
autoware_package()
66

77
find_package(Boost REQUIRED)
88

9-
ament_auto_add_library(object_recognition_utils SHARED
9+
ament_auto_add_library(${PROJECT_NAME} SHARED
1010
src/predicted_path_utils.cpp
1111
src/conversion.cpp
1212
)
@@ -19,7 +19,7 @@ if(BUILD_TESTING)
1919
ament_add_ros_isolated_gtest(test_object_recognition_utils ${test_files})
2020

2121
target_link_libraries(test_object_recognition_utils
22-
object_recognition_utils
22+
${PROJECT_NAME}
2323
)
2424
endif()
2525

common/object_recognition_utils/README.md common/autoware_object_recognition_utils/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# object_recognition_utils
1+
# autoware_object_recognition_utils
22

33
## Purpose
44

common/object_recognition_utils/include/object_recognition_utils/conversion.hpp common/autoware_object_recognition_utils/include/autoware/object_recognition_utils/conversion.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef OBJECT_RECOGNITION_UTILS__CONVERSION_HPP_
16-
#define OBJECT_RECOGNITION_UTILS__CONVERSION_HPP_
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__CONVERSION_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__CONVERSION_HPP_
1717

1818
#include <autoware_perception_msgs/msg/detected_objects.hpp>
1919
#include <autoware_perception_msgs/msg/tracked_objects.hpp>
2020

21-
namespace object_recognition_utils
21+
namespace autoware::object_recognition_utils
2222
{
2323
using autoware_perception_msgs::msg::DetectedObject;
2424
using autoware_perception_msgs::msg::DetectedObjects;
@@ -28,6 +28,6 @@ using autoware_perception_msgs::msg::TrackedObjects;
2828
DetectedObject toDetectedObject(const TrackedObject & tracked_object);
2929
DetectedObjects toDetectedObjects(const TrackedObjects & tracked_objects);
3030
TrackedObject toTrackedObject(const DetectedObject & detected_object);
31-
} // namespace object_recognition_utils
31+
} // namespace autoware::object_recognition_utils
3232

33-
#endif // OBJECT_RECOGNITION_UTILS__CONVERSION_HPP_
33+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__CONVERSION_HPP_

common/object_recognition_utils/include/object_recognition_utils/geometry.hpp common/autoware_object_recognition_utils/include/autoware/object_recognition_utils/geometry.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef OBJECT_RECOGNITION_UTILS__GEOMETRY_HPP_
16-
#define OBJECT_RECOGNITION_UTILS__GEOMETRY_HPP_
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__GEOMETRY_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__GEOMETRY_HPP_
1717

1818
#include <autoware_perception_msgs/msg/detected_object.hpp>
1919
#include <autoware_perception_msgs/msg/predicted_object.hpp>
2020
#include <autoware_perception_msgs/msg/tracked_object.hpp>
2121
#include <geometry_msgs/msg/pose.hpp>
2222

23-
namespace object_recognition_utils
23+
namespace autoware::object_recognition_utils
2424
{
2525
template <class T>
2626
geometry_msgs::msg::Pose getPose([[maybe_unused]] const T & p)
@@ -52,6 +52,6 @@ inline geometry_msgs::msg::Pose getPose(const autoware_perception_msgs::msg::Pre
5252
{
5353
return obj.kinematics.initial_pose_with_covariance.pose;
5454
}
55-
} // namespace object_recognition_utils
55+
} // namespace autoware::object_recognition_utils
5656

57-
#endif // OBJECT_RECOGNITION_UTILS__GEOMETRY_HPP_
57+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__GEOMETRY_HPP_

common/object_recognition_utils/include/object_recognition_utils/matching.hpp common/autoware_object_recognition_utils/include/autoware/object_recognition_utils/matching.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef OBJECT_RECOGNITION_UTILS__MATCHING_HPP_
16-
#define OBJECT_RECOGNITION_UTILS__MATCHING_HPP_
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__MATCHING_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__MATCHING_HPP_
1717

18+
#include "autoware/object_recognition_utils/geometry.hpp"
1819
#include "autoware/universe_utils/geometry/boost_geometry.hpp"
1920
#include "autoware/universe_utils/geometry/boost_polygon_utils.hpp"
20-
#include "object_recognition_utils/geometry.hpp"
2121

2222
#include <boost/geometry.hpp>
2323

@@ -26,7 +26,7 @@
2626
#include <utility>
2727
#include <vector>
2828

29-
namespace object_recognition_utils
29+
namespace autoware::object_recognition_utils
3030
{
3131
using autoware::universe_utils::Polygon2d;
3232
// minimum area to avoid division by zero
@@ -126,6 +126,6 @@ double get2dRecall(const T1 source_object, const T2 target_object)
126126

127127
return std::min(1.0, intersection_area / target_area);
128128
}
129-
} // namespace object_recognition_utils
129+
} // namespace autoware::object_recognition_utils
130130

131-
#endif // OBJECT_RECOGNITION_UTILS__MATCHING_HPP_
131+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__MATCHING_HPP_

common/object_recognition_utils/include/object_recognition_utils/object_classification.hpp common/autoware_object_recognition_utils/include/autoware/object_recognition_utils/object_classification.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef OBJECT_RECOGNITION_UTILS__OBJECT_CLASSIFICATION_HPP_
16-
#define OBJECT_RECOGNITION_UTILS__OBJECT_CLASSIFICATION_HPP_
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__OBJECT_CLASSIFICATION_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__OBJECT_CLASSIFICATION_HPP_
1717

1818
#include "autoware_perception_msgs/msg/object_classification.hpp"
1919

2020
#include <string>
2121
#include <vector>
2222

23-
namespace object_recognition_utils
23+
namespace autoware::object_recognition_utils
2424
{
2525
using autoware_perception_msgs::msg::ObjectClassification;
2626

@@ -169,6 +169,6 @@ inline std::string convertLabelToString(
169169
return convertLabelToString(highest_prob_label);
170170
}
171171

172-
} // namespace object_recognition_utils
172+
} // namespace autoware::object_recognition_utils
173173

174-
#endif // OBJECT_RECOGNITION_UTILS__OBJECT_CLASSIFICATION_HPP_
174+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__OBJECT_CLASSIFICATION_HPP_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2022 TIER IV, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__OBJECT_RECOGNITION_UTILS_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__OBJECT_RECOGNITION_UTILS_HPP_
17+
18+
#include "autoware/object_recognition_utils/conversion.hpp"
19+
#include "autoware/object_recognition_utils/geometry.hpp"
20+
#include "autoware/object_recognition_utils/matching.hpp"
21+
#include "autoware/object_recognition_utils/object_classification.hpp"
22+
#include "autoware/object_recognition_utils/predicted_path_utils.hpp"
23+
#include "autoware/object_recognition_utils/transform.hpp"
24+
25+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__OBJECT_RECOGNITION_UTILS_HPP_

common/object_recognition_utils/include/object_recognition_utils/predicted_path_utils.hpp common/autoware_object_recognition_utils/include/autoware/object_recognition_utils/predicted_path_utils.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef OBJECT_RECOGNITION_UTILS__PREDICTED_PATH_UTILS_HPP_
16-
#define OBJECT_RECOGNITION_UTILS__PREDICTED_PATH_UTILS_HPP_
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__PREDICTED_PATH_UTILS_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__PREDICTED_PATH_UTILS_HPP_
1717

1818
#include "autoware/universe_utils/geometry/geometry.hpp"
1919

@@ -24,7 +24,7 @@
2424

2525
#include <vector>
2626

27-
namespace object_recognition_utils
27+
namespace autoware::object_recognition_utils
2828
{
2929
/**
3030
* @brief Calculate Interpolated Pose from predicted path by time
@@ -61,6 +61,6 @@ autoware_perception_msgs::msg::PredictedPath resamplePredictedPath(
6161
const autoware_perception_msgs::msg::PredictedPath & path, const double sampling_time_interval,
6262
const double sampling_horizon, const bool use_spline_for_xy = true,
6363
const bool use_spline_for_z = false);
64-
} // namespace object_recognition_utils
64+
} // namespace autoware::object_recognition_utils
6565

66-
#endif // OBJECT_RECOGNITION_UTILS__PREDICTED_PATH_UTILS_HPP_
66+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__PREDICTED_PATH_UTILS_HPP_

common/object_recognition_utils/include/object_recognition_utils/transform.hpp common/autoware_object_recognition_utils/include/autoware/object_recognition_utils/transform.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef OBJECT_RECOGNITION_UTILS__TRANSFORM_HPP_
16-
#define OBJECT_RECOGNITION_UTILS__TRANSFORM_HPP_
15+
#ifndef AUTOWARE__OBJECT_RECOGNITION_UTILS__TRANSFORM_HPP_
16+
#define AUTOWARE__OBJECT_RECOGNITION_UTILS__TRANSFORM_HPP_
1717

1818
#include <pcl_ros/transforms.hpp>
1919

@@ -71,7 +71,7 @@ namespace detail
7171
}
7272
} // namespace detail
7373

74-
namespace object_recognition_utils
74+
namespace autoware::object_recognition_utils
7575
{
7676
template <class T>
7777
bool transformObjects(
@@ -147,6 +147,6 @@ bool transformObjectsWithFeature(
147147
}
148148
return true;
149149
}
150-
} // namespace object_recognition_utils
150+
} // namespace autoware::object_recognition_utils
151151

152-
#endif // OBJECT_RECOGNITION_UTILS__TRANSFORM_HPP_
152+
#endif // AUTOWARE__OBJECT_RECOGNITION_UTILS__TRANSFORM_HPP_

common/object_recognition_utils/package.xml common/autoware_object_recognition_utils/package.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
4-
<name>object_recognition_utils</name>
4+
<name>autoware_object_recognition_utils</name>
55
<version>0.1.0</version>
6-
<description>The object_recognition_utils package</description>
6+
<description>The autoware_object_recognition_utils package</description>
77
<maintainer email="takayuki.murooka@tier4.jp">Takayuki Murooka</maintainer>
88
<maintainer email="shunsuke.miura@tier4.jp">Shunsuke Miura</maintainer>
99
<maintainer email="yoshi.ri@tier4.jp">Yoshi Ri</maintainer>

common/object_recognition_utils/src/conversion.cpp common/autoware_object_recognition_utils/src/conversion.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "object_recognition_utils/conversion.hpp"
15+
#include "autoware/object_recognition_utils/conversion.hpp"
1616

17-
namespace object_recognition_utils
17+
namespace autoware::object_recognition_utils
1818
{
1919
using autoware_perception_msgs::msg::DetectedObject;
2020
using autoware_perception_msgs::msg::DetectedObjects;
@@ -68,4 +68,4 @@ TrackedObject toTrackedObject(const DetectedObject & detected_object)
6868
tracked_object.shape = detected_object.shape;
6969
return tracked_object;
7070
}
71-
} // namespace object_recognition_utils
71+
} // namespace autoware::object_recognition_utils

common/object_recognition_utils/src/predicted_path_utils.cpp common/autoware_object_recognition_utils/src/predicted_path_utils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "object_recognition_utils/predicted_path_utils.hpp"
15+
#include "autoware/object_recognition_utils/predicted_path_utils.hpp"
1616

1717
#include "autoware/interpolation/linear_interpolation.hpp"
1818
#include "autoware/interpolation/spherical_linear_interpolation.hpp"
1919
#include "autoware/interpolation/spline_interpolation.hpp"
2020

2121
#include <algorithm>
2222

23-
namespace object_recognition_utils
23+
namespace autoware::object_recognition_utils
2424
{
2525
boost::optional<geometry_msgs::msg::Pose> calcInterpolatedPose(
2626
const autoware_perception_msgs::msg::PredictedPath & path, const double relative_time)
@@ -129,4 +129,4 @@ autoware_perception_msgs::msg::PredictedPath resamplePredictedPath(
129129
resampled_path.time_step = rclcpp::Duration::from_seconds(sampling_time_interval);
130130
return resampled_path;
131131
}
132-
} // namespace object_recognition_utils
132+
} // namespace autoware::object_recognition_utils

common/object_recognition_utils/test/src/test_conversion.cpp common/autoware_object_recognition_utils/test/src/test_conversion.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include "autoware/object_recognition_utils/conversion.hpp"
1516
#include "autoware/universe_utils/geometry/geometry.hpp"
16-
#include "object_recognition_utils/conversion.hpp"
1717

1818
#include <gtest/gtest.h>
1919

@@ -42,8 +42,8 @@ autoware_perception_msgs::msg::ObjectClassification createObjectClassification(
4242
// NOTE: covariance is not checked
4343
TEST(conversion, test_toDetectedObject)
4444
{
45+
using autoware::object_recognition_utils::toDetectedObject;
4546
using autoware_perception_msgs::msg::ObjectClassification;
46-
using object_recognition_utils::toDetectedObject;
4747

4848
autoware_perception_msgs::msg::TrackedObject tracked_obj;
4949
// existence probability
@@ -160,8 +160,8 @@ TEST(conversion, test_toDetectedObject)
160160
// NOTE: covariance is not checked
161161
TEST(conversion, test_toTrackedObject)
162162
{
163+
using autoware::object_recognition_utils::toTrackedObject;
163164
using autoware_perception_msgs::msg::ObjectClassification;
164-
using object_recognition_utils::toTrackedObject;
165165

166166
autoware_perception_msgs::msg::DetectedObject detected_obj;
167167
// existence probability

common/object_recognition_utils/test/src/test_geometry.cpp common/autoware_object_recognition_utils/test/src/test_geometry.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "object_recognition_utils/geometry.hpp"
15+
#include "autoware/object_recognition_utils/geometry.hpp"
1616

1717
#include <gtest/gtest.h>
1818

1919
#include <string>
2020

2121
TEST(geometry, getPose)
2222
{
23-
using object_recognition_utils::getPose;
23+
using autoware::object_recognition_utils::getPose;
2424

2525
const double x_ans = 1.0;
2626
const double y_ans = 2.0;

common/object_recognition_utils/test/src/test_matching.cpp common/autoware_object_recognition_utils/test/src/test_matching.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include "autoware/object_recognition_utils/matching.hpp"
1516
#include "autoware/universe_utils/geometry/geometry.hpp"
16-
#include "object_recognition_utils/matching.hpp"
1717

1818
#include <autoware_perception_msgs/msg/detected_object.hpp>
1919

@@ -37,8 +37,8 @@ geometry_msgs::msg::Pose createPose(const double x, const double y, const double
3737

3838
TEST(matching, test_get2dIoU)
3939
{
40+
using autoware::object_recognition_utils::get2dIoU;
4041
using autoware_perception_msgs::msg::DetectedObject;
41-
using object_recognition_utils::get2dIoU;
4242

4343
const double quart_circle = 0.16237976320958225;
4444

@@ -93,7 +93,7 @@ TEST(matching, test_get2dIoU)
9393

9494
TEST(object_recognition_utils, test_get2dGeneralizedIoU)
9595
{
96-
using object_recognition_utils::get2dGeneralizedIoU;
96+
using autoware::object_recognition_utils::get2dGeneralizedIoU;
9797
// TODO(Shin-kyoto):
9898
// get2dGeneralizedIoU uses outer points of each polygon.
9999
// But these points contain an sampling error of outer line,
@@ -153,8 +153,8 @@ TEST(object_recognition_utils, test_get2dGeneralizedIoU)
153153

154154
TEST(matching, test_get2dPrecision)
155155
{
156+
using autoware::object_recognition_utils::get2dPrecision;
156157
using autoware_perception_msgs::msg::DetectedObject;
157-
using object_recognition_utils::get2dPrecision;
158158
const double quart_circle = 0.16237976320958225;
159159

160160
{ // non overlapped
@@ -220,8 +220,8 @@ TEST(matching, test_get2dPrecision)
220220

221221
TEST(matching, test_get2dRecall)
222222
{
223+
using autoware::object_recognition_utils::get2dRecall;
223224
using autoware_perception_msgs::msg::DetectedObject;
224-
using object_recognition_utils::get2dRecall;
225225
const double quart_circle = 0.16237976320958225;
226226

227227
{ // non overlapped

0 commit comments

Comments
 (0)