Mathematical framework for snake robot motion in a confined space | Synapse