Earlier (much earlier) I had sections explaining how to use Path Planners and Path Follower in Nav2 ecosystem. As most of this ecosystem is for 2d world, it will not work in our 2.5d case, so we need to come up with the code of our own. Another reason we want to do it is, Nav2 is relying on 2d lidar way too much: tilt your robot and you are in trouble.
So in this section the custom UKF code and custom path planners/followers are combined, so that robot can figure out its position and plan the path to some goal point - across the rugged terrain with some areas that are good for driving and some that should be avoided.
Also, in this section I will begin altering the code structure, so that resulting app can run on multiple computers. See, some path planners can require resources, and sometimes we do not want to make our robots too smart. By controlling them from a centralized server, we can save money by not installink Intel+video card where a simple Pasp PI or even Arduino will do.
But for that we need to be very careful with what code runs on a robot, which code runs on a server, and what the robot should do if a server is temporary unavailable. So I am going to move the functionality between nodes, in order to make the code more modular.
Note that it is the first publication about "path planners", the following section will finalize both the code and a functionality. It means that, as usual, I am taking the "tutorial" approach, rather than providing a final - and hard to understand - result.
On the following screenshot you can see two robots with two pathes. Note that a path looks like a zigzag, which is understandable: it goes from one cell of a grid to another (A* Grid algorithm). I will address smoothing in later sections.