From f496f24fb424ca462ec2af9763a32d0c9cd95d4a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 02:38:29 +0000 Subject: [PATCH] style(pre-commit): autofix --- .../autoware_localization_util/README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/localization/autoware_localization_util/README.md b/localization/autoware_localization_util/README.md index efd52c1f41..b20cb50696 100644 --- a/localization/autoware_localization_util/README.md +++ b/localization/autoware_localization_util/README.md @@ -1,6 +1,7 @@ # autoware_localization_util ## Overview + `autoware_localization_util` is a collection of localization utility packages. It contains 5 individual libiary that used by autoware localization nodes. - `covariance_ellipse` 2d covariance visualization wrapper. @@ -10,6 +11,7 @@ - `util_func` A tool library which contains several function for localization nodes. ## Design + - `covariance_ellipse` Translate `geometry_msgs::msg::PoseWithCovariance` message into ellipse visual marker to demonstrate covariance distribution. - `diagnostics_module` Manage diagnostics message's content, level and publish timing of localization nodes. - `smart_pose_buffer` A buffer library which implements pose message buffering, pose interpolate and pose validation. @@ -17,7 +19,9 @@ - `util_func` Tool function collection. ## Usage -### covariance_ellipse + +### covariance_ellipse + Include header file to use: ```cpp @@ -25,6 +29,7 @@ Include header file to use: ``` calculate ellipse and visualize + ```cpp autoware::localization_util::Ellipse ellipse_ = autoware::localization_util::calculate_xy_ellipse(input_msg->pose, scale_); @@ -35,17 +40,20 @@ autoware::localization_util::Ellipse ellipse_ = autoware::localization_util::cal ### diagnostics_module Include header file to use: + ```cpp #include "autoware/localization_util/diagnostics_module.hpp" ``` init diagnostics manager + ```cpp std::unique_ptr diagnostics_ = std::make_unique(this, "gyro_odometer_status"); ``` clean message buffer, add message, set diagnostics message logging level and publish diagnostics message + ```cpp diagnostics_->clear(); diagnostics_->add_key_value( @@ -67,6 +75,7 @@ diagnostics_->publish(vehicle_twist_msg_ptr->header.stamp); ### smart_pose_buffer buffer init + ```cpp #include "autoware/localization_util/smart_pose_buffer.hpp" @@ -79,6 +88,7 @@ initial_pose_buffer_ = std::make_unique( ``` interpolate and pop out old pose message + ```cpp std::optional interpolation_result_opt = initial_pose_buffer_->interpolate(sensor_ros_time); @@ -91,6 +101,7 @@ interpolation_result_opt.value(); ``` clear buffer + ```cpp initial_pose_buffer_->clear(); ``` @@ -111,11 +122,13 @@ param_.initial_pose_estimation.n_startup_trials, sample_mean, sample_stddev); ``` get estimation result + ```cpp const TreeStructuredParzenEstimator::Input input = tpe.get_next_input(); ``` add new data to the estimator + ```cpp TreeStructuredParzenEstimator::Input result(6); result[0] = pose.position.x; @@ -130,6 +143,7 @@ tpe.add_trial(TreeStructuredParzenEstimator::Trial{result, ndt_result.transform_ ### util_func include header file to use + ```cpp #include "autoware/localization_util/util_func.hpp" @@ -140,6 +154,7 @@ using autoware::localization_util::pose_to_matrix4f; ``` list of usefull function + ```cpp std_msgs::msg::ColorRGBA exchange_color_crc(double x); double calc_diff_for_radian(const double lhs_rad, const double rhs_rad); @@ -168,4 +183,4 @@ T transform(const T & input, const geometry_msgs::msg::TransformStamped & transf void output_pose_with_cov_to_log( const rclcpp::Logger & logger, const std::string & prefix, const geometry_msgs::msg::PoseWithCovarianceStamped & pose_with_cov); -``` \ No newline at end of file +```