Skip to content

Commit c3134c2

Browse files
authored
fix(path_optimizer): remove unnecesary optional (#10181)
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
1 parent 28308e8 commit c3134c2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

planning/autoware_path_optimizer/include/autoware/path_optimizer/mpt_optimizer.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ struct ReferencePoint
7575
// additional information
7676
double curvature{0.0};
7777
double delta_arc_length{0.0};
78-
double alpha{0.0}; // for minimizing lateral error
79-
Bounds bounds{}; // bounds on `pose`
80-
std::vector<std::optional<double>> beta{}; // for collision-free constraint
78+
double alpha{0.0}; // for minimizing lateral error
79+
Bounds bounds{}; // bounds on `pose`
80+
std::vector<double> beta{}; // for collision-free constraint
8181
double normalized_avoidance_cost{0.0};
8282

8383
// bounds and its local pose on each collision-free constraint

planning/autoware_path_optimizer/src/mpt_optimizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ MPTOptimizer::ConstraintMatrix MPTOptimizer::calcConstraintMatrix(
13511351

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

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

0 commit comments

Comments
 (0)