forked from tier4/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update data association in object merger (tier4#1001)
* backup Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> * backup Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> * bug fix Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> * backup Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> * backup Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> * ci(pre-commit): autofix * cosmetic change Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> * add parameters Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
Showing
19 changed files
with
891 additions
and
430 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
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
44 changes: 44 additions & 0 deletions
44
perception/object_merger/config/data_association_matrix.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,44 @@ | ||
/**: | ||
ros__parameters: | ||
can_assign_matrix: | ||
#UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE,PEDESTRIAN | ||
[0, 0, 0, 0, 0, 0, 0, 0, #UNKNOWN | ||
0, 1, 1, 1, 1, 0, 0, 0, #CAR | ||
0, 1, 1, 1, 1, 0, 0, 0, #TRUCK | ||
0, 1, 1, 1, 1, 0, 0, 0, #BUS | ||
0, 1, 1, 1, 1, 0, 0, 0, #TRAILER | ||
0, 0, 0, 0, 0, 1, 1, 1, #MOTORBIKE | ||
0, 0, 0, 0, 0, 1, 1, 1, #BICYCLE | ||
0, 0, 0, 0, 0, 1, 1, 1] #PEDESTRIAN | ||
|
||
max_dist_matrix: | ||
#UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE, PEDESTRIAN | ||
[4.0, 4.0, 5.0, 5.0, 5.0, 2.0, 2.0, 2.0, #UNKNOWN | ||
4.0, 2.0, 5.0, 5.0, 5.0, 1.0, 1.0, 1.0, #CAR | ||
5.0, 5.0, 5.0, 5.0, 5.0, 1.0, 1.0, 1.0, #TRUCK | ||
5.0, 5.0, 5.0, 5.0, 5.0, 1.0, 1.0, 1.0, #BUS | ||
5.0, 5.0, 5.0, 5.0, 5.0, 1.0, 1.0, 1.0, #TRAILER | ||
2.0, 1.0, 1.0, 1.0, 1.0, 3.0, 3.0, 3.0, #MOTORBIKE | ||
2.0, 1.0, 1.0, 1.0, 1.0, 3.0, 3.0, 3.0, #BICYCLE | ||
2.0, 1.0, 1.0, 1.0, 1.0, 3.0, 3.0, 2.0] #PEDESTRIAN | ||
max_rad_matrix: # If value is greater than pi, it will be ignored. | ||
#UNKNOWN, CAR, TRUCK, BUS, TRAILER MOTORBIKE, BICYCLE, PEDESTRIAN | ||
[3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, #UNKNOWN | ||
3.150, 1.047, 1.047, 1.047, 1.047, 3.150, 3.150, 3.150, #CAR | ||
3.150, 1.047, 1.047, 1.047, 1.047, 3.150, 3.150, 3.150, #TRUCK | ||
3.150, 1.047, 1.047, 1.047, 1.047, 3.150, 3.150, 3.150, #BUS | ||
3.150, 1.047, 1.047, 1.047, 1.047, 3.150, 3.150, 3.150, #TRAILER | ||
3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, #MOTORBIKE | ||
3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, #BICYCLE | ||
3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150, 3.150] #PEDESTRIAN | ||
|
||
min_iou_matrix: # If value is negative, it will be ignored. | ||
#UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE, PEDESTRIAN | ||
[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, #UNKNOWN | ||
0.1, 0.3, 0.2, 0.2, 0.2, 0.1, 0.1, 0.1, #CAR | ||
0.1, 0.2, 0.3, 0.3, 0.3, 0.1, 0.1, 0.1, #TRUCK | ||
0.1, 0.2, 0.3, 0.3, 0.3, 0.1, 0.1, 0.1, #BUS | ||
0.1, 0.2, 0.3, 0.3, 0.3, 0.1, 0.1, 0.1, #TRAILER | ||
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, #MOTORBIKE | ||
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, #BICYCLE | ||
0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] #PEDESTRIAN |
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
22 changes: 22 additions & 0 deletions
22
...on/object_merger/include/object_association_merger/data_association/solver/gnn_solver.hpp
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,22 @@ | ||
// Copyright 2021 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. | ||
|
||
#ifndef OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ | ||
#define OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ | ||
|
||
#include "object_association_merger/data_association/solver/gnn_solver_interface.hpp" | ||
#include "object_association_merger/data_association/solver/mu_successive_shortest_path.hpp" | ||
#include "object_association_merger/data_association/solver/successive_shortest_path.hpp" | ||
|
||
#endif // OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ |
35 changes: 35 additions & 0 deletions
35
...merger/include/object_association_merger/data_association/solver/gnn_solver_interface.hpp
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,35 @@ | ||
// Copyright 2021 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. | ||
|
||
#ifndef OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ | ||
#define OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ | ||
|
||
#include <unordered_map> | ||
#include <vector> | ||
|
||
namespace gnn_solver | ||
{ | ||
class GnnSolverInterface | ||
{ | ||
public: | ||
GnnSolverInterface() = default; | ||
virtual ~GnnSolverInterface() = default; | ||
|
||
virtual void maximizeLinearAssignment( | ||
const std::vector<std::vector<double>> & cost, std::unordered_map<int, int> * direct_assignment, | ||
std::unordered_map<int, int> * reverse_assignment) = 0; | ||
}; | ||
} // namespace gnn_solver | ||
|
||
#endif // OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ |
37 changes: 37 additions & 0 deletions
37
...include/object_association_merger/data_association/solver/mu_successive_shortest_path.hpp
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,37 @@ | ||
// Copyright 2021 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. | ||
|
||
#ifndef OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ | ||
#define OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ | ||
|
||
#include "object_association_merger/data_association/solver/gnn_solver_interface.hpp" | ||
|
||
#include <unordered_map> | ||
#include <vector> | ||
|
||
namespace gnn_solver | ||
{ | ||
class MuSSP : public GnnSolverInterface | ||
{ | ||
public: | ||
MuSSP() = default; | ||
~MuSSP() = default; | ||
|
||
void maximizeLinearAssignment( | ||
const std::vector<std::vector<double>> & cost, std::unordered_map<int, int> * direct_assignment, | ||
std::unordered_map<int, int> * reverse_assignment) override; | ||
}; | ||
} // namespace gnn_solver | ||
|
||
#endif // OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ |
37 changes: 37 additions & 0 deletions
37
...er/include/object_association_merger/data_association/solver/successive_shortest_path.hpp
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,37 @@ | ||
// Copyright 2021 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. | ||
|
||
#ifndef OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ | ||
#define OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ | ||
|
||
#include "object_association_merger/data_association/solver/gnn_solver_interface.hpp" | ||
|
||
#include <unordered_map> | ||
#include <vector> | ||
|
||
namespace gnn_solver | ||
{ | ||
class SSP : public GnnSolverInterface | ||
{ | ||
public: | ||
SSP() = default; | ||
~SSP() = default; | ||
|
||
void maximizeLinearAssignment( | ||
const std::vector<std::vector<double>> & cost, std::unordered_map<int, int> * direct_assignment, | ||
std::unordered_map<int, int> * reverse_assignment) override; | ||
}; | ||
} // namespace gnn_solver | ||
|
||
#endif // OBJECT_ASSOCIATION_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ |
Oops, something went wrong.