Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: consider another way of inserting safe velocity #17

Conversation

taikitanaka3
Copy link
Owner

@taikitanaka3 taikitanaka3 commented Jun 30, 2022

Description

もともと速度計画に影響のない場所への停止点埋め込みはしないように検知エリアで限定していたが、この速度計画に影響のない値は以下を前提としており、うまく実現するのは難しい。そこでpass judgeというフラグを用いて速度計画に影響がある部分のみを検知エリアとするのか、そもそも経路から横距離何メートル以内の死角はすべて見るようにするのかのフラグの追加

  • 速度計画の手法に依存すること
  • 車速、加速度がなめらかであること

もともとは急ブレーキを踏んで止まれる速度、止まれる距離を埋め込むこととしていたが、こちらは以下の理由により死角の位置にほぼ停止速度を埋め込み死角がなくなるまで減速を解除しないようにするかどうかのフラグを追加

  • 速度計画を用いて検知エリアを作成しているため、通過可能かどうかの判定はより正しく行えるようになった
  • もし死角から歩行者が飛び出してきても想定したacc/jerkでブレーキを踏めるとは限らないため、現状死角が解除するまで減速を続ける機能があったほうが、より安全に走行できる。

その他
軽いrefactor

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@taikitanaka3 taikitanaka3 self-assigned this Jun 30, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

@@ -42,8 +42,7 @@ int insertSafeVelocityToPath(
SafeMotion calculateSafeMotion(const Velocity & v, const double ttc);

double calculateInsertVelocity(
const double min_allowed_vel, const double safe_vel, const double min_vel,
const double original_vel);
const double min_allowed_vel, const double safe_vel, const double original_vel);

} // namespace occlusion_spot_utils

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ modernize-concat-nested-namespaces ⚠️
nested namespaces can be concatenated

Suggested change
} // namespace occlusion_spot_utils
}

@@ -321,11 +321,22 @@
*/
PossibleCollisionInfo pc;
const double ttc = std::abs(arc_coord_occlusion_with_offset.distance / param.pedestrian_vel);
SafeMotion sm = calculateSafeMotion(param.v, ttc);
double distance_to_stop = arc_coord_occlusion_with_offset.length - sm.stop_dist;
SafeMotion sm;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
uninitialized record type: sm

Suggested change
SafeMotion sm;
SafeMotion sm{};

// lower bound min = 0
ASSERT_EQ(calculateInsertVelocity(inf, inf, 0, inf), inf);
}

TEST(insertSafeVelocityToPath, replace_original_at_too_close_case)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-special-member-functions ⚠️
class insertSafeVelocityToPath_replace_original_at_too_close_case_Test defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator

Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
@taikitanaka3 taikitanaka3 force-pushed the feature/occlusion_spot_add_insert_almost_zero_velocity_option branch from eaaa37d to a7fc273 Compare July 1, 2022 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant