Hi, as explained in the code below, you pre-allocate n_vertices * N / 2 memories for vector all_constraints.
|
all_constraints.reserve( |
|
n_vertices_ * N / |
|
2); // Will have exactly this number of elements in the end. |
I think the right size should be (n_vertices - 1) * N, i.e. Num. of all constraints = Num. segments * N. But this result is still correct, because you re-calculate the size of total constraints.
Hi, as explained in the code below, you pre-allocate
n_vertices * N / 2memories for vectorall_constraints.mav_trajectory_generation/mav_trajectory_generation/include/mav_trajectory_generation/impl/polynomial_optimization_linear_impl.h
Lines 192 to 194 in 7aeebd9
I think the right size should be
(n_vertices - 1) * N, i.e. Num. of all constraints = Num. segments * N. But this result is still correct, because you re-calculate the size of total constraints.