-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(avoidance_by_lane_change): reuse lane change class (#3577)
* refactor(avoidance_by_lane_change): reuse lane change class Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix wrong direction Signed-off-by: Muhammad Zulfaqar <zulfaqar.azmi@tier4.jp> * fix conflict Signed-off-by: Muhammad Zulfaqar <zulfaqar.azmi@tier4.jp> * fix rtc paramters Signed-off-by: Muhammad Zulfaqar <zulfaqar.azmi@tier4.jp> * Revert "fix rtc paramters" This reverts commit 16be270. * fix rtc Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix pre-commit Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * fix pre-commit and move updateRTCStatus to cpp file Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * COMPILE_WITH_OLD_ARCHITECTURE=TRUE Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> --------- Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> Signed-off-by: Muhammad Zulfaqar <zulfaqar.azmi@tier4.jp>
- Loading branch information
1 parent
db8e81e
commit de8afd7
Showing
17 changed files
with
487 additions
and
723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...anner/include/behavior_path_planner/scene_module/lane_change/avoidance_by_lane_change.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2023 TIER IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// 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. | ||
|
||
#ifndef BEHAVIOR_PATH_PLANNER__SCENE_MODULE__LANE_CHANGE__AVOIDANCE_BY_LANE_CHANGE_HPP_ | ||
#define BEHAVIOR_PATH_PLANNER__SCENE_MODULE__LANE_CHANGE__AVOIDANCE_BY_LANE_CHANGE_HPP_ | ||
|
||
#include "behavior_path_planner/scene_module/lane_change/normal.hpp" | ||
|
||
#include <memory> | ||
#include <utility> | ||
|
||
namespace behavior_path_planner | ||
{ | ||
using autoware_auto_planning_msgs::msg::PathWithLaneId; | ||
using geometry_msgs::msg::Pose; | ||
using geometry_msgs::msg::Twist; | ||
using tier4_planning_msgs::msg::LaneChangeDebugMsg; | ||
using tier4_planning_msgs::msg::LaneChangeDebugMsgArray; | ||
using AvoidanceDebugData = DebugData; | ||
|
||
class AvoidanceByLaneChange : public NormalLaneChange | ||
{ | ||
public: | ||
AvoidanceByLaneChange( | ||
const std::shared_ptr<LaneChangeParameters> & parameters, | ||
std::shared_ptr<AvoidanceParameters> avoidance_parameters, | ||
std::shared_ptr<AvoidanceByLCParameters> avoidance_by_lane_change_parameters); | ||
|
||
void updateSpecialData() override; | ||
|
||
std::pair<bool, bool> getSafePath(LaneChangePath & safe_path) const override; | ||
|
||
private: | ||
std::shared_ptr<AvoidanceParameters> avoidance_parameters_; | ||
std::shared_ptr<AvoidanceByLCParameters> avoidance_by_lane_change_parameters_; | ||
|
||
AvoidancePlanningData calcAvoidancePlanningData(AvoidanceDebugData & debug) const; | ||
AvoidancePlanningData avoidance_data_; | ||
mutable AvoidanceDebugData avoidance_debug_data_; | ||
|
||
ObjectDataArray registered_objects_; | ||
mutable ObjectDataArray stopped_objects_; | ||
|
||
ObjectData createObjectData( | ||
const AvoidancePlanningData & data, const PredictedObject & object) const; | ||
|
||
void fillAvoidanceTargetObjects(AvoidancePlanningData & data, AvoidanceDebugData & debug) const; | ||
}; | ||
} // namespace behavior_path_planner | ||
|
||
#endif // BEHAVIOR_PATH_PLANNER__SCENE_MODULE__LANE_CHANGE__AVOIDANCE_BY_LANE_CHANGE_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
...behavior_path_planner/include/behavior_path_planner/utils/avoidance_by_lc/module_data.hpp
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.