To develop and test the OA algorithm a simulation was developed in Matlab, basically an extension of the simulation that was used to develop the original Kalman Filter and waypoint navigation functions. Based on the success of transferring the original simulation algorithms to the real robot it is expected that the obstacle-avoidance simulation will transfer successfully as well.
The OA simulation allows the user to define the size of the simulation area, draw a route to follow, set the desired vehicle speed, pick the robot’s initial position and orientation, pick locations for obstacles, and set the size of the obstacles. When the simulation is run, the path-following routine “drives” the robot along the route. The arbiter combines the commanded velocity and turn rate output from the path following behavior with the arc votes from the OA behaviors as necessary to avoid the simulated obstacles. An example of a simulated run is shown in Figure 11, showing how the robot successfully avoided the obstacles while following the planned route.
Figure 11. Example of OA simulation run.
The simulation has proven to be invaluable. It has allowed multiple test runs under varying conditions to be conducted with different behaviors over a short period of time. Because there a several degrees of randomness built into the vehicle simulation, the test runs never produce identical results and more closely approximate the real robot. One of the most important results of the simulation is to illustrate how the relatively narrow field-of-view (FOV) of the stereo sensors (~90°) coupled with the relatively slow update rate places significant restrictions on the vehicle dynamics. To compensate for the narrow FOV and slow update rate, the simulation was modified such that the data in the obstacle map is dead reckoned using the state information from the robot. The primary benefit of this is that the obstacles are held in the obstacle map even after they leave the FOV of the cameras. This is essential to prevent the OA algorithm from turning the robot into an obstacle that the robot is passing. This technique has proven useful in simulation but it is not clear yet how well the dead reckoning will work on the actual robot. Additional behaviors have been developed that limit the turn rate to ensure the vehicle does not turn greater than the FOV of the cameras between obstacle map updates, but they have not been tested.