In a bash environment:
If your program was not found in the process list it will be started again. It tests every 2 minutes in this example and the loop runs forever (press ctrl-c to break).
Good to run at start up for a robot program, just turn on and it goes!, any errors and it still should run again after 2 minutes.
while true; do
ps --no-headers -C sudo python robot.py || sudo python robot.py