call update() before validating the state
Added new function to get a robot model by its index