Skip to content

Commit

Permalink
chore(behavior_velocity): parameterlize detection area length (#1346)
Browse files Browse the repository at this point in the history
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
  • Loading branch information
taikitanaka3 committed Aug 8, 2022
1 parent 16629dd commit 285059b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ struct PlannerParam
bool use_moving_object_ray_cast; // [-]
bool use_partition_lanelet; // [-]
// parameters in yaml
double detection_area_offset; // [m]
double detection_area_length; // [m]
double detection_area_max_length; // [m]
double stuck_vehicle_vel; // [m/s]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ OcclusionSpotModuleManager::OcclusionSpotModuleManager(rclcpp::Node & node)
pp.is_show_processing_time = node.declare_parameter(ns + ".debug.is_show_processing_time", false);

// threshold
pp.detection_area_offset = node.declare_parameter(ns + ".threshold.detection_area_offset", 30.0);
pp.detection_area_length = node.declare_parameter(ns + ".threshold.detection_area_length", 200.0);
pp.stuck_vehicle_vel = node.declare_parameter(ns + ".threshold.stuck_vehicle_vel", 1.0);
pp.lateral_distance_thr = node.declare_parameter(ns + ".threshold.lateral_distance", 10.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ bool OcclusionSpotModule::modifyPathVelocity(
param_.v.v_ego = planner_data_->current_velocity->twist.linear.x;
param_.v.a_ego = planner_data_->current_accel.get();
param_.v.delay_time = planner_data_->system_delay;
const double detection_area_offset = 5.0; // for visualization and stability
param_.detection_area_max_length =
planning_utils::calcJudgeLineDistWithJerkLimit(
param_.v.v_ego, param_.v.a_ego, param_.v.non_effective_accel, param_.v.non_effective_jerk,
planner_data_->delay_response_time) +
detection_area_offset;
param_.detection_area_offset; // To fill difference between planned and measured acc
}
const geometry_msgs::msg::Pose ego_pose = planner_data_->current_pose.pose;
PathWithLaneId clipped_path;
Expand Down

0 comments on commit 285059b

Please sign in to comment.