Skip to content

Instantly share code, notes, and snippets.

Created July 29, 2013 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6104031 to your computer and use it in GitHub Desktop.
Save anonymous/6104031 to your computer and use it in GitHub Desktop.
Gazebo Launch file for multiple robots
<?xml version="1.0"?>
<launch>
<arg name="x" default="0"/>
<arg name="y" default="0"/>
<arg name="z" default="0"/>
<arg name="rx" default="0"/>
<arg name="ry" default="0"/>
<arg name="rz" default="0"/>
<arg name="robot_name" default="MyRobot"/>
<arg name="robot_namespace" default="my_robot_ns"/>
<group ns="$(arg robot_namespace)">
<param name="robot_description" textfile="$(find my_robot_description)/urdf/my_robot.urdf" />
<node name="spawn_$(arg robot_name)" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -x $(arg x) -y $(arg y) -z $(arg z) -model $(arg robot_name) -robot_namespace $(arg robot_namespace)"/>
</group>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment