Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

feat(autoware_utils): add functions to generate and convert uuids #238

Merged
merged 5 commits into from
Feb 15, 2024

Conversation

lexavtanke
Copy link
Contributor

@lexavtanke lexavtanke commented Feb 14, 2024

Description

This PR add port functions of working UUID from tier4_autoware_utils package and add some simple unit test for these functions. I need to use this functions in my work on Autoware_node in autoware.core but as tier4_autoware_utils is not the part of rosdep I get the error during build. Autoware_common is already in use in autoware.core so it is make sense to add this functions to autoware_utils.

Tests performed

Added unit tests.

Effects on system behavior

Not applicable.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
@lexavtanke lexavtanke requested a review from xmfcx February 14, 2024 21:59
@lexavtanke lexavtanke marked this pull request as ready for review February 14, 2024 22:00
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (119ea82) 9.66% compared to head (96ee571) 10.46%.

Files Patch % Lines
autoware_utils/test/src/ros/test_uuid_helper.cpp 73.91% 1 Missing and 5 partials ⚠️
...e_utils/include/autoware_utils/ros/uuid_helper.hpp 85.71% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##            main     #238      +/-   ##
=========================================
+ Coverage   9.66%   10.46%   +0.80%     
=========================================
  Files         40       42       +2     
  Lines       3115     3152      +37     
  Branches    1399     1407       +8     
=========================================
+ Hits         301      330      +29     
- Misses      2394     2395       +1     
- Partials     420      427       +7     
Flag Coverage Δ *Carryforward flag
differential 10.46% <78.37%> (?)
total 9.66% <ø> (ø) Carriedforward from 44f8a58

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/2)

autoware_utils/include/autoware_utils/ros/uuid_helper.hpp Outdated Show resolved Hide resolved
autoware_utils/include/autoware_utils/ros/uuid_helper.hpp Outdated Show resolved Hide resolved
autoware_utils/include/autoware_utils/ros/uuid_helper.hpp Outdated Show resolved Hide resolved
autoware_utils/include/autoware_utils/ros/uuid_helper.hpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (2/2)

autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
autoware_utils/test/src/ros/test_uuid_helper.cpp Outdated Show resolved Hide resolved
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Copy link
Contributor

@esteve esteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lexavtanke LGTM, thanks. It'd be good to contribute this to ROS at some point, it's a functionality that everyone in the ROS community would benefit from.

I saw there was some work done in ros2/unique_identifier#1, but it hasn't had any updates in a while.

@xmfcx xmfcx merged commit 7c55915 into autowarefoundation:main Feb 15, 2024
18 checks passed
@brkay54
Copy link
Member

brkay54 commented Mar 20, 2024

Hi @lexavtanke, Thank you for the PR. Could you create a follow-up PR to change comments here:
https://github.com/autowarefoundation/autoware_common/pull/238/files#diff-f0b412c1da4d92f999006950578227101cad9d18a00a433ec041daf81008fdc6R1

Could you change the first line of the files you created from:
// Copyright 2024 TIER IV, Inc.
To:
// Copyright 2024 The Autoware Contributors

@xmfcx
Copy link
Contributor

xmfcx commented Mar 20, 2024

@brkay54 this was taken from TIER IV code base. We should keep the original copyright notice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants