MotionPlanner: optimize memory usage. We only need some variables for
the first segment in the segment buffer, not all of them.