ZJU-FAST-Lab / ego-planner

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

some question about time initialization in function reboundReplan (planner_manager.cpp) #5

Closed tiemuhua closed 3 years ago

tiemuhua commented 3 years ago

image it seems like you treat the motion with start velocity zero and constant acceleration MAX_ACC. i don't know why this estimation of cost time is reasonable, because the start velocity do affect the time needed largely. Moreover, if we do treat the motion as a uniform acceleration motion, perhaps the denominator should be 2MAX_ACC, as X=V^2/(2a) for uniform acceleration motion.

bigsuperZZZX commented 3 years ago

I couldn't find this code in my project, could tell me where it lies in? But I found a similar part in my recent code in _plannermanager.cpp. the '2' at denominator was reduced because we assume the trajectory starts and ends both under zero velocity, and there are two parts of acceleration and deceleration. In fact this naive assumption only slightly enlarges the total time allocation, which will not do significant affect to the final trajectory since the trajectory optimizer will generate a satisfied trajectory later.

tiemuhua commented 3 years ago

I couldn't find this code in my project, could tell me where it lies in? But I found a similar part in my recent code in _plannermanager.cpp. the '2' at denominator was reduced because we assume the trajectory starts and ends both under zero velocity, and there are two parts of acceleration and deceleration. In fact this naive assumption only slightly enlarges the total time allocation, which will not do significant affect to the final trajectory since the trajectory optimizer will generate a satisfied trajectory later.

well, in the original project there is a function called reboundReplan which i think is too too too long, especially the first part (the init part), so i decided the init part into to function: initByPreTraj and initByMinSnap. Thanks for your answer

bigsuperZZZX commented 3 years ago

You are welcome.