Skip to content

Commit

Permalink
feat: apply autoware_ prefix for control_performance_analysis (#9982
Browse files Browse the repository at this point in the history
)

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

* rename(control_performance_analysis): 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(control_performance_analysis): fix include paths

  * To follow the previous commit

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

* rename: `control_performance_analysis` => `autoware_control_performance_analysis`

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

* style(pre-commit): autofix

* bug(autoware_control_performance_analysis): fix inconsistent namespacing

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

* style(pre-commit): autofix

* update(autoware_control_performance_analysis): `README.md`

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

* bug(autoware_control_performance_analysis): fix critical bugs that contaminate topic name

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

* style(pre-commit): autofix

* fix: update package name for error_rqt_multiplot.xml

Signed-off-by: Ryohsuke Mitsudome <[email protected]>

* fix: update package name for control_performance_plot.py

Signed-off-by: Ryohsuke Mitsudome <[email protected]>

* docs(autoware_control_performance_analysis): update package name in README and CHANGELOG.rst

Signed-off-by: Ryohsuke Mitsudome <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Junya Sasaki <[email protected]>
Signed-off-by: Ryohsuke Mitsudome <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2025
1 parent 2169394 commit ecc93f1
Show file tree
Hide file tree
Showing 22 changed files with 110 additions and 108 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package control_performance_analysis
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package autoware_control_performance_analysis
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.40.0 (2024-12-12)
-------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(control_performance_analysis)
project(autoware_control_performance_analysis)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand All @@ -19,7 +19,7 @@ find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)

rosidl_generate_interfaces(
control_performance_analysis
${PROJECT_NAME}
"msg/Error.msg"
"msg/ErrorStamped.msg"
"msg/DrivingMonitorStamped.msg"
Expand All @@ -40,12 +40,12 @@ ament_auto_add_library(

if(${rosidl_cmake_VERSION} VERSION_LESS 2.5.0)
rosidl_target_interfaces(control_performance_analysis_node
control_performance_analysis "rosidl_typesupport_cpp")
${PROJECT_NAME} "rosidl_typesupport_cpp")
rosidl_target_interfaces(control_performance_analysis_core
control_performance_analysis "rosidl_typesupport_cpp")
${PROJECT_NAME} "rosidl_typesupport_cpp")
else()
rosidl_get_typesupport_target(
cpp_typesupport_target control_performance_analysis "rosidl_typesupport_cpp")
cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")
target_link_libraries(control_performance_analysis_node "${cpp_typesupport_target}")
target_link_libraries(control_performance_analysis_core "${cpp_typesupport_target}")

