ZJU-FAST-Lab / ego-planner

GNU General Public License v3.0
1.31k stars 268 forks source link

Question about minSnapTraj function #21

Closed dssdyx closed 3 years ago

dssdyx commented 3 years ago

In line 78 of polynomial_traj.cpp, the number of fixed derivative is 2*seg_num + 4 explained as 3 +3 +2(seg_num -1 )= 2seg_num +4. But, I think the dF should be p,v,a of head and end , and p of middle points. It's actually 3 + 3 + seg_num -1 = seg_num + 7. I feel confused about this. Could you help me answer my question? Thanks!

bigsuperZZZX commented 3 years ago

The Selection Matrix "C" has to map a middle point to both 2 segments just before and after that middle point, therefore it multiples the number of middle points by 2. For more details, please refer to the paper "Polynomial Trajectory Planning for Aggressive Quadrotor Flight in Dense Indoor Environments" in Section "3 Polynomial Trajectory Optimization".

dssdyx commented 3 years ago

The Selection Matrix "C" has to map a middle point to both 2 segments just before and after that middle point, therefore it multiples the number of middle points by 2. For more details, please refer to the paper "Polynomial Trajectory Planning for Aggressive Quadrotor Flight in Dense Indoor Environments" in Section "3 Polynomial Trajectory Optimization".

I have read that paper and I think maybe it's just the different form of same thing. The 2seg_num+4 dF and seg_num +7 dF are same. They have their own Ct to transform them to d_all which is [p0 v0 a0 p1 v1 a1, p1 v1 a1 p2 v2 a2,...] . Thanks for your answer!