@@ -425,7 +425,7 @@ BehaviorModuleOutput DynamicAvoidanceModule::planWaitingApproval()
425
425
return out;
426
426
}
427
427
428
- ObjectBehaviorType DynamicAvoidanceModule::isLabelTargetObstacle (const uint8_t label) const
428
+ ObjectBehaviorType DynamicAvoidanceModule::getLabelAsTargetObstacle (const uint8_t label) const
429
429
{
430
430
using autoware_auto_perception_msgs::msg::ObjectClassification;
431
431
@@ -480,7 +480,7 @@ void DynamicAvoidanceModule::registerLaneDriveObjects(
480
480
481
481
// 1.a. check label
482
482
if (
483
- isLabelTargetObstacle (predicted_object.classification .front ().label ) !=
483
+ getLabelAsTargetObstacle (predicted_object.classification .front ().label ) !=
484
484
ObjectBehaviorType::LaneDriveObject) {
485
485
continue ;
486
486
}
@@ -571,7 +571,7 @@ void DynamicAvoidanceModule::registerFreeRunObjects(
571
571
572
572
// 1.a. check label
573
573
if (
574
- isLabelTargetObstacle (predicted_object.classification .front ().label ) !=
574
+ getLabelAsTargetObstacle (predicted_object.classification .front ().label ) !=
575
575
ObjectBehaviorType::FreeRunObject) {
576
576
continue ;
577
577
}
@@ -591,8 +591,8 @@ void DynamicAvoidanceModule::registerFreeRunObjects(
591
591
RCLCPP_INFO_EXPRESSION (
592
592
getLogger (), parameters_->enable_debug_info ,
593
593
" [DynamicAvoidance] Ignore obstacle (%s) since it crosses the ego's path with its normal "
594
- " vel (%s ) m/s." ,
595
- obj_uuid.c_str (), std::to_string ( obj_normal_vel). c_str () );
594
+ " vel (%5.2f ) m/s." ,
595
+ obj_uuid.c_str (), obj_normal_vel);
596
596
continue ;
597
597
}
598
598
@@ -608,8 +608,8 @@ void DynamicAvoidanceModule::registerFreeRunObjects(
608
608
if (space_between_obj_and_ego > parameters_->max_obj_lat_offset_to_ego_path ) {
609
609
RCLCPP_INFO_EXPRESSION (
610
610
getLogger (), parameters_->enable_debug_info ,
611
- " [DynamicAvoidance] Ignore obstacle (%s) since lateral offset (%s ) is large." ,
612
- obj_uuid.c_str (), std::to_string ( estimated_dist_obj_center_to_path). c_str () );
611
+ " [DynamicAvoidance] Ignore obstacle (%s) since lateral offset (%7.3f ) is large." ,
612
+ obj_uuid.c_str (), estimated_dist_obj_center_to_path);
613
613
continue ;
614
614
}
615
615
@@ -646,7 +646,7 @@ void DynamicAvoidanceModule::determineWheterToAvoidAgainstLaneDriveObjects(
646
646
const auto & input_path = getPreviousModuleOutput ().path ;
647
647
648
648
for (const auto & object : target_objects_manager_.getValidObjects ()) {
649
- if (isLabelTargetObstacle (object.label ) != ObjectBehaviorType::LaneDriveObject) {
649
+ if (getLabelAsTargetObstacle (object.label ) != ObjectBehaviorType::LaneDriveObject) {
650
650
continue ;
651
651
}
652
652
@@ -805,7 +805,7 @@ void DynamicAvoidanceModule::determineWheterToAvoidAgainstFreeRunObjects(
805
805
const auto & input_path = getPreviousModuleOutput ().path ;
806
806
807
807
for (const auto & object : target_objects_manager_.getValidObjects ()) {
808
- if (isLabelTargetObstacle (object.label ) != ObjectBehaviorType::FreeRunObject) {
808
+ if (getLabelAsTargetObstacle (object.label ) != ObjectBehaviorType::FreeRunObject) {
809
809
continue ;
810
810
}
811
811
@@ -1075,10 +1075,10 @@ bool DynamicAvoidanceModule::isObjectFarFromPath(
1075
1075
const PredictedObject & predicted_object, const double obj_dist_to_path) const
1076
1076
{
1077
1077
const double obj_max_length = calcObstacleMaxLength (predicted_object.shape );
1078
- const double space_between_obj_and_ego = std::max (
1078
+ const double min_obj_dist_to_path = std::max (
1079
1079
0.0 , obj_dist_to_path - planner_data_->parameters .vehicle_width / 2.0 - obj_max_length);
1080
1080
1081
- return parameters_->max_obj_lat_offset_to_ego_path < space_between_obj_and_ego ;
1081
+ return parameters_->max_obj_lat_offset_to_ego_path < min_obj_dist_to_path ;
1082
1082
}
1083
1083
1084
1084
bool DynamicAvoidanceModule::willObjectCutIn (
0 commit comments