Skip to content

Conversation

@ktro2828
Copy link
Contributor

PR Type

  • Improvement

Related Links

TIER IV INTERNAL LINK

Description

This pull request refactors the BaseProcessor class to improve error handling by introducing a new result type for image processing, and updates dependencies and build configuration accordingly. The main improvements are focused on making the processing outcome explicit and easier to handle, as well as ensuring the necessary dependencies are declared.

Error handling and API improvements:

  • Introduced a new result_t type alias in BaseProcessor, which uses tl::expected<Image, std::string> to represent either a successfully processed image or an error message. (processor.hpp)
  • Refactored the process method to return result_t instead of void, providing clear feedback on processing success or failure with appropriate error messages. (processor.hpp) [1] [2]

Dependency and build configuration:

  • Added tl_expected as a dependency in package.xml and included its header in processor.hpp to support the new result type. (package.xml, processor.hpp) [1] [2]
  • Updated the CMake configuration to include the ROS include directory in the interface includes for the target, improving compatibility with ROS environments. (CMakeLists.txt)

Review Procedure

Remarks

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

…ected

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants