OMPL in ROS, not refreshing properly the path [closed]
I have a question related to OMPL in ROS. I've created a ROS node that finds a global path using OMPL. In each loop of the node the start / goal position is modified. In the first step and some of the subsequent it works, the plan starts from the specified START, but in many other steps, it displays the START properly but the computed path does not start from there but from a state that seems to be old.
It seems that although the start and goal are updated (I print them on screen) and i do "setup->setStartAndGoalStates(*start, *goal);" in each iteration, the returned path (ob::PlannerStatus solved = setup->solve(1e10);) does not seem to update properly ( I visualize it with oc::PathControl &pc = setup->getSolutionPath();). i also do (goal.reset()) in each loop.
Any guess what is going on or what I am missing? Thanks for the help,