Skip to content

Commit

Permalink
feat: apply autoware_ prefix for perception_online_evaluator (#9956)
Browse files Browse the repository at this point in the history
* feat(perception_online_evaluator): apply `autoware_` prefix (see below):

  * 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 <[email protected]>

* bug(perception_online_evaluator): remove duplicated properties

  * It seems the `motion_evaluator` is defined and used in the `autoware_planning_evaluator`

Signed-off-by: Junya Sasaki <[email protected]>

* rename(perception_online_evaluator): 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 <[email protected]>

* fix(perception_online_evaluator): fix include paths

  * To follow the previous commit

Signed-off-by: Junya Sasaki <[email protected]>

* rename: `perception_online_evaluator` => `autoware_perception_online_evaluator`

Signed-off-by: Junya Sasaki <[email protected]>

* style(pre-commit): autofix

* bug(autoware_perception_online_evaluator): revert wrongly updated copyright

Signed-off-by: Junya Sasaki <[email protected]>

* bug(autoware_perception_online_evaluator): `autoware_` prefix is not needed here

Signed-off-by: Junya Sasaki <[email protected]>

* update: `CODEOWNERS`

Signed-off-by: Junya Sasaki <[email protected]>

* bug(autoware_perception_online_evaluator): fix a wrong package name

Signed-off-by: Junya Sasaki <[email protected]>

---------

Signed-off-by: Junya Sasaki <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
sasakisasaki and pre-commit-ci[bot] authored Jan 22, 2025
1 parent d03152b commit 8418ae9
Show file tree
Hide file tree
Showing 30 changed files with 121 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ evaluator/autoware_control_evaluator/** [email protected] kosuke.takeuchi@
evaluator/autoware_planning_evaluator/** [email protected] [email protected] [email protected]
evaluator/kinematic_evaluator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
evaluator/localization_evaluator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
evaluator/perception_online_evaluator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
evaluator/autoware_perception_online_evaluator/** [email protected] [email protected] [email protected] [email protected] [email protected] yoshi.ri@tier4.jp junya.sasaki@tier4.jp
evaluator/scenario_simulator_v2_adapter/** [email protected] [email protected] [email protected] [email protected]
launch/tier4_autoware_api_launch/** [email protected] [email protected]
launch/tier4_control_launch/** [email protected] [email protected]
Expand Down
39 changes: 39 additions & 0 deletions evaluator/autoware_perception_online_evaluator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_perception_online_evaluator)

find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(pluginlib REQUIRED)

ament_auto_add_library(${PROJECT_NAME} SHARED
src/metrics_calculator.cpp
src/perception_online_evaluator_node.cpp
src/metrics/deviation_metrics.cpp
src/metrics/detection_count.cpp
src/utils/marker_utils.cpp
src/utils/objects_filtering.cpp
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::perception_diagnostics::PerceptionOnlineEvaluatorNode"
EXECUTABLE ${PROJECT_NAME}_node
)

target_link_libraries(${PROJECT_NAME} glog::glog)

if(BUILD_TESTING)
ament_add_ros_isolated_gtest(test_perception_online_evaluator_node
test/test_perception_online_evaluator_node.cpp
TIMEOUT 300
)
target_link_libraries(test_perception_online_evaluator_node
${PROJECT_NAME}
)
endif()

ament_auto_package(
INSTALL_TO_SHARE
param
launch
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PERCEPTION_ONLINE_EVALUATOR__METRICS__DETECTION_COUNT_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__METRICS__DETECTION_COUNT_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__DETECTION_COUNT_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__DETECTION_COUNT_HPP_

#include "perception_online_evaluator/parameters.hpp"
#include "autoware/perception_online_evaluator/parameters.hpp"
#include "tf2_ros/buffer.h"

#include <rclcpp/rclcpp.hpp>
Expand All @@ -32,7 +32,7 @@
#include <unordered_map>
#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
namespace metrics
{
Expand Down Expand Up @@ -143,6 +143,6 @@ class DetectionCounter
seen_uuids_;
};
} // namespace metrics
} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__METRICS__DETECTION_COUNT_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__DETECTION_COUNT_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PERCEPTION_ONLINE_EVALUATOR__METRICS__DEVIATION_METRICS_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__METRICS__DEVIATION_METRICS_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__DEVIATION_METRICS_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__DEVIATION_METRICS_HPP_

#include <autoware_perception_msgs/msg/predicted_path.hpp>
#include <geometry_msgs/msg/pose.hpp>

#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
namespace metrics
{
Expand All @@ -44,6 +44,6 @@ double calcLateralDeviation(const std::vector<Pose> & ref_path, const Pose & tar
double calcYawDeviation(const std::vector<Pose> & ref_path, const Pose & target_pose);

} // namespace metrics
} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__METRICS__DEVIATION_METRICS_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__DEVIATION_METRICS_HPP_
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 PERCEPTION_ONLINE_EVALUATOR__METRICS__METRIC_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__METRICS__METRIC_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__METRIC_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__METRIC_HPP_

#include "autoware/universe_utils/math/accumulator.hpp"

Expand All @@ -23,7 +23,7 @@
#include <variant>
#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
/**
* @brief Enumeration of trajectory metrics
Expand Down Expand Up @@ -90,6 +90,6 @@ static struct CheckCorrectMaps
} check;

} // namespace details
} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__METRICS__METRIC_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS__METRIC_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PERCEPTION_ONLINE_EVALUATOR__METRICS_CALCULATOR_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__METRICS_CALCULATOR_HPP_

#include "perception_online_evaluator/metrics/detection_count.hpp"
#include "perception_online_evaluator/metrics/deviation_metrics.hpp"
#include "perception_online_evaluator/metrics/metric.hpp"
#include "perception_online_evaluator/parameters.hpp"
#include "perception_online_evaluator/utils/objects_filtering.hpp"
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS_CALCULATOR_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS_CALCULATOR_HPP_

#include "autoware/perception_online_evaluator/metrics/detection_count.hpp"
#include "autoware/perception_online_evaluator/metrics/deviation_metrics.hpp"
#include "autoware/perception_online_evaluator/metrics/metric.hpp"
#include "autoware/perception_online_evaluator/parameters.hpp"
#include "autoware/perception_online_evaluator/utils/objects_filtering.hpp"
#include "tf2_ros/buffer.h"

#include <rclcpp/time.hpp>
Expand All @@ -38,7 +38,7 @@
#include <utility>
#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
using autoware_perception_msgs::msg::PredictedObject;
using autoware_perception_msgs::msg::PredictedObjects;
Expand Down Expand Up @@ -160,6 +160,6 @@ class MetricsCalculator

}; // class MetricsCalculator

} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__METRICS_CALCULATOR_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__METRICS_CALCULATOR_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PERCEPTION_ONLINE_EVALUATOR__PARAMETERS_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__PARAMETERS_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__PARAMETERS_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__PARAMETERS_HPP_

#include "perception_online_evaluator/metrics/metric.hpp"
#include "autoware/perception_online_evaluator/metrics/metric.hpp"

#include <unordered_map>
#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
/**
* @brief Enumeration of perception metrics
Expand Down Expand Up @@ -64,6 +64,6 @@ struct Parameters
std::unordered_map<uint8_t, ObjectParameter> object_parameters;
};

} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__PARAMETERS_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__PARAMETERS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PERCEPTION_ONLINE_EVALUATOR__PERCEPTION_ONLINE_EVALUATOR_NODE_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__PERCEPTION_ONLINE_EVALUATOR_NODE_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__PERCEPTION_ONLINE_EVALUATOR_NODE_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__PERCEPTION_ONLINE_EVALUATOR_NODE_HPP_

#include "autoware/perception_online_evaluator/metrics_calculator.hpp"
#include "autoware/perception_online_evaluator/parameters.hpp"
#include "autoware/universe_utils/math/accumulator.hpp"
#include "perception_online_evaluator/metrics_calculator.hpp"
#include "perception_online_evaluator/parameters.hpp"
#include "rclcpp/rclcpp.hpp"
#include "tf2_ros/buffer.h"
#include "tf2_ros/transform_listener.h"
Expand All @@ -34,7 +34,7 @@
#include <string>
#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
using autoware::universe_utils::Accumulator;
using autoware_perception_msgs::msg::ObjectClassification;
Expand Down Expand Up @@ -108,6 +108,6 @@ class PerceptionOnlineEvaluatorNode : public rclcpp::Node
// Debug
void publishDebugMarker();
};
} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__PERCEPTION_ONLINE_EVALUATOR_NODE_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__PERCEPTION_ONLINE_EVALUATOR_NODE_HPP_
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 PERCEPTION_ONLINE_EVALUATOR__UTILS__MARKER_UTILS_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__UTILS__MARKER_UTILS_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__UTILS__MARKER_UTILS_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__UTILS__MARKER_UTILS_HPP_

#include <autoware_vehicle_info_utils/vehicle_info.hpp>

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

namespace marker_utils
namespace autoware::perception_diagnostics::marker_utils
{

using autoware::universe_utils::Polygon2d;
Expand Down Expand Up @@ -77,6 +77,6 @@ MarkerArray createDeviationLines(
const std::vector<Pose> & poses1, const std::vector<Pose> & poses2, const std::string & ns,
const int32_t & first_id, const float r, const float g, const float b);

} // namespace marker_utils
} // namespace autoware::perception_diagnostics::marker_utils

#endif // PERCEPTION_ONLINE_EVALUATOR__UTILS__MARKER_UTILS_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__UTILS__MARKER_UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef PERCEPTION_ONLINE_EVALUATOR__UTILS__OBJECTS_FILTERING_HPP_
#define PERCEPTION_ONLINE_EVALUATOR__UTILS__OBJECTS_FILTERING_HPP_
#ifndef AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__UTILS__OBJECTS_FILTERING_HPP_
#define AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__UTILS__OBJECTS_FILTERING_HPP_

#include "perception_online_evaluator/parameters.hpp"
#include "autoware/perception_online_evaluator/parameters.hpp"

#include <autoware_perception_msgs/msg/object_classification.hpp>
#include <autoware_perception_msgs/msg/predicted_object.hpp>
Expand All @@ -31,7 +31,7 @@
* most of this file is copied from objects_filtering.hpp in safety_check of behavior_path_planner
*/

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{

using autoware_perception_msgs::msg::ObjectClassification;
Expand Down Expand Up @@ -170,6 +170,6 @@ PredictedObjects filterObjectsByVelocity(
PredictedObjects filterObjectsByVelocity(
const PredictedObjects & objects, double velocity_threshold, double max_velocity);

} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics

#endif // PERCEPTION_ONLINE_EVALUATOR__UTILS__OBJECTS_FILTERING_HPP_
#endif // AUTOWARE__PERCEPTION_ONLINE_EVALUATOR__UTILS__OBJECTS_FILTERING_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

<!-- perception evaluator -->
<group>
<node name="perception_online_evaluator" exec="perception_online_evaluator" pkg="perception_online_evaluator">
<param from="$(find-pkg-share perception_online_evaluator)/param/perception_online_evaluator.defaults.yaml"/>
<node pkg="autoware_perception_online_evaluator" exec="autoware_perception_online_evaluator_node">
<param from="$(find-pkg-share autoware_perception_online_evaluator)/param/perception_online_evaluator.defaults.yaml"/>
<remap from="~/input/objects" to="$(var input/objects)"/>
<remap from="~/metrics" to="/perception/perception_online_evaluator/metrics"/>
<remap from="~/markers" to="/perception/perception_online_evaluator/markers"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>perception_online_evaluator</name>
<name>autoware_perception_online_evaluator</name>
<version>0.40.0</version>
<description>ROS 2 node for evaluating perception</description>
<maintainer email="[email protected]">Fumiya Watanabe</maintainer>
Expand All @@ -10,6 +10,7 @@
<maintainer email="[email protected]">Kyoichi Sugahara</maintainer>
<maintainer email="[email protected]">Shunsuke Miura</maintainer>
<maintainer email="[email protected]">Yoshi Ri</maintainer>
<maintainer email="[email protected]">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<author email="[email protected]">Kosuke Takeuchi</author>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "perception_online_evaluator/metrics/detection_count.hpp"
#include "autoware/perception_online_evaluator/metrics/detection_count.hpp"

#include "autoware/object_recognition_utils/object_recognition_utils.hpp"
#include "autoware/perception_online_evaluator/utils/objects_filtering.hpp"
#include "autoware/universe_utils/geometry/geometry.hpp"
#include "perception_online_evaluator/utils/objects_filtering.hpp"

#include <autoware/universe_utils/ros/uuid_helper.hpp>

Expand All @@ -25,7 +25,7 @@
#include <unordered_map>
#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
namespace metrics
{
Expand Down Expand Up @@ -236,4 +236,4 @@ void DetectionCounter::purgeOldRecords(rclcpp::Time current_time)
}
}
} // namespace metrics
} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics
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 "perception_online_evaluator/metrics/deviation_metrics.hpp"
#include "autoware/perception_online_evaluator/metrics/deviation_metrics.hpp"

#include "autoware/universe_utils/geometry/geometry.hpp"
#include "autoware/universe_utils/geometry/pose_deviation.hpp"
Expand All @@ -21,7 +21,7 @@

#include <vector>

namespace perception_diagnostics
namespace autoware::perception_diagnostics
{
namespace metrics
{
Expand Down Expand Up @@ -50,4 +50,4 @@ double calcYawDeviation(const std::vector<Pose> & ref_path, const Pose & target_
}

} // namespace metrics
} // namespace perception_diagnostics
} // namespace autoware::perception_diagnostics
Loading

0 comments on commit 8418ae9

Please sign in to comment.