Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The issue comes from the server not being initialized/available when sending the request /spawn. In the output of the terminal you can see that the first processes always die and the 2 or 3 turtle spawned are the last ones.

You should (for debugging) add the attribute output = "screen" in each node tag to have more informations, you will see which turtles have been spawned and some erros like this :

rosservice: error: no such option: -1
ERROR: Service [/spawn] is not available.
ERROR: Service [/spawn] is not available.

You can directly understand the issue then. And to solve it, you should wait some time before spawning each turtle or wait for the service to be available before caling it.

The issue comes from the server service not being initialized/available when sending the request /spawn. In the output of the terminal you can see that the first processes always die and the 2 or 3 turtle spawned are the last ones.

You should (for debugging) add the attribute output = "screen" in each node tag to have more informations, you will see which turtles have been spawned and some erros like this :

rosservice: error: no such option: -1
ERROR: Service [/spawn] is not available.
ERROR: Service [/spawn] is not available.

You can directly understand the issue then. And to solve it, you should wait some time before spawning each turtle or wait for the service to be available before caling it.