From 7ca347e97d2ac9c1a15b99777d2dcd7ee7fd64fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:56:50 +0000 Subject: [PATCH] style(pre-commit): autofix --- .../launch_file_analyse/launch_xml_parser.py | 6 ++-- .../launch_file_analyse/string_utils.py | 6 ++-- .../logging_level_configure.hpp | 4 +-- control_data_collecting_tool/README.md | 31 ++++++++++--------- .../scripts/courses/reversal_loop_circle.py | 6 ++-- ...ecting_pure_pursuit_trajectory_follower.py | 6 ++-- .../perception_replayer_common.py | 8 +++-- .../perception_reproducer.py | 6 ++-- 8 files changed, 38 insertions(+), 35 deletions(-) diff --git a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/launch_xml_parser.py b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/launch_xml_parser.py index fd253d94..695ab85f 100644 --- a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/launch_xml_parser.py +++ b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/launch_xml_parser.py @@ -223,9 +223,9 @@ def process_include_tag( local_context, base_namespace, ) - temp_context[ - name - ] = value # temp_context is used to pass arguments to the included file and updated on the fly for each argument + temp_context[name] = ( + value # temp_context is used to pass arguments to the included file and updated on the fly for each argument + ) for key in argument_dict: temp_context[key] = argument_dict[key] if included_file: diff --git a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/string_utils.py b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/string_utils.py index 1d2b7148..ec956508 100644 --- a/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/string_utils.py +++ b/common/autoware_debug_tools/autoware_debug_tools/topic_connection_checker/launch_file_analyse/string_utils.py @@ -22,9 +22,9 @@ def find_package(package_name) -> str: BASE_PROJECT_MAPPING[package_name] = get_package_share_directory(package_name) else: - BASE_PROJECT_MAPPING[ - package_name - ] = f"/opt/ros/humble/share/{package_name}" # use this for temporal solution; + BASE_PROJECT_MAPPING[package_name] = ( + f"/opt/ros/humble/share/{package_name}" # use this for temporal solution; + ) return BASE_PROJECT_MAPPING[package_name] diff --git a/common/tier4_logging_level_configure_rviz_plugin/include/tier4_logging_level_configure_rviz_plugin/logging_level_configure.hpp b/common/tier4_logging_level_configure_rviz_plugin/include/tier4_logging_level_configure_rviz_plugin/logging_level_configure.hpp index 37d70b49..044966e3 100644 --- a/common/tier4_logging_level_configure_rviz_plugin/include/tier4_logging_level_configure_rviz_plugin/logging_level_configure.hpp +++ b/common/tier4_logging_level_configure_rviz_plugin/include/tier4_logging_level_configure_rviz_plugin/logging_level_configure.hpp @@ -51,9 +51,9 @@ struct LoggerNamespaceInfo }; class LoggingLevelConfigureRvizPlugin : public rviz_common::Panel { - Q_OBJECT // This macro is needed for Qt to handle slots and signals +Q_OBJECT // This macro is needed for Qt to handle slots and signals - public : LoggingLevelConfigureRvizPlugin(QWidget * parent = nullptr); + public : LoggingLevelConfigureRvizPlugin(QWidget * parent = nullptr); void onInitialize() override; void save(rviz_common::Config config) const override; void load(const rviz_common::Config & config) override; diff --git a/control_data_collecting_tool/README.md b/control_data_collecting_tool/README.md index 6a51a257..86cdedc6 100644 --- a/control_data_collecting_tool/README.md +++ b/control_data_collecting_tool/README.md @@ -234,21 +234,22 @@ ROS 2 parameters which are common in all trajectories (`/config/common_param.yam | `steer_rate_lim` | `double` | Steering angle rate limit [rad/s] | 0.6 | The following parameters are common to all trajectories but can be defined individually for each trajectory. (`/config/course_param/COURSE_NAME_param.yaml`): -| Name | Type | Description | Default value | -| :--------------------------------------- | :------- | :-------------------------------------------------------------------------------------------------- | :------------- | -| `COLLECTING_DATA_V_MIN` | `double` | Minimum velocity for data collection [m/s] | 0.5 | -| `COLLECTING_DATA_V_MAX` | `double` | Maximum velocity for data collection [m/s] | 8.0 | -| `COLLECTING_DATA_A_MIN` | `double` | Minimum velocity for data collection [m/s^2] | 1.0 | -| `COLLECTING_DATA_A_MAX` | `double` | Maximum velocity for data collection [m/s^2] | -1.0 | -| `longitudinal_velocity_noise_amp` | `double` | Target longitudinal velocity additional sine noise amplitude [m/s] | 0.01 | -| `longitudinal_velocity_noise_min_period` | `double` | Target longitudinal velocity additional sine noise minimum period [s] | 5.0 | -| `longitudinal_velocity_noise_max_period` | `double` | Target longitudinal velocity additional sine noise maximum period [s] | 20.0 | -| `acc_noise_amp` | `double` | Accel command additional sine noise amplitude [m/ss] | 0.01 | -| `acc_noise_min_period` | `double` | Accel command additional sine noise minimum period [s] | 5.0 | -| `acc_noise_max_period` | `double` | Accel command additional sine noise maximum period [s] | 20.0 | -| `steer_noise_amp` | `double` | Steer command additional sine noise amplitude [rad] | 0.01 | -| `steer_noise_max_period` | `double` | Steer command additional sine noise maximum period [s] | 5.0 | -| `steer_noise_min_period` | `double` | Steer command additional sine noise minimum period [s] | 20.0 | + +| Name | Type | Description | Default value | +| :--------------------------------------- | :------- | :-------------------------------------------------------------------- | :------------ | +| `COLLECTING_DATA_V_MIN` | `double` | Minimum velocity for data collection [m/s] | 0.5 | +| `COLLECTING_DATA_V_MAX` | `double` | Maximum velocity for data collection [m/s] | 8.0 | +| `COLLECTING_DATA_A_MIN` | `double` | Minimum velocity for data collection [m/s^2] | 1.0 | +| `COLLECTING_DATA_A_MAX` | `double` | Maximum velocity for data collection [m/s^2] | -1.0 | +| `longitudinal_velocity_noise_amp` | `double` | Target longitudinal velocity additional sine noise amplitude [m/s] | 0.01 | +| `longitudinal_velocity_noise_min_period` | `double` | Target longitudinal velocity additional sine noise minimum period [s] | 5.0 | +| `longitudinal_velocity_noise_max_period` | `double` | Target longitudinal velocity additional sine noise maximum period [s] | 20.0 | +| `acc_noise_amp` | `double` | Accel command additional sine noise amplitude [m/ss] | 0.01 | +| `acc_noise_min_period` | `double` | Accel command additional sine noise minimum period [s] | 5.0 | +| `acc_noise_max_period` | `double` | Accel command additional sine noise maximum period [s] | 20.0 | +| `steer_noise_amp` | `double` | Steer command additional sine noise amplitude [rad] | 0.01 | +| `steer_noise_max_period` | `double` | Steer command additional sine noise maximum period [s] | 5.0 | +| `steer_noise_min_period` | `double` | Steer command additional sine noise minimum period [s] | 20.0 | ### Course-Specific Parameters diff --git a/control_data_collecting_tool/scripts/courses/reversal_loop_circle.py b/control_data_collecting_tool/scripts/courses/reversal_loop_circle.py index 2fb26d8e..a053c02f 100644 --- a/control_data_collecting_tool/scripts/courses/reversal_loop_circle.py +++ b/control_data_collecting_tool/scripts/courses/reversal_loop_circle.py @@ -818,9 +818,9 @@ def __init__(self, step: float, param_dict): self.trajectory_nearly_straight_clock_wise[self.steer_list[i]] = trajectory # Generate and store counterclockwise trajectories by reversing the clockwise trajectory. - self.trajectory_nearly_straight_counter_clock_wise[ - self.steer_list[i] - ] = reverse_trajectory_segment(trajectory) + self.trajectory_nearly_straight_counter_clock_wise[self.steer_list[i]] = ( + reverse_trajectory_segment(trajectory) + ) # Generate trajectories for changing directions (turning). diff --git a/control_data_collecting_tool/scripts/data_collecting_pure_pursuit_trajectory_follower.py b/control_data_collecting_tool/scripts/data_collecting_pure_pursuit_trajectory_follower.py index 57d01bdb..23c00e05 100755 --- a/control_data_collecting_tool/scripts/data_collecting_pure_pursuit_trajectory_follower.py +++ b/control_data_collecting_tool/scripts/data_collecting_pure_pursuit_trajectory_follower.py @@ -526,9 +526,9 @@ def control(self): # [2] publish cmd control_cmd_msg = AckermannControlCommand() - control_cmd_msg.stamp = ( - control_cmd_msg.lateral.stamp - ) = control_cmd_msg.longitudinal.stamp = (self.get_clock().now().to_msg()) + control_cmd_msg.stamp = control_cmd_msg.lateral.stamp = ( + control_cmd_msg.longitudinal.stamp + ) = (self.get_clock().now().to_msg()) control_cmd_msg.longitudinal.velocity = trajectory_longitudinal_velocity[nearestIndex] control_cmd_msg.longitudinal.acceleration = cmd[0] control_cmd_msg.lateral.steering_tire_angle = cmd[1] diff --git a/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py b/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py index 8a510864..b9957651 100644 --- a/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py +++ b/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py @@ -119,9 +119,11 @@ def load_rosbag(self, rosbag2_path: str): objects_topic = ( "/perception/object_recognition/detection/objects" if self.args.detected_object - else "/perception/object_recognition/tracking/objects" - if self.args.tracked_object - else "/perception/object_recognition/objects" + else ( + "/perception/object_recognition/tracking/objects" + if self.args.tracked_object + else "/perception/object_recognition/objects" + ) ) ego_odom_topic = "/localization/kinematic_state" traffic_signals_topic = "/perception/traffic_light_recognition/traffic_signals" diff --git a/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py b/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py index a4202102..1b75fa8a 100755 --- a/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py +++ b/planning/planning_debug_tools/scripts/perception_replayer/perception_reproducer.py @@ -55,9 +55,9 @@ def __init__(self, args): self.perv_objects_msg, self.prev_traffic_signals_msg = self.find_topics_by_timestamp( pose_timestamp ) - self.memorized_original_objects_msg = ( - self.memorized_noised_objects_msg - ) = self.perv_objects_msg + self.memorized_original_objects_msg = self.memorized_noised_objects_msg = ( + self.perv_objects_msg + ) # start main timer callback