Skip to content

Commit

Permalink
Merge pull request #1557 from tier4/beta-to-tier4-main-sync
Browse files Browse the repository at this point in the history
chore: sync beta branch beta/v0.35 with tier4/main
  • Loading branch information
tier4-autoware-public-bot[bot] authored Sep 26, 2024
2 parents 8f3ef69 + 554ce6d commit b34c1a1
Show file tree
Hide file tree
Showing 493 changed files with 8,921 additions and 7,479 deletions.
19 changes: 8 additions & 11 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@ common/autoware_point_types/** [email protected] [email protected]
common/autoware_test_utils/** [email protected] [email protected] [email protected] [email protected]
common/autoware_testing/** [email protected] [email protected] [email protected] [email protected]
common/autoware_universe_utils/** [email protected] [email protected] [email protected]
common/autoware_vehicle_info_utils/** [email protected] [email protected] [email protected]
common/bag_time_manager_rviz_plugin/** [email protected]
common/component_interface_specs/** [email protected] [email protected]
common/component_interface_tools/** [email protected]
common/component_interface_utils/** [email protected] [email protected]
common/cuda_utils/** [email protected] [email protected]
common/fake_test_node/** [email protected] [email protected] [email protected] [email protected]
common/global_parameter_loader/** [email protected]
common/glog_component/** [email protected]
common/goal_distance_calculator/** [email protected]
common/interpolation/** [email protected] [email protected]
common/object_recognition_utils/** [email protected] [email protected] [email protected]
common/osqp_interface/** [email protected] [email protected] [email protected] [email protected]
common/perception_utils/** [email protected] [email protected]
common/polar_grid/** [email protected]
common/qp_interface/** [email protected] [email protected] [email protected] [email protected]
common/signal_processing/** [email protected] [email protected] [email protected] [email protected] [email protected]
Expand All @@ -35,7 +34,6 @@ common/tier4_api_utils/** [email protected]
common/tier4_camera_view_rviz_plugin/** [email protected] [email protected]
common/tier4_datetime_rviz_plugin/** [email protected]
common/tier4_localization_rviz_plugin/** [email protected] [email protected] [email protected]
common/tier4_perception_rviz_plugin/** [email protected]
common/tier4_planning_rviz_plugin/** [email protected] [email protected]
common/tier4_state_rviz_plugin/** [email protected] [email protected] [email protected]
common/tier4_system_rviz_plugin/** [email protected]
Expand All @@ -62,7 +60,7 @@ control/autoware_vehicle_cmd_gate/** [email protected] tomoya.kimura@tier
control/control_performance_analysis/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
control/obstacle_collision_checker/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
control/predicted_path_checker/** [email protected]
evaluator/autoware_control_evaluator/** [email protected] [email protected]
evaluator/autoware_control_evaluator/** [email protected] [email protected] takayuki.murooka@tier4.jp temkei.kem@tier4.jp
evaluator/autoware_evaluator_utils/** [email protected] [email protected]
evaluator/autoware_planning_evaluator/** [email protected] [email protected]
evaluator/diagnostic_converter/** [email protected] [email protected] [email protected]
Expand All @@ -79,6 +77,7 @@ launch/tier4_sensing_launch/** [email protected]
launch/tier4_simulator_launch/** [email protected] [email protected] [email protected] [email protected] [email protected]
launch/tier4_system_launch/** [email protected] [email protected]
launch/tier4_vehicle_launch/** [email protected]
localization/autoware_ekf_localizer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_geo_pose_projector/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_gyro_odometer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_landmark_based_localizer/autoware_ar_tag_based_localizer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Expand All @@ -88,13 +87,12 @@ localization/autoware_localization_error_monitor/** [email protected] kento.
localization/autoware_pose2twist/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_pose_covariance_modifier/** [email protected]
localization/autoware_pose_estimator_arbiter/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_pose_initializer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_pose_instability_detector/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_stop_filter/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_twist2accel/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/ekf_localizer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/localization_util/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/ndt_scan_matcher/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_pose_initializer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/yabloc/yabloc_common/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/yabloc/yabloc_image_processing/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/yabloc/yabloc_monitor/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Expand All @@ -104,7 +102,6 @@ map/autoware_map_height_fitter/** [email protected] [email protected] ke
map/autoware_map_projection_loader/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
map/autoware_map_tf_generator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
map/map_loader/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
map/util/lanelet2_map_preprocessor/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
perception/autoware_bytetrack/** [email protected] [email protected]
perception/autoware_cluster_merger/** [email protected] [email protected] [email protected]
perception/autoware_compare_map_segmentation/** [email protected] [email protected] [email protected]
Expand Down Expand Up @@ -144,6 +141,7 @@ perception/autoware_traffic_light_map_based_detector/** [email protected]
perception/autoware_traffic_light_multi_camera_fusion/** [email protected] [email protected]
perception/autoware_traffic_light_occlusion_predictor/** [email protected] [email protected]
perception/autoware_traffic_light_visualization/** [email protected] [email protected]
perception/perception_utils/** [email protected] [email protected]
planning/autoware_costmap_generator/** [email protected] [email protected] [email protected]
planning/autoware_external_velocity_limit_selector/** [email protected] [email protected] [email protected] [email protected] [email protected]
planning/autoware_freespace_planner/** [email protected] [email protected] [email protected]
Expand Down Expand Up @@ -210,15 +208,17 @@ sensing/autoware_radar_scan_to_pointcloud2/** [email protected] shunsuke.m
sensing/autoware_radar_static_pointcloud_filter/** [email protected] [email protected] [email protected] [email protected]
sensing/autoware_radar_threshold_filter/** [email protected] [email protected] [email protected] [email protected]
sensing/autoware_radar_tracks_noise_filter/** [email protected] [email protected] [email protected] [email protected]
sensing/cuda_utils/** [email protected] [email protected]
sensing/livox/autoware_livox_tag_filter/** [email protected] [email protected]
sensing/vehicle_velocity_converter/** [email protected]
simulator/autoware_carla_interface/** [email protected] [email protected]
simulator/dummy_perception_publisher/** [email protected]
simulator/fault_injection/** [email protected]
simulator/learning_based_vehicle_model/** [email protected] [email protected]
simulator/simple_planning_simulator/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
simulator/tier4_dummy_object_rviz_plugin/** [email protected]
simulator/vehicle_door_simulator/** [email protected]
system/autoware_component_monitor/** [email protected]
system/autoware_component_monitor/** [email protected] memin@leodrive.ai yavuz@leodrive.ai
system/autoware_default_adapi/** [email protected] [email protected] [email protected]
system/autoware_processing_time_checker/** [email protected] [email protected]
system/bluetooth_monitor/** [email protected]
Expand All @@ -231,13 +231,11 @@ system/diagnostic_graph_utils/** [email protected]
system/dummy_diag_publisher/** [email protected] [email protected]
system/dummy_infrastructure/** [email protected]
system/duplicated_node_checker/** [email protected] [email protected] [email protected]
system/emergency_handler/** [email protected] [email protected] [email protected]
system/hazard_status_converter/** [email protected]
system/mrm_comfortable_stop_operator/** [email protected] [email protected]
system/mrm_emergency_stop_operator/** [email protected] [email protected]
system/mrm_handler/** [email protected] [email protected] [email protected]
system/system_diagnostic_monitor/** [email protected]
system/system_error_monitor/** [email protected]
system/system_monitor/** [email protected] [email protected]
system/topic_state_monitor/** [email protected]
system/velodyne_monitor/** [email protected]
Expand All @@ -246,6 +244,5 @@ vehicle/autoware_accel_brake_map_calibrator/** [email protected] taiki.tana
vehicle/autoware_external_cmd_converter/** [email protected] [email protected]
vehicle/autoware_raw_vehicle_cmd_converter/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
vehicle/autoware_steer_offset_estimator/** [email protected]
vehicle/autoware_vehicle_info_utils/** [email protected] [email protected] [email protected]

### Copied from .github/CODEOWNERS-manual ###
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Upload Cppcheck report
if: ${{ steps.filter-paths-no-cpp-files.outputs.filtered-full-paths != '' }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: cppcheck-report
path: cppcheck-report.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck-weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
shell: bash

- name: Upload Cppcheck report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: cppcheck-report
path: cppcheck-report.xml
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: yamllint

- repo: https://github.com/tier4/pre-commit-hooks-ros
rev: v0.9.0
rev: v0.10.0
hooks:
- id: flake8-ros
- id: prettier-xacro
Expand All @@ -49,7 +49,7 @@ repos:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
rev: v3.9.0-1
hooks:
- id: shfmt
args: [-w, -s, -i=4]
Expand All @@ -60,7 +60,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
args: [--line-length=100]
Expand All @@ -79,7 +79,7 @@ repos:
exclude: .cu

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
rev: 0.29.2
hooks:
- id: check-metaschema
files: ^.+/schema/.*schema\.json$
Expand Down
2 changes: 1 addition & 1 deletion build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repositories:
core/autoware_lanelet2_extension:
type: git
url: https://github.com/autowarefoundation/autoware_lanelet2_extension.git
version: 0.5.0
version: 0.6.1
core/autoware.core:
type: git
url: https://github.com/autowarefoundation/autoware.core.git
Expand Down
1 change: 0 additions & 1 deletion common/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ nav:
- 'tier4_camera_view_rviz_plugin': common/tier4_camera_view_rviz_plugin
- 'tier4_datetime_rviz_plugin': common/tier4_datetime_rviz_plugin
- 'tier4_localization_rviz_plugin': common/tier4_localization_rviz_plugin
- 'tier4_perception_rviz_plugin': common/tier4_perception_rviz_plugin
- 'tier4_planning_rviz_plugin': common/tier4_planning_rviz_plugin
- 'tier4_state_rviz_plugin': common/tier4_state_rviz_plugin
- 'tier4_system_rviz_plugin': common/tier4_system_rviz_plugin
Expand Down
13 changes: 0 additions & 13 deletions common/autoware_motion_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@ const size_t traffic_obj_nearest_idx = findNearestIndexFromLaneId(path_with_lane
const size_t traffic_obj_nearest_seg_idx = findNearestSegmentIndexFromLaneId(path_with_lane_id, traffic_obj_pos, lane_id);
```

## Path/Trajectory length calculation between designated points

Based on the discussion so far, the nearest index search algorithm is different depending on the object type.
Therefore, we recommended using the wrapper utility functions which require the nearest index search (e.g., calculating the path length) with each nearest index search.

For example, when we want to calculate the path length between the ego and the dynamic object, the implementation is as follows.

```cpp
const size_t ego_nearest_seg_idx = findFirstNearestSegmentIndex(points, ego_pose, ego_nearest_dist_threshold, ego_nearest_yaw_threshold);
const size_t dyn_obj_nearest_seg_idx = findFirstNearestSegmentIndex(points, dyn_obj_pose, dyn_obj_nearest_dist_threshold);
const double length_from_ego_to_obj = calcSignedArcLength(points, ego_pose, ego_nearest_seg_idx, dyn_obj_pose, dyn_obj_nearest_seg_idx);
```

## For developers

Some of the template functions in `trajectory.hpp` are mostly used for specific types (`autoware_planning_msgs::msg::PathPoint`, `autoware_planning_msgs::msg::PathPoint`, `autoware_planning_msgs::msg::TrajectoryPoint`), so they are exported as `extern template` functions to speed-up compilation time.
Expand Down
17 changes: 17 additions & 0 deletions common/autoware_motion_utils/src/resample/resample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "interpolation/spline_interpolation.hpp"
#include "interpolation/zero_order_hold.hpp"

#include <cstdlib>

namespace autoware::motion_utils
{
std::vector<geometry_msgs::msg::Point> resamplePointVector(
Expand Down Expand Up @@ -601,11 +603,13 @@ autoware_planning_msgs::msg::Trajectory resampleTrajectory(
rear_wheel_angle.push_back(input_trajectory.points.front().rear_wheel_angle_rad);
time_from_start.push_back(
rclcpp::Duration(input_trajectory.points.front().time_from_start).seconds());

for (size_t i = 1; i < input_trajectory.points.size(); ++i) {
const auto & prev_pt = input_trajectory.points.at(i - 1);
const auto & curr_pt = input_trajectory.points.at(i);
const double ds =
autoware::universe_utils::calcDistance2d(prev_pt.pose.position, curr_pt.pose.position);

input_arclength.push_back(ds + input_arclength.back());
input_pose.push_back(curr_pt.pose);
v_lon.push_back(curr_pt.longitudinal_velocity_mps);
Expand All @@ -617,6 +621,19 @@ autoware_planning_msgs::msg::Trajectory resampleTrajectory(
time_from_start.push_back(rclcpp::Duration(curr_pt.time_from_start).seconds());
}

// Set Zero Velocity After Stop Point
// If the longitudinal velocity is zero, set the velocity to zero after that point.
bool stop_point_found_in_v_lon = false;
constexpr double epsilon = 1e-4;
for (size_t i = 0; i < v_lon.size(); ++i) {
if (std::abs(v_lon.at(i)) < epsilon) {
stop_point_found_in_v_lon = true;
}
if (stop_point_found_in_v_lon) {
v_lon.at(i) = 0.0;
}
}

// Interpolate
const auto lerp = [&](const auto & input) {
return interpolation::lerp(input_arclength, input, resampled_arclength);
Expand Down
Loading

0 comments on commit b34c1a1

Please sign in to comment.