Skip to content

Commit

Permalink
fix(path_optimizer): remove unnecesary optional (#10181)
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 authored Mar 10, 2025
1 parent 28308e8 commit c3134c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ struct ReferencePoint
// additional information
double curvature{0.0};
double delta_arc_length{0.0};
double alpha{0.0}; // for minimizing lateral error
Bounds bounds{}; // bounds on `pose`
std::vector<std::optional<double>> beta{}; // for collision-free constraint
double alpha{0.0}; // for minimizing lateral error
Bounds bounds{}; // bounds on `pose`
std::vector<double> beta{}; // for collision-free constraint
double normalized_avoidance_cost{0.0};

// bounds and its local pose on each collision-free constraint
Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_path_optimizer/src/mpt_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ MPTOptimizer::ConstraintMatrix MPTOptimizer::calcConstraintMatrix(

// calculate C mat and vec
for (size_t i = 0; i < N_ref; ++i) {
const double beta = *ref_points.at(i).beta.at(l_idx);
const double beta = ref_points.at(i).beta.at(l_idx);
const double lon_offset = vehicle_circle_longitudinal_offsets_.at(l_idx);

C_triplet_vec.push_back(Eigen::Triplet<double>(i, i * D_x, 1.0 * std::cos(beta)));
Expand Down

0 comments on commit c3134c2

Please sign in to comment.