robot2 code translation