forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cherry-pick lanelet filter update
Signed-off-by: yoshiri <[email protected]>
- Loading branch information
Showing
10 changed files
with
249 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
[800.0, 800.0, 800.0, 800.0, 800.0, 800.0, 800.0, 800.0] | ||
|
||
using_2d_validator: false | ||
enable_debugger: false |
3 changes: 3 additions & 0 deletions
3
perception/detected_object_validation/config/occupancy_grid_based_validator.param.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/**: | ||
ros__parameters: | ||
enable_debug: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
<description>The ROS 2 detected_object_validation package</description> | ||
<maintainer email="[email protected]">Yukihiro Saito</maintainer> | ||
<maintainer email="[email protected]">Shunsuke Miura</maintainer> | ||
<maintainer email="[email protected]">badai nguyen</maintainer> | ||
<maintainer email="[email protected]">Dai Nguyen</maintainer> | ||
<maintainer email="[email protected]">Shintaro Tomie</maintainer> | ||
<maintainer email="[email protected]">Yoshi RI</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright 2024 TIER IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#include "detected_object_validation/utils/utils.hpp" | ||
|
||
#include <autoware_auto_perception_msgs/msg/object_classification.hpp> | ||
|
||
#include <gtest/gtest.h> | ||
|
||
using AutowareLabel = autoware_auto_perception_msgs::msg::ObjectClassification; | ||
|
||
utils::FilterTargetLabel createFilterTargetAll() | ||
{ | ||
utils::FilterTargetLabel filter; | ||
filter.UNKNOWN = true; | ||
filter.CAR = true; | ||
filter.TRUCK = true; | ||
filter.BUS = true; | ||
filter.TRAILER = true; | ||
filter.MOTORCYCLE = true; | ||
filter.BICYCLE = true; | ||
filter.PEDESTRIAN = true; | ||
return filter; | ||
} | ||
|
||
utils::FilterTargetLabel createFilterTargetVehicle() | ||
{ | ||
utils::FilterTargetLabel filter; | ||
filter.UNKNOWN = false; | ||
filter.CAR = true; | ||
filter.TRUCK = true; | ||
filter.BUS = true; | ||
filter.TRAILER = true; | ||
filter.MOTORCYCLE = false; | ||
filter.BICYCLE = false; | ||
filter.PEDESTRIAN = false; | ||
return filter; | ||
} | ||
|
||
TEST(IsTargetTest, AllTarget) | ||
{ | ||
auto filter = createFilterTargetAll(); | ||
auto label = AutowareLabel::CAR; | ||
EXPECT_TRUE(filter.isTarget(label)); | ||
} | ||
|
||
TEST(IsTargetTest, VehicleTarget) | ||
{ | ||
auto filter = createFilterTargetVehicle(); | ||
|
||
auto car_label = AutowareLabel::CAR; | ||
EXPECT_TRUE(filter.isTarget(car_label)); | ||
|
||
auto unknown_label = AutowareLabel::UNKNOWN; | ||
EXPECT_FALSE(filter.isTarget(unknown_label)); | ||
} |