Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ERROR: Service [/spawn] is not available.

I have the following launch file:

<launch>

<node pkg="turtlesim" name="turtle" type="turtlesim_node"/>
<node pkg="rosservice" type="rosservice" name="spawnturtle1" args="call /spawn 2 2 -1 turtle2"/>   
<node pkg="rosservice" type="rosservice" name="spawnturtle2" args="call /spawn 4 4 0.5 turtle3"/>  
<node pkg="rosservice" type="rosservice" name="spawnturtle3" args="call /spawn 2 5 0.1 turtle4"/>  
<node pkg="rosservice" type="rosservice" name="spawnturtle4" args="call /spawn 5 2 1 turtle5"/> 
<node pkg="rosservice" type="rosservice" name="spawnturtle5" args="call /spawn 3 3 0.5 turtle6"/> 

</launch>

I am getting the error as given in title, sometimes it spawns 2 turtle, sometimes 3 with the error.

Can anyone explain this weired behavior?