First manually tune PID with replan off dynamically and then do it with paritcle swam optimisation algorithm.