clean trajectoryrobot2d rotation code