Skip to content

Commit

Permalink
feat(crosswalk): add pass marker (#9952)
Browse files Browse the repository at this point in the history
Signed-off-by: yuki-takagi-66 <[email protected]>
  • Loading branch information
yuki-takagi-66 authored Jan 21, 2025
1 parent aa840ce commit ce3358e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct DebugData

std::vector<geometry_msgs::msg::Pose> stop_poses;
std::vector<geometry_msgs::msg::Pose> slow_poses;
std::vector<geometry_msgs::msg::Pose> pass_poses;
std::vector<geometry_msgs::msg::Point> stop_factor_points;
std::vector<geometry_msgs::msg::Point> crosswalk_polygon;
std::vector<std::vector<geometry_msgs::msg::Point>> ego_polygons;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ autoware::motion_utils::VirtualWalls CrosswalkModule::createVirtualWalls()
wall.pose = calcOffsetPose(p, debug_data_.base_link2front, 0.0, 0.0);
virtual_walls.push_back(wall);
}
wall.style = autoware::motion_utils::VirtualWallType::pass;
wall.text += debug_data_.virtual_wall_suffix;
for (const auto & p : debug_data_.pass_poses) {
wall.pose = calcOffsetPose(p, debug_data_.base_link2front, 0.0, 0.0);
virtual_walls.push_back(wall);
}

return virtual_walls;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,13 @@ std::optional<geometry_msgs::msg::Pose> CrosswalkModule::calcStopPose(
return strong_brk_dist_opt ? strong_brk_dist_opt.value() : 0.0;
}();
if (selected_stop.dist < strong_brk_dist - p.overrun_threshold_length_for_no_stop_decision) {
RCLCPP_INFO(
logger_,
RCLCPP_INFO_THROTTLE(
logger_, *clock_, 1000,
"Abandon to stop. "
"Can not stop against the nearest pedestrian with a specified deceleration. "
"dist to stop: %f, braking distance: %f",
selected_stop.dist, strong_brk_dist);
debug_data_.pass_poses.push_back(selected_stop.pose);
return std::nullopt;
}

Expand Down

0 comments on commit ce3358e

Please sign in to comment.