ethz-asl/mav_trajectory_generation

wrong number of all constraints

huiwenzhang opened this issue · 0 comments

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.