Skip to content

Commit

Permalink
feat(raw_vehicle_cmd_converter): add validation to same column value …
Browse files Browse the repository at this point in the history
…case (#2164)
  • Loading branch information
taikitanaka3 authored Oct 27, 2022
1 parent e39b37d commit 5dc9afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vehicle/raw_vehicle_cmd_converter/src/csv_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ bool CSVLoader::validateMap(const Map & map, const bool is_row_decent, const boo
// validate row data
for (size_t j = 1; j < vec.size(); j++) {
// validate col
if (vec.at(j) < prev_vec.at(j) && is_col_decent) {
if (vec.at(j) <= prev_vec.at(j) && is_col_decent) {
invalid_index_pair = std::make_pair(i, j);
is_invalid = true;
}
if (vec.at(j) > prev_vec.at(j) && !is_col_decent) {
if (vec.at(j) >= prev_vec.at(j) && !is_col_decent) {
invalid_index_pair = std::make_pair(i, j);
is_invalid = true;
}
Expand Down

0 comments on commit 5dc9afc

Please sign in to comment.