how to start up gazebo 1.5 (ros groovy) with a sdf-file with the help of roslaunch

asked 2013-10-21 10:43:40 -0600

Marcus gravatar image

updated 2013-10-21 10:50:06 -0600

Hello Gazebo Community,

I have been able to launch the simulator + robot + obstacles so far, but all just with the urdf files. Now I wanted to move the robot and therefor took a look at the tutorials (controlling the base) which rely on the robot being spawned from its sdf file. So instead of:


<!-- Convert xacro and put on parameter server -->
<param name="robot_description" command="$(find xacro)/xacro.py $(find husky_description)/urdf/base.urdf.xacro" />
<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo" type="spawn_model" args="-param robot_description -urdf -model robot" />

I wanted to use the following:


<!-- try a second robot but now with sdf instead urdf -->
<param name="robot2" textfile="/home/username/.gazebo/models/husky/husky.sdf" />
    <node name="spawn_robot2" pkg="gazebo" type="spawn_model" args="-sdf -param robot2  -x 0.0 -y -0.0 -z 0.1 -R 0 -P 0 -Y 0 -model robot2" respawn="false" output="screen" />

The simulator loads up just fine, however, there is no robot. Thanks for any suggestions.

Also, since the person answering this will have a deeper understanding of gazebo than me I have another small question: My goal is to set up the ros-navigation stack on this robot and test everything with gazebo, before I go over to real life experiments. To not waste any time I used the clearpath husky model since its quite similar to what I ll be working with. I already written a simple navigation node which I would like to use for reference. However, this node requires a rostopic which can control the robot base, but I can not seem to find a topic like this (tried most of the gazebo included robots, pr2 etc.). Am I looking in the wrong direction? Is the gazebo plugin the equivalent to the rostopic and hence, I need to set this up first in order to have a topic to subscribe and publish to?

Best regards Marcus

edit retag flag offensive close merge delete