Text this: Development of a novel locomotion algorithm for snake robot