Skip to content
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

feat(raw_vehicle_cmd_converter): add validation to same column value case #2164

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

taikitanaka3
Copy link
Contributor

@taikitanaka3 taikitanaka3 commented Oct 27, 2022

  • consider same value case for same column values case

image

https://github.com/tier4/autoware_individual_params.rd/tree/rx3-main/individual_params/config/13/pacmod
Expected test result if you replace example map

default,0,1.39,2.78,4.17,5.56,6.94,8.33,9.72,11.11,12.5,13.89
0,0.3,-0.05,-0.164,-0.39,-0.391,-0.392,-0.393,-0.397,-0.46,-0.461,-0.5
0.1,0.29,-0.06,-0.31,-0.391,-0.401,-0.406,-0.421,-0.45,-0.47,-0.49,-0.51
0.2,-0.38,-0.4,-0.709,-0.71,-0.78,-0.848,-0.864,-0.89,-0.91,-0.94,-0.96
0.3,-0.874,-1.03,-1.48,-1.48,-1.48,-1.48,-1.61,-1.61,-1.61,-1.61,-1.63
0.4,-1.46,-1.57,-1.9,-2.05,-2.07,-2.07,-2.07,-2.09,-2.09,-2.11,-2.11
0.5,-1.49,-1.57,-1.91,-2.22,-2.27,-2.27,-2.27,-2.27,-2.27,-2.28,-2.28
0.6,-1.5,-1.57,-1.91,-2.22,-2.27,-2.27,-2.27,-2.27,-2.28,-2.28,-2.28
0.7,-1.51,-1.57,-1.91,-2.22,-2.27,-2.27,-2.27,-2.28,-2.28,-2.28,-2.28
0.8,-2.18,-2.2,-2.7,-2.8,-2.9,-2.95,-2.95,-2.95,-2.95,-2.95,-2.96
1: [==========] Running 5 tests from 1 test suite.
1: [----------] Global test environment set-up.
1: [----------] 5 tests from ConverterTests
1: [ RUN      ] ConverterTests.LoadExampleMap
1: index around (i,j) is invalid ( 7, 10 )
1: /home/t4tanaka/workspace/autoware/src/universe/autoware.universe/vehicle/raw_vehicle_cmd_converter/test/test_raw_vehicle_cmd_converter.cpp:82: Failure

Copy link
Contributor

@shmpwk shmpwk left a comment

Choose a reason for hiding this comment

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

I understand this validation is needed for col, and not for row in that

// validate row
if (vec.at(j) < vec.at(j - 1) && is_row_decent) {
invalid_index_pair = std::make_pair(i, j);
is_invalid = true;
}
if (vec.at(j) > vec.at(j - 1) && !is_row_decent) {
invalid_index_pair = std::make_pair(i, j);
is_invalid = true;

@taikitanaka3
Copy link
Contributor Author

column values should not include same values but should be increasing order
row values should be increasing order but can be same values

@taikitanaka3 taikitanaka3 enabled auto-merge (squash) October 27, 2022 08:17
@taikitanaka3
Copy link
Contributor Author

@TakaHoribe
I add validation for same value case too.
Can yoiu approve this?

@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Base: 10.77% // Head: 10.77% // No change to project coverage 👍

Coverage data is based on head (445b26f) compared to base (893a3bb).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2164   +/-   ##
=======================================
  Coverage   10.77%   10.77%           
=======================================
  Files        1186     1186           
  Lines       84843    84843           
  Branches    19898    19898           
=======================================
  Hits         9144     9144           
  Misses      66007    66007           
  Partials     9692     9692           
Flag Coverage Δ *Carryforward flag
differential 7.64% <0.00%> (?)
total 10.75% <0.00%> (ø) Carriedforward from 893a3bb

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

Impacted Files Coverage Δ
...include/ndt_scan_matcher/ndt_scan_matcher_core.hpp 0.00% <0.00%> (ø)
...ion/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp 0.00% <0.00%> (ø)
...hicle/raw_vehicle_cmd_converter/src/csv_loader.cpp 64.91% <0.00%> (ø)

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@taikitanaka3
Copy link
Contributor Author

@TakaHoribe
sorry,.code owner setting is not refkected yet so please approve this

@taikitanaka3 taikitanaka3 merged commit 5dc9afc into main Oct 27, 2022
@taikitanaka3 taikitanaka3 deleted the feature/add_more_validation_to_converter branch October 27, 2022 13:42
taikitanaka3 added a commit to tier4/autoware.universe that referenced this pull request Dec 2, 2022
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
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.

3 participants