Service Quiz (time.sleep())

I was having a look at solution of the service quiz. I didn’t get one thing, how time.sleep() can be used to give the time for which the robot will move, in fact, time.sleep() function is used to create a pause in the motion.
Can you explain to me this a bit?

Hi @VedantGonnade,

Just by itself, time.sleep() cannot pause the robot’s motion per se. To “pause” the motion, you have to publish a stop message explicitly.

time.sleep() just pause the program’s execution for the given seconds. It can be used to space publications, for example.

1 Like