-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(perception_utils): add classification util function with string #2090
refactor(perception_utils): add classification util function with string #2090
Conversation
Signed-off-by: scepter914 <scepter914@gmail.com>
Signed-off-by: scepter914 <scepter914@gmail.com>
Signed-off-by: scepter914 <scepter914@gmail.com>
Signed-off-by: scepter914 <scepter914@gmail.com>
Signed-off-by: scepter914 <scepter914@gmail.com>
Codecov ReportBase: 10.83% // Head: 10.35% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2090 +/- ##
==========================================
- Coverage 10.83% 10.35% -0.49%
==========================================
Files 1179 1176 -3
Lines 84845 84466 -379
Branches 19985 19637 -348
==========================================
- Hits 9196 8746 -450
- Misses 65931 66147 +216
+ Partials 9718 9573 -145
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
common/perception_utils/include/perception_utils/object_classification.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: scepter914 <scepter914@gmail.com>
@@ -17,6 +17,7 @@ | |||
|
|||
#include "autoware_auto_perception_msgs/msg/object_classification.hpp" | |||
|
|||
#include <string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious.
Where is this function with string argument used?
I'm not sure why the label is used as string in the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deep learning module sometime has string config like CenterPoint, so this case need for converter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if having class names as a string is good or not, but I got it. Thank you.
} else { | ||
return ObjectClassification::UNKNOWN; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handling looks not good.
If we have typo on class types as a string, the type will be unknown.
I think it's okay to throw exception in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's certainly true. Thank you for recommendation.
Fixed at 15d8d0a.
Signed-off-by: scepter914 <scepter914@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ing (autowarefoundation#2090) * feat(perception_utils): add classification util function with string Signed-off-by: scepter914 <scepter914@gmail.com> * add unit test Signed-off-by: scepter914 <scepter914@gmail.com> * add include string Signed-off-by: scepter914 <scepter914@gmail.com> * fix function interface Signed-off-by: scepter914 <scepter914@gmail.com> * fix unit test Signed-off-by: scepter914 <scepter914@gmail.com> * change function name Signed-off-by: scepter914 <scepter914@gmail.com> * change to except throw Signed-off-by: scepter914 <scepter914@gmail.com> Signed-off-by: scepter914 <scepter914@gmail.com> Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
…ing (autowarefoundation#2090) * feat(perception_utils): add classification util function with string Signed-off-by: scepter914 <scepter914@gmail.com> * add unit test Signed-off-by: scepter914 <scepter914@gmail.com> * add include string Signed-off-by: scepter914 <scepter914@gmail.com> * fix function interface Signed-off-by: scepter914 <scepter914@gmail.com> * fix unit test Signed-off-by: scepter914 <scepter914@gmail.com> * change function name Signed-off-by: scepter914 <scepter914@gmail.com> * change to except throw Signed-off-by: scepter914 <scepter914@gmail.com> Signed-off-by: scepter914 <scepter914@gmail.com> Signed-off-by: yoshiri <yoshiyoshidetteiu@gmail.com>
Description
Make util function for label conversion between string and uint8.
The function is used in
autoware.universe/perception/lidar_centerpoint/lib/ros_utils.cpp
Line 74 in 4be6931
autoware.universe/perception/heatmap_visualizer/src/utils.cpp
Line 88 in 4be6931
After this PR merged, I'll send the PR to replace to these functions to util functions.
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.
After all checkboxes are checked, anyone who has write access can merge the PR.