Skip to content

Commit

Permalink
fix: rebase due to pr-9714 under universe repo, remove diagnostics_mo…
Browse files Browse the repository at this point in the history
…dule from localization_util : v0.1

Signed-off-by: liuXinGangChina <[email protected]>
  • Loading branch information
liuXinGangChina committed Jan 6, 2025
1 parent a35886d commit c12f241
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 207 deletions.
1 change: 0 additions & 1 deletion localization/autoware_localization_util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ autoware_package()

ament_auto_add_library(${PROJECT_NAME} SHARED
src/util_func.cpp
src/diagnostics_module.cpp
src/smart_pose_buffer.cpp
src/tree_structured_parzen_estimator.cpp
src/covariance_ellipse.cpp
Expand Down
34 changes: 0 additions & 34 deletions localization/autoware_localization_util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
`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.
- `diagnostics_module` a diagnostics library designed for localization nodes's diagnostics message management and publish.
- `smart_pose_buffer` pose buffer management library which contains interpolate and data validation.
- `tree_structured_parzen_estimator` A Tree Structured Parzen Estimator (AKA TSPE) library.
- `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.
- `tree_structured_parzen_estimator` A Probability Estimator (AKA TSPE) library that includes estimator and log likelihood ratio calculation.
- `util_func` Tool function collection.
Expand All @@ -32,38 +30,6 @@ autoware::localization_util::Ellipse ellipse_ = autoware::localization_util::cal
ellipse_, input_msg->header, input_msg->pose);
```

### diagnostics_module

Include header file to use:
```cpp
#include "autoware/localization_util/diagnostics_module.hpp"
```

init diagnostics manager
```cpp
std::unique_ptr<autoware::localization_util::DiagnosticsModule> diagnostics_ =
std::make_unique<autoware::localization_util::DiagnosticsModule>(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(
"topic_time_stamp",
static_cast<rclcpp::Time>(vehicle_twist_msg_ptr->header.stamp).nanoseconds());

...

message << "Please publish TF " << output_frame_ << " to "
<< gyro_queue_.front().header.frame_id;
RCLCPP_ERROR_STREAM_THROTTLE(this->get_logger(), *this->get_clock(), 1000, message.str());
diagnostics_->update_level_and_message(
diagnostic_msgs::msg::DiagnosticStatus::WARN, message.str());
...

diagnostics_->publish(vehicle_twist_msg_ptr->header.stamp);
```
### smart_pose_buffer

buffer init
Expand Down

This file was deleted.

108 changes: 0 additions & 108 deletions localization/autoware_localization_util/src/diagnostics_module.cpp

This file was deleted.

0 comments on commit c12f241

Please sign in to comment.