Dynamics of underwater legged locomotion: Modeling and experiments on an octopus-inspired robot