%This function call the paln function of planner by taking frent states
function trajectory = replan(planner,cartesian_states)
    states = planner.cart2frenet(cartesian_states(1:6));
    trajectory = planner.plan(states);
end