I would like to know if there is any way that we can create a ros system robot that has a path planning function that execute once and whenever it is block by obstacle it will just stop there instead of repathing to avoid it?
Yes of course this is possible. I’m building such a robot right now with ultrasonic sensors (HC-SR04) that function as range finders for the collision avoidance system. And for the path planning we’ll be using different sensors. But this can also be done differently.
In the future we want to implement path planning around an obstacle but that is quite difficult so we’re not doing that right now.
I agree with @M11, it is possible to configure such planner.
You could try with setting parameters
max_planning_retries, please refer to move_base documentation for more details.