Expand All @@ -58,8 +58,8 @@ target_link_libraries(

rclcpp_components_register_node(
control_performance_analysis_node
PLUGIN "control_performance_analysis::ControlPerformanceAnalysisNode"
EXECUTABLE control_performance_analysis_exe
PLUGIN "autoware::control_performance_analysis::ControlPerformanceAnalysisNode"
EXECUTABLE ${PROJECT_NAME}_node
)

ament_auto_package(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# control_performance_analysis
# autoware_control_performance_analysis

## Purpose

`control_performance_analysis` is the package to analyze the tracking performance of a control module and monitor the driving status of the vehicle.
`autoware_control_performance_analysis` is the package to analyze the tracking performance of a control module and monitor the driving status of the vehicle.

This package is used as a tool to quantify the results of the control module.
That's why it doesn't interfere with the core logic of autonomous driving.

Based on the various input from planning, control, and vehicle, it publishes the result of analysis as `control_performance_analysis::msg::ErrorStamped` defined in this package.
Based on the various input from planning, control, and vehicle, it publishes the result of analysis as `autoware_control_performance_analysis::msg::ErrorStamped` defined in this package.

All results in `ErrorStamped` message are calculated in Frenet Frame of curve. Errors and velocity errors are calculated by using paper below.

Expand Down Expand Up @@ -35,14 +35,14 @@ Error acceleration calculations are made based on the velocity calculations abov

### Output topics

| Name | Type | Description |
| --------------------------------------- | -------------------------------------------------------- | --------------------------------------------------- |
| `/control_performance/performance_vars` | control_performance_analysis::msg::ErrorStamped | The result of the performance analysis. |
| `/control_performance/driving_status` | control_performance_analysis::msg::DrivingMonitorStamped | Driving status (acceleration, jerk etc.) monitoring |
| Name | Type | Description |
| --------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------- |
| `/control_performance/performance_vars` | autoware_control_performance_analysis::msg::ErrorStamped | The result of the performance analysis. |
| `/control_performance/driving_status` | autoware_control_performance_analysis::msg::DrivingMonitorStamped | Driving status (acceleration, jerk etc.) monitoring |

### Outputs

#### control_performance_analysis::msg::DrivingMonitorStamped
#### autoware_control_performance_analysis::msg::DrivingMonitorStamped

| Name | Type | Description |
| ---------------------------- | ----- | --------------------------------------------------------------------- |
Expand All @@ -53,7 +53,7 @@ Error acceleration calculations are made based on the velocity calculations abov
| `desired_steering_angle` | float | $[ \mathrm{rad} ]$ |
| `controller_processing_time` | float | Timestamp between last two control command messages $[ \mathrm{ms} ]$ |

#### control_performance_analysis::msg::ErrorStamped
#### autoware_control_performance_analysis::msg::ErrorStamped

| Name | Type | Description |
| ------------------------------------------ | ----- | ----------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/lateral_error</field>
Expand All @@ -49,7 +49,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -110,7 +110,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/error_energy</field>
Expand All @@ -123,7 +123,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -184,7 +184,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/lateral_error_velocity</field>
Expand All @@ -197,7 +197,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -260,7 +260,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/heading_error</field>
Expand All @@ -273,7 +273,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -334,7 +334,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/control_effort_energy</field>
Expand All @@ -347,7 +347,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -408,7 +408,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/lateral_error_acceleration</field>
Expand All @@ -421,7 +421,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -484,7 +484,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/value_approximation</field>
Expand All @@ -497,7 +497,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down Expand Up @@ -558,7 +558,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</x_axis>
<y_axis>
<field>error/curvature_estimate</field>
Expand All @@ -571,7 +571,7 @@
<type>0</type>
</scale>
<topic>/control_performance/performance_vars</topic>
<type>control_performance_analysis/ErrorStamped</type>
<type>autoware_control_performance_analysis/ErrorStamped</type>
</y_axis>
</axes>
<color>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 - 2022 Tier IV, Inc., Leo Drive Teknoloji A.Ş.
// Copyright 2021 - 2025 Tier IV, Inc., Leo Drive Teknoloji A.Ş.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_CORE_HPP_
#define CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_CORE_HPP_
#ifndef AUTOWARE__CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_CORE_HPP_
#define AUTOWARE__CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_CORE_HPP_

#include "autoware/control_performance_analysis/control_performance_analysis_utils.hpp"
#include "autoware/motion_utils/trajectory/trajectory.hpp"
#include "control_performance_analysis/control_performance_analysis_utils.hpp"
#include "control_performance_analysis/msg/driving_monitor_stamped.hpp"
#include "control_performance_analysis/msg/error_stamped.hpp"
#include "control_performance_analysis/msg/float_stamped.hpp"
#include "autoware_control_performance_analysis/msg/driving_monitor_stamped.hpp"
#include "autoware_control_performance_analysis/msg/error_stamped.hpp"
#include "autoware_control_performance_analysis/msg/float_stamped.hpp"

#include <Eigen/Core>
#include <rclcpp/time.hpp>
Expand All @@ -37,15 +37,15 @@
#include <utility>
#include <vector>

namespace control_performance_analysis
namespace autoware::control_performance_analysis
{
using autoware_control_msgs::msg::Control;
using autoware_control_performance_analysis::msg::DrivingMonitorStamped;
using autoware_control_performance_analysis::msg::Error;
using autoware_control_performance_analysis::msg::ErrorStamped;
using autoware_control_performance_analysis::msg::FloatStamped;
using autoware_planning_msgs::msg::Trajectory;
using autoware_vehicle_msgs::msg::SteeringReport;
using control_performance_analysis::msg::DrivingMonitorStamped;
using control_performance_analysis::msg::Error;
using control_performance_analysis::msg::ErrorStamped;
using control_performance_analysis::msg::FloatStamped;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::PoseArray;
using geometry_msgs::msg::Twist;
Expand Down Expand Up @@ -129,6 +129,6 @@ class ControlPerformanceAnalysisCore
rclcpp::Logger logger_{rclcpp::get_logger("control_performance_analysis")};
rclcpp::Clock clock_{RCL_ROS_TIME};
};
} // namespace control_performance_analysis
} // namespace autoware::control_performance_analysis

#endif // CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_CORE_HPP_
#endif // AUTOWARE__CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_CORE_HPP_
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 - 2022 Tier IV, Inc., Leo Drive Teknoloji A.Ş.
// Copyright 2021 - 2025 Tier IV, Inc., Leo Drive Teknoloji A.Ş.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_NODE_HPP_
#define CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_NODE_HPP_
#ifndef AUTOWARE__CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_NODE_HPP_
#define AUTOWARE__CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_NODE_HPP_

#include "control_performance_analysis/control_performance_analysis_core.hpp"
#include "control_performance_analysis/msg/driving_monitor_stamped.hpp"
#include "control_performance_analysis/msg/error_stamped.hpp"
#include "autoware/control_performance_analysis/control_performance_analysis_core.hpp"
#include "autoware_control_performance_analysis/msg/driving_monitor_stamped.hpp"
#include "autoware_control_performance_analysis/msg/error_stamped.hpp"

#include <autoware/signal_processing/lowpass_filter_1d.hpp>
#include <autoware/universe_utils/ros/self_pose_listener.hpp>
Expand All @@ -34,13 +34,13 @@
#include <memory>
#include <utility>

namespace control_performance_analysis
namespace autoware::control_performance_analysis
{
using autoware_control_msgs::msg::Control;
using autoware_control_performance_analysis::msg::DrivingMonitorStamped;
using autoware_control_performance_analysis::msg::ErrorStamped;
using autoware_planning_msgs::msg::Trajectory;
using autoware_vehicle_msgs::msg::SteeringReport;
using control_performance_analysis::msg::DrivingMonitorStamped;
using control_performance_analysis::msg::ErrorStamped;
using geometry_msgs::msg::PoseStamped;
using nav_msgs::msg::Odometry;

Expand Down Expand Up @@ -92,6 +92,6 @@ class ControlPerformanceAnalysisNode : public rclcpp::Node
// Algorithm
std::unique_ptr<ControlPerformanceAnalysisCore> control_performance_core_ptr_;
};
} // namespace control_performance_analysis
} // namespace autoware::control_performance_analysis

#endif // CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_NODE_HPP_
#endif // AUTOWARE__CONTROL_PERFORMANCE_ANALYSIS__CONTROL_PERFORMANCE_ANALYSIS_NODE_HPP_
Loading

0 comments on commit ecc93f1

Please sign in to comment.