Skip to content

Commit

Permalink
refactor(behavior_path_planner): create path_safety_checker directory (
Browse files Browse the repository at this point in the history
…autowarefoundation#4644)

* create safety_check directory

Signed-off-by: kyoichi-sugahara <[email protected]>

* style(pre-commit): autofix

* rename directory name safety_check to path_safety_checker

Signed-off-by: kyoichi-sugahara <[email protected]>

* style(pre-commit): autofix

* change directory name

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
kyoichi-sugahara and pre-commit-ci[bot] authored Aug 17, 2023
1 parent 49f9d9d commit e1a86f9
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion planning/behavior_path_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ament_auto_add_library(behavior_path_planner_node SHARED
src/turn_signal_decider.cpp
src/utils/utils.cpp
src/utils/path_utils.cpp
src/utils/safety_check.cpp
src/utils/path_safety_checker/safety_check.cpp
src/utils/avoidance/utils.cpp
src/utils/lane_change/utils.cpp
src/utils/side_shift/util.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Currently the yaw angle of each point of predicted paths of a target object does

The flow of the safety check algorithm is described in the following explanations.

![safety_check_flow](../image/safety_check/safety_check_flow.drawio.svg)
![safety_check_flow](../image/path_safety_checker/safety_check_flow.drawio.svg)

Here we explain each step of the algorithm flow.

Expand All @@ -38,7 +38,7 @@ With the interpolated pose obtained in the step.1, we check if the object and eg

After the overlap check, it starts to perform the safety check for the broader range. In this step, it judges if ego or target object is in front of the other vehicle. We use arc length of the front point of each object along the given path to judge which one is in front of the other. In the following example, target object (red rectangle) is running in front of the ego vehicle (black rectangle).

![front_object](../image/safety_check/front_object.drawio.svg)
![front_object](../image/path_safety_checker/front_object.drawio.svg)

#### 4. Calculate RSS distance

Expand All @@ -54,7 +54,7 @@ where $V_{front}$, $v_{rear}$ are front and rear vehicle velocity respectively a

In this step, we compute extended ego and target object polygons. The extended polygons can be described as:

![extended_polygons](../image/safety_check/extended_polygons.drawio.svg)
![extended_polygons](../image/path_safety_checker/extended_polygons.drawio.svg)

As the picture shows, we expand the rear object polygon. For the longitudinal side, we extend it with the RSS distance, and for the lateral side, we extend it by the lateral margin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "behavior_path_planner/scene_module/scene_module_visitor.hpp"
#include "behavior_path_planner/utils/avoidance/avoidance_module_data.hpp"
#include "behavior_path_planner/utils/avoidance/helper.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"

#include <rclcpp/rclcpp.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "behavior_path_planner/data_manager.hpp"
#include "behavior_path_planner/utils/avoidance/avoidance_module_data.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"

#include <algorithm>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define BEHAVIOR_PATH_PLANNER__UTILS__LANE_CHANGE__LANE_CHANGE_MODULE_DATA_HPP_

#include "behavior_path_planner/utils/avoidance/avoidance_module_data.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"
#include "lanelet2_core/geometry/Lanelet.h"

#include "autoware_auto_planning_msgs/msg/path_point_with_lane_id.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "behavior_path_planner/parameters.hpp"
#include "behavior_path_planner/utils/lane_change/lane_change_module_data.hpp"
#include "behavior_path_planner/utils/lane_change/lane_change_path.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"
#include "behavior_path_planner/utils/utils.hpp"

#include <route_handler/route_handler.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef BEHAVIOR_PATH_PLANNER__UTILS__SAFETY_CHECK_HPP_
#define BEHAVIOR_PATH_PLANNER__UTILS__SAFETY_CHECK_HPP_
#ifndef BEHAVIOR_PATH_PLANNER__UTILS__PATH_SAFETY_CHECKER__SAFETY_CHECK_HPP_
#define BEHAVIOR_PATH_PLANNER__UTILS__PATH_SAFETY_CHECKER__SAFETY_CHECK_HPP_

#include "behavior_path_planner/data_manager.hpp"
#include "behavior_path_planner/marker_utils/utils.hpp"
Expand Down Expand Up @@ -147,4 +147,4 @@ bool checkCollision(

} // namespace behavior_path_planner::utils::safety_check

#endif // BEHAVIOR_PATH_PLANNER__UTILS__SAFETY_CHECK_HPP_
#endif // BEHAVIOR_PATH_PLANNER__UTILS__PATH_SAFETY_CHECKER__SAFETY_CHECK_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "behavior_path_planner/marker_utils/utils.hpp"
#include "behavior_path_planner/utils/lane_change/lane_change_module_data.hpp"
#include "behavior_path_planner/utils/lane_following/module_data.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"
#include "behavior_path_planner/utils/start_planner/pull_out_path.hpp"
#include "motion_utils/motion_utils.hpp"
#include "object_recognition_utils/predicted_path_utils.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include "behavior_path_planner/parameters.hpp"
#include "behavior_path_planner/utils/lane_change/lane_change_module_data.hpp"
#include "behavior_path_planner/utils/lane_change/lane_change_path.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"
#include "behavior_path_planner/utils/path_shifter/path_shifter.hpp"
#include "behavior_path_planner/utils/path_utils.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/utils.hpp"

#include <lanelet2_extension/utility/message_conversion.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"

#include "behavior_path_planner/marker_utils/utils.hpp"
#include "interpolation/linear_interpolation.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"
#include "tier4_autoware_utils/tier4_autoware_utils.hpp"

#include <gmock/gmock.h>
Expand Down
2 changes: 1 addition & 1 deletion planning/behavior_path_planner/test/test_safety_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include "behavior_path_planner/marker_utils/utils.hpp"
#include "behavior_path_planner/utils/safety_check.hpp"
#include "behavior_path_planner/utils/path_safety_checker/safety_check.hpp"
#include "tier4_autoware_utils/tier4_autoware_utils.hpp"

#include <geometry_msgs/msg/pose.hpp>
Expand Down

0 comments on commit e1a86f9

Please sign in to comment.