Synchronizing multiple robots from 1 machine and 1 ros master
Hey,
Are there any tips or common practice how to synchronize 2 or more robots to do the same "move". Example: when all robots are started up and waiting, both go forward for 10 seconds, starting at the same time.
I was thinking with 1 master node and X robot nodes. Robot nodes publish their state to the master node by calling master's node service. Master node waits until all robot nodes are ready. Then when all robots are ready, it publishes a msg on a topic. This topic is constantly checked by the robot nodes and when the msg is published, they start the move. Should this be synchronous enough?
Are there any other possibilities how to synchronize moves, or maybe one more simple than mine described above?
Thanks
How accurate would you like the synchronization to be? And how do you intend to measure?
Accurate as possible :) Synchronization won't be specially measured. It is enough that it looks synchronized with the human eye and that that error does not increase much over time.
This could be done via open-loop approaches (if the total sequence in short), but closed-loop approaches (for the robot nodes) would in general be more robust. So for either of the answers below consider that option.