Path planning generates a sequence of waypoints for the robot to follow. These waypoints have been selected with the current force in mind (minimize energy use). In simulation, the robot needs to follow these waypoints while under the influence of water currents.
I wanted to use a simple behavior-based waypoint follower. Previously I have used Pure Pursuit for waypoint following. In this algorithm, the robot moves for a short increment and then checks its position relative to the desired trajectory. It issues a new angular velocity command to direct itself on course. In standard Pure Pursuit, the linear velocity is not affected. Currents are dealt with by modifying the linear velocity. The robot expects to travel a certain distance in the next time interval. If the robot exceeds this distance, it should slow down. If the robot does not meet this distance, it speeds up. The magnitude at which the speed is modified is proportional to the difference between expected and observed distance. Thus, the robot should not fluctuate widely since the speed change is very small when it is moving approximately the expected distance. There should also be a maximum speed to keep the robot from speeding unreasonably. With this system, the two independent behaviors of Pure Pursuit for angular velocity and proportional speed control for linear velocity are able to follow waypoints in the presence of water currents. Actually, the robot is not really concerned with water currents. It only checks itself in relation to where it wants to be. So any type of force exerted on the robot, such as winds, would be handled by such a scheme.
For testing, I am trying the simulator parameters just right. In some regions, the currents are too low to have any discernible effect. At others, the robot instantly flies out of the simulator due to the current force. I probably need to normalize the currents and scale them to match the dimensions of the environment. They are currently the raw magnitude values from NECOFS.