Skip to content

Commit 5b18c25

Browse files
fix(dynamic_avoidance): fix minor bugs and comment (#6358)
fix behavior_path_planner state fix incorrect comments Signed-off-by: Yuki Takagi <yuki.takagi@tier4.jp>
1 parent 309deea commit 5b18c25

File tree

2 files changed

+4
-6
lines changed
  • planning/behavior_path_dynamic_avoidance_module

2 files changed

+4
-6
lines changed

planning/behavior_path_dynamic_avoidance_module/include/behavior_path_dynamic_avoidance_module/scene.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,6 @@ class DynamicAvoidanceModule : public SceneModuleInterface
345345

346346
bool canTransitFailureState() override { return false; }
347347

348-
ModuleStatus setInitState() const override { return ModuleStatus::IDLE; }
349-
350348
bool isLabelTargetObstacle(const uint8_t label) const;
351349
void updateTargetObjects();
352350
LatFeasiblePaths generateLateralFeasiblePaths(

planning/behavior_path_dynamic_avoidance_module/src/scene.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,11 @@ MinMaxValue DynamicAvoidanceModule::calcMinMaxLongitudinalOffsetToAvoid(
10661066
// calculate bound start and end length
10671067
const double start_length_to_avoid = [&]() {
10681068
if (obj_vel < parameters_->max_stopped_object_vel) {
1069-
// The ego and object are the same directional or the object is parked.
1069+
// The ego and object are the opposite directional or the object is parked.
10701070
return std::min(time_while_collision.time_to_start_collision, 8.0) * std::abs(obj_vel) +
10711071
std::abs(relative_velocity) * parameters_->start_duration_to_avoid_oncoming_object;
10721072
}
1073-
// The ego and object are the opposite directional.
1073+
// The ego and object are the same directional.
10741074
const double obj_acc = -0.5;
10751075
const double decel_time = 1.0;
10761076
const double obj_moving_dist =
@@ -1082,10 +1082,10 @@ MinMaxValue DynamicAvoidanceModule::calcMinMaxLongitudinalOffsetToAvoid(
10821082
}();
10831083
const double end_length_to_avoid = [&]() {
10841084
if (obj_vel < parameters_->max_stopped_object_vel) {
1085-
// The ego and object are the same directional or the object is parked.
1085+
// The ego and object are the opposite directional or the object is parked.
10861086
return std::abs(relative_velocity) * parameters_->end_duration_to_avoid_oncoming_object;
10871087
}
1088-
// The ego and object are the opposite directional.
1088+
// The ego and object are the same directional.
10891089
return std::min(time_while_collision.time_to_end_collision, 3.0) * obj_vel +
10901090
std::abs(relative_velocity) * parameters_->end_duration_to_avoid_overtaking_object;
10911091
}();

0 commit comments

Comments
 (0)