Ehm, that doesn't sound like a software problem. I don't know your robot, but suddenly no power shouldn't happen (I guess). The only thing I could image if there is a power cycle is that the device switched. Check with dmesg if that happened. There is then usually a /dev/ttyACM1 or similar.