Open huiwenzhang opened 2 years ago
Hi, as explained in the code below, you pre-allocate n_vertices * N / 2 memories for vector all_constraints.
n_vertices * N / 2
all_constraints
https://github.com/ethz-asl/mav_trajectory_generation/blob/7aeebd9f819217502fd1c5489da49efadf90d411/mav_trajectory_generation/include/mav_trajectory_generation/impl/polynomial_optimization_linear_impl.h#L192-L194
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.
(n_vertices - 1) * N
Hi, as explained in the code below, you pre-allocate
n_vertices * N / 2
memories for vectorall_constraints
.https://github.com/ethz-asl/mav_trajectory_generation/blob/7aeebd9f819217502fd1c5489da49efadf90d411/mav_trajectory_generation/include/mav_trajectory_generation/impl/polynomial_optimization_linear_impl.h#L192-L194
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.