@@ -81,7 +81,7 @@ class NormalLaneChange : public LaneChangeBase
81
81
PathSafetyStatus evaluateApprovedPathWithUnsafeHysteresis (
82
82
PathSafetyStatus approved_path_safety_status) override ;
83
83
84
- bool isRequiredStop (const bool is_object_coming_from_rear ) override ;
84
+ bool isRequiredStop (const bool is_trailing_object ) override ;
85
85
86
86
bool isNearEndOfCurrentLanes (
87
87
const lanelet::ConstLanelets & current_lanes, const lanelet::ConstLanelets & target_lanes,
@@ -91,6 +91,8 @@ class NormalLaneChange : public LaneChangeBase
91
91
92
92
bool isAbleToReturnCurrentLane () const override ;
93
93
94
+ bool is_near_terminal () const final ;
95
+
94
96
bool isEgoOnPreparePhase () const override ;
95
97
96
98
bool isAbleToStopSafely () const override ;
@@ -119,19 +121,16 @@ class NormalLaneChange : public LaneChangeBase
119
121
const lanelet::ConstLanelets & current_lanes,
120
122
const lanelet::ConstLanelets & target_lanes) const ;
121
123
122
- ExtendedPredictedObjects getTargetObjects (
123
- const LaneChangeLanesFilteredObjects & predicted_objects,
124
+ lane_change::TargetObjects getTargetObjects (
125
+ const FilteredByLanesExtendedObjects & predicted_objects,
124
126
const lanelet::ConstLanelets & current_lanes) const ;
125
127
126
- LaneChangeLanesFilteredObjects filterObjects () const ;
128
+ FilteredByLanesExtendedObjects filterObjects () const ;
127
129
128
130
void filterOncomingObjects (PredictedObjects & objects) const ;
129
131
130
- void filterObjectsByLanelets (
131
- const PredictedObjects & objects, const PathWithLaneId & current_lanes_ref_path,
132
- std::vector<PredictedObject> & current_lane_objects,
133
- std::vector<PredictedObject> & target_lane_objects,
134
- std::vector<PredictedObject> & other_lane_objects) const ;
132
+ FilteredByLanesObjects filterObjectsByLanelets (
133
+ const PredictedObjects & objects, const PathWithLaneId & current_lanes_ref_path) const ;
135
134
136
135
PathWithLaneId getPrepareSegment (
137
136
const lanelet::ConstLanelets & current_lanes, const double backward_path_length,
@@ -157,9 +156,7 @@ class NormalLaneChange : public LaneChangeBase
157
156
158
157
bool getLaneChangePaths (
159
158
const lanelet::ConstLanelets & current_lanes, const lanelet::ConstLanelets & target_lanes,
160
- Direction direction, LaneChangePaths * candidate_paths,
161
- const utils::path_safety_checker::RSSparams rss_params, const bool is_stuck,
162
- const bool check_safety = true ) const override ;
159
+ Direction direction, const bool is_stuck, LaneChangePaths * candidate_paths) const ;
163
160
164
161
std::optional<LaneChangePath> calcTerminalLaneChangePath (
165
162
const lanelet::ConstLanelets & current_lanes,
@@ -169,7 +166,7 @@ class NormalLaneChange : public LaneChangeBase
169
166
170
167
PathSafetyStatus isLaneChangePathSafe (
171
168
const LaneChangePath & lane_change_path,
172
- const ExtendedPredictedObjects & collision_check_objects,
169
+ const lane_change::TargetObjects & collision_check_objects,
173
170
const utils::path_safety_checker::RSSparams & rss_params,
174
171
CollisionCheckDebugMap & debug_data) const ;
175
172
@@ -183,6 +180,24 @@ class NormalLaneChange : public LaneChangeBase
183
180
184
181
bool isVehicleStuck (const lanelet::ConstLanelets & current_lanes) const ;
185
182
183
+ /* *
184
+ * @brief Checks if the given pose is a valid starting point for a lane change.
185
+ *
186
+ * This function determines whether the given pose (position) of the vehicle is within
187
+ * the area of either the target neighbor lane or the target lane itself. It uses geometric
188
+ * checks to see if the start point of the lane change is covered by the polygons representing
189
+ * these lanes.
190
+ *
191
+ * @param common_data_ptr Shared pointer to a CommonData structure, which should include:
192
+ * - Non-null `lanes_polygon_ptr` that contains the polygon data for lanes.
193
+ * @param pose The current pose of the vehicle
194
+ *
195
+ * @return `true` if the pose is within either the target neighbor lane or the target lane;
196
+ * `false` otherwise.
197
+ */
198
+ bool is_valid_start_point (
199
+ const lane_change::CommonDataPtr & common_data_ptr, const Pose & pose) const ;
200
+
186
201
bool check_prepare_phase () const ;
187
202
188
203
double calcMaximumLaneChangeLength (
0 commit comments