I think this could go away if we use the old trajectoryOptimization interface first.