Robotic painting of train component