Last active
October 30, 2023 17:03
-
-
Save Mubashir-alam/50bb031fd5e26ee14abb8090328eceec to your computer and use it in GitHub Desktop.
Launching multiple turtlesim ros1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<!-- Start the turtlesim node --> | |
<node name="turtlesim_node" pkg="turtlesim" type="turtlesim_node" output="screen" /> | |
<!-- Spawn the 'hour' turtle using /spawn service with a different name --> | |
<node name="robot_1" pkg="rosservice" type="rosservice" args="call /spawn 2.5 5.5 1.5708 hour" output="screen"/> | |
<!-- Spawn the 'minute_robot' turtle using /spawn service --> | |
<node name="robot_2" pkg="rosservice" type="rosservice" args="call /spawn 5.5 5.5 1.5708 minute" output="screen"/> | |
<!-- Spawn the 'second_robot' turtle using /spawn service --> | |
<node name="robot_3" pkg="rosservice" type="rosservice" args="call /spawn 8.5 5.5 1.5708 second" output="screen"/> | |
<!-- Kill the first turtle1 --> | |
<node name="Kill_turtle1" pkg="rosservice" type="rosservice" args="call /kill turtle1" output="screen"/> | |
</launch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment