Developing an anticipatory controller to improve performance of a snake-like robot in unstructured terrain