Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Takagi <[email protected]>
  • Loading branch information
yuki-takagi-66 committed Oct 4, 2024
1 parent 619bdb8 commit 79c4c8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planning/obstacle_avoidance_planner/src/mpt_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,14 @@ std::vector<TrajectoryPoint> MPTOptimizer::optimizeTrajectory(
const auto optimized_variables = calcOptimizedSteerAngles(ref_points, obj_mat, const_mat);
if (!optimized_variables) {
RCLCPP_WARN(logger_, "return std::nullopt since could not solve qp");
return get_prev_optimized_traj_points();
return smoothed_points;
}

// 7. convert to points with validation
const auto mpt_traj_points = calcMPTPoints(ref_points, *optimized_variables, mpt_mat);
if (!mpt_traj_points) {
RCLCPP_WARN(logger_, "return std::nullopt since lateral or yaw error is too large.");
return smoothed_points;
return get_prev_optimized_traj_points();
}

// 8. publish trajectories for debug
Expand Down

0 comments on commit 79c4c8b

Please sign in to comment.