File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
nav2_regulated_pure_pursuit_controller/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ geometry_msgs::msg::TwistStamped RegulatedPurePursuitController::computeVelocity
187
187
188
188
// Find look ahead distance and point on path and publish
189
189
double lookahead_dist = getLookAheadDistance (speed);
190
+ double curv_lookahead_dist = params_->curvature_lookahead_dist ;
190
191
191
192
// Check for reverse driving
192
193
if (params_->allow_reversing ) {
@@ -197,6 +198,9 @@ geometry_msgs::msg::TwistStamped RegulatedPurePursuitController::computeVelocity
197
198
if (dist_to_cusp < lookahead_dist) {
198
199
lookahead_dist = dist_to_cusp;
199
200
}
201
+ if (dist_to_cusp < curv_lookahead_dist) {
202
+ curv_lookahead_dist = dist_to_cusp;
203
+ }
200
204
}
201
205
202
206
// Get the particular point on the path at the lookahead distance
@@ -211,7 +215,7 @@ geometry_msgs::msg::TwistStamped RegulatedPurePursuitController::computeVelocity
211
215
double regulation_curvature = lookahead_curvature;
212
216
if (params_->use_fixed_curvature_lookahead ) {
213
217
auto curvature_lookahead_pose = getLookAheadPoint (
214
- params_-> curvature_lookahead_dist ,
218
+ curv_lookahead_dist ,
215
219
transformed_plan, params_->interpolate_curvature_after_goal );
216
220
rotate_to_path_carrot_pose = curvature_lookahead_pose;
217
221
regulation_curvature = calculateCurvature (curvature_lookahead_pose.pose .position );
You can’t perform that action at this time.
0 commit comments