Updates to robot code for rotation support