Skip to content

Commit 6ceba5b

Browse files
Merge pull request #1270 from tier4/beta-to-tier4-main-sync
chore: sync beta branch beta/v0.27.0 with tier4/main
2 parents 2b224ba + 5ae3a05 commit 6ceba5b

File tree

159 files changed

+7547
-2182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+7547
-2182
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ planning/sampling_based_planner/frenet_planner/** maxime.clement@tier4.jp
205205
planning/sampling_based_planner/path_sampler/** maxime.clement@tier4.jp
206206
planning/sampling_based_planner/sampler_common/** maxime.clement@tier4.jp
207207
planning/scenario_selector/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
208-
planning/static_centerline_optimizer/** kosuke.takeuchi@tier4.jp takayuki.murooka@tier4.jp
208+
planning/static_centerline_generator/** kosuke.takeuchi@tier4.jp takayuki.murooka@tier4.jp
209209
planning/surround_obstacle_checker/** satoshi.ota@tier4.jp
210210
sensing/gnss_poser/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp koji.minoda@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp
211211
sensing/image_diagnostics/** dai.nguyen@tier4.jp

build_depends.repos

+5
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ repositories:
4141
type: git
4242
url: https://github.com/MORAI-Autonomous/MORAI-ROS2_morai_msgs.git
4343
version: main
44+
#vehicle
45+
vehicle/sample_vehicle_launch:
46+
type: git
47+
url: https://github.com/autowarefoundation/sample_vehicle_launch.git
48+
version: main

common/global_parameter_loader/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ project(global_parameter_loader)
44
find_package(autoware_cmake REQUIRED)
55
autoware_package()
66

7+
if(BUILD_TESTING)
8+
file(GLOB_RECURSE test_files test/*.cpp)
9+
ament_add_ros_isolated_gtest(test_global_params_launch ${test_files})
10+
endif()
11+
712
ament_auto_package(
813
INSTALL_TO_SHARE
914
launch

common/global_parameter_loader/package.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
<buildtool_depend>ament_cmake_auto</buildtool_depend>
1111
<buildtool_depend>autoware_cmake</buildtool_depend>
1212

13-
<exec_depend>vehicle_info_util</exec_depend>
13+
<depend>sample_vehicle_description</depend>
14+
<depend>vehicle_info_util</depend>
1415

16+
<test_depend>ament_cmake_ros</test_depend>
1517
<test_depend>ament_lint_auto</test_depend>
1618
<test_depend>autoware_lint_common</test_depend>
1719

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2023 The Autoware Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#include <gtest/gtest.h>
16+
17+
#include <cstdlib>
18+
#include <iostream>
19+
#include <string>
20+
21+
TEST(TestLaunchFile, test_launch_file)
22+
{
23+
// Define the path of Python launch file
24+
std::string global_params_launch_path = "global_params.launch.py";
25+
26+
// Define the parameters you want to pass to the launch file
27+
std::string use_sim_time_param = "false";
28+
std::string vehicle_model_param = "sample_vehicle";
29+
// Construct the command to run the Python launch script with parameters
30+
std::string command = "ros2 launch global_parameter_loader " + global_params_launch_path +
31+
" use_sim_time:=" + use_sim_time_param +
32+
" vehicle_model:=" + vehicle_model_param;
33+
34+
// Use the system() function to execute the command
35+
int result = std::system(command.c_str());
36+
// Check the result of running the launch file
37+
EXPECT_EQ(result, 0);
38+
}
39+
40+
int main(int argc, char * argv[])
41+
{
42+
testing::InitGoogleTest(&argc, argv);
43+
return RUN_ALL_TESTS();
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2024 TIER IV, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef TIER4_AUTOWARE_UTILS__ROS__POLLING_SUBSCRIBER_HPP_
16+
#define TIER4_AUTOWARE_UTILS__ROS__POLLING_SUBSCRIBER_HPP_
17+
18+
#include <rclcpp/rclcpp.hpp>
19+
20+
#include <string>
21+
22+
namespace tier4_autoware_utils
23+
{
24+
25+
template <typename T>
26+
class InterProcessPollingSubscriber
27+
{
28+
private:
29+
typename rclcpp::Subscription<T>::SharedPtr subscriber_;
30+
std::optional<T> data_;
31+
32+
public:
33+
explicit InterProcessPollingSubscriber(rclcpp::Node * node, const std::string & topic_name)
34+
{
35+
auto noexec_callback_group =
36+
node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive, false);
37+
auto noexec_subscription_options = rclcpp::SubscriptionOptions();
38+
noexec_subscription_options.callback_group = noexec_callback_group;
39+
40+
subscriber_ = node->create_subscription<T>(
41+
topic_name, rclcpp::QoS{1},
42+
[node]([[maybe_unused]] const typename T::ConstSharedPtr msg) { assert(false); },
43+
noexec_subscription_options);
44+
};
45+
bool updateLatestData()
46+
{
47+
rclcpp::MessageInfo message_info;
48+
T tmp;
49+
// The queue size (QoS) must be 1 to get the last message data.
50+
if (subscriber_->take(tmp, message_info)) {
51+
data_ = tmp;
52+
}
53+
return data_.has_value();
54+
};
55+
const T & getData() const
56+
{
57+
if (!data_.has_value()) {
58+
throw std::runtime_error("Bad_optional_access in class InterProcessPollingSubscriber");
59+
}
60+
return data_.value();
61+
};
62+
};
63+
64+
} // namespace tier4_autoware_utils
65+
66+
#endif // TIER4_AUTOWARE_UTILS__ROS__POLLING_SUBSCRIBER_HPP_

evaluator/perception_online_evaluator/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ target_link_libraries(${PROJECT_NAME}_node glog::glog)
3131
if(BUILD_TESTING)
3232
ament_add_ros_isolated_gtest(test_${PROJECT_NAME}
3333
test/test_perception_online_evaluator_node.cpp
34+
TIMEOUT 180
3435
)
3536
target_link_libraries(test_${PROJECT_NAME}
3637
${PROJECT_NAME}_node

evaluator/perception_online_evaluator/README.md

+52
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,58 @@ This module allows for the evaluation of how accurately perception results are g
1111
- Calculates lateral deviation between the predicted path and the actual traveled trajectory.
1212
- Calculates lateral deviation between the smoothed traveled trajectory and the perceived position to evaluate the stability of lateral position recognition.
1313
- Calculates yaw deviation between the smoothed traveled trajectory and the perceived position to evaluate the stability of yaw recognition.
14+
- Calculates yaw rate based on the yaw of the object received in the previous cycle to evaluate the stability of the yaw rate recognition.
15+
16+
### Predicted Path Deviation / Predicted Path Deviation Variance
17+
18+
Compare the predicted path of past objects with their actual traveled path to determine the deviation. For each object, calculate the mean distance between the predicted path points and the corresponding points on the actual path, up to the specified time step. In other words, this calculates the Average Displacement Error (ADE). The target object to be evaluated is the object from $T_N$ seconds ago, where $T_N$ is the maximum value of the prediction time horizon $[T_1, T_2, ..., T_N]$.
19+
20+
![path_deviation_each_object](./images/path_deviation_each_object.drawio.svg)
21+
22+
$$
23+
\begin{align}
24+
n_{points} = T / dt \\
25+
ADE = \Sigma_{i=1}^{n_{points}} d_i / n_{points} \\
26+
Var = \Sigma_{i=1}^{n_{points}} (d_i - ADE)^2 / n_{points}
27+
\end{align}
28+
$$
29+
30+
- $n_{points}$ : Number of points in the predicted path
31+
- $T$ : Time horizon for prediction evaluation.
32+
- $dt$ : Time interval of the predicted path
33+
- $d_i$ : Distance between the predicted path and the actual traveled path at path point $i$
34+
- $ADE$ : Mean deviation of the predicted path for the target object.
35+
- $Var$ : Variance of the predicted path deviation for the target object.
36+
37+
The final predicted path deviation metrics are calculated by averaging the mean deviation of the predicted path for all objects of the same class, and then calculating the mean, maximum, and minimum values of the mean deviation.
38+
39+
![path_deviation](./images/path_deviation.drawio.svg)
40+
41+
$$
42+
\begin{align}
43+
ADE_{mean} = \Sigma_{j=1}^{n_{objects}} ADE_j / n_{objects} \\
44+
ADE_{max} = max(ADE_j) \\
45+
ADE_{min} = min(ADE_j)
46+
\end{align}
47+
$$
48+
49+
$$
50+
\begin{align}
51+
Var_{mean} = \Sigma_{j=1}^{n_{objects}} Var_j / n_{objects} \\
52+
Var_{max} = max(Var_j) \\
53+
Var_{min} = min(Var_j)
54+
\end{align}
55+
$$
56+
57+
- $n_{objects}$ : Number of objects
58+
- $ADE_{mean}$ : Mean deviation of the predicted path through all objects
59+
- $ADE_{max}$ : Maximum deviation of the predicted path through all objects
60+
- $ADE_{min}$ : Minimum deviation of the predicted path through all objects
61+
- $Var_{mean}$ : Mean variance of the predicted path deviation through all objects
62+
- $Var_{max}$ : Maximum variance of the predicted path deviation through all objects
63+
- $Var_{min}$ : Minimum variance of the predicted path deviation through all objects
64+
65+
The actual metric name is determined by the object class and time horizon. For example, `predicted_path_deviation_variance_CAR_5.00`
1466

1567
## Inputs / Outputs
1668

0 commit comments

Comments
 (0)