Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored and beyzanurkaya committed Jun 5, 2024
1 parent f095639 commit 501b643
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ std::optional<geometry_msgs::msg::Point> find_closest_collision_point(
auto p = geometry_msgs::msg::Point().set__x(coll_p.x()).set__y(coll_p.y());
const auto dist_ego_to_coll =
motion_utils::calcSignedArcLength(ego_data.path.points, ego_pose.position, p);
const auto dist_obj_to_coll = tier4_autoware_utils::calcDistance2d(object_pose.position, p);
const auto tta_cp_npc = abs(dist_obj_to_coll) / object.kinematics.initial_twist_with_covariance.twist.linear.x;
const auto tta_cp_ego = dist_ego_to_coll / ego_data.path.points[path_idx].point.longitudinal_velocity_mps;
if (abs(dist_ego_to_coll) < closest_dist && std::abs(tta_cp_npc - tta_cp_ego) < params.time_horizon) {
const auto dist_obj_to_coll =
tier4_autoware_utils::calcDistance2d(object_pose.position, p);
const auto tta_cp_npc =
abs(dist_obj_to_coll) / object.kinematics.initial_twist_with_covariance.twist.linear.x;
const auto tta_cp_ego =
dist_ego_to_coll / ego_data.path.points[path_idx].point.longitudinal_velocity_mps;
if (
abs(dist_ego_to_coll) < closest_dist &&
std::abs(tta_cp_npc - tta_cp_ego) < params.time_horizon) {
closest_dist = dist_ego_to_coll;
closest_collision_point = p;
}
Expand Down

0 comments on commit 501b643

Please sign in to comment.