ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Launching Objects in Gazebo with ROS Fuerte

asked 2012-09-05 10:35:32 -0500

ncr7 gravatar image

updated 2012-09-05 10:36:12 -0500

So I've been able to load objects in the past by using the following example code,

<!-- Blue Bar Cylinder -->
<model:physical name="cyl_model">
    <xyz>.6 0.4 1</xyz>
    <rpy>0 0 0</rpy>
    <static>true</static> 
    <body:cylinder name="cyl_body">
      <xyz>0 0 0</xyz>
      <rpy>0 90 90</rpy>
      <geom:cylinder name="cyl_geom">
        <xyz>0 0 0</xyz>
        <size>0 0</size>           
        <mass>1</mass>
        <visual>
          <size>0.03 0.03 .2</size>
          <material>Gazebo/Blue</material>
          <mesh>unit_cylinder</mesh>
        </visual>
      </geom:cylinder>
    </body:cylinder>
  </model:physical>

Although now this doesn't work with ROS fuerte... I also tried the example in the Gazebo tutorials http://ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation

What am I missing here? I'm not sure what has changed with loading objects into the gazebo simulator.

edit retag flag offensive close merge delete

Comments

I just updated the gazebo setup instructions to install from released debians (http://ros.org/wiki/simulator_gazebo/Tutorials/StartingGazebo), please give that a try and see if it works.

hsu gravatar image hsu  ( 2012-09-05 12:26:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-09-06 04:22:05 -0500

ncr7 gravatar image

Found a solution to this. I was able to load the object if I spawned it in my world.launch file with the following code,

  <param name="sphere" command="$(find xacro)/xacro.py '/opt/ros/fuerte/stacks/simulator_gazebo/gazebo_worlds/objects/simple_sphere.xacro'" /> 
  <node name="sphere_model" pkg="gazebo" type="spawn_model" args="-urdf -param sphere -model sphere1 -paused=true -x -.5 -y -.5 -z 1 " respawn="false" output="screen" />
edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-05 10:35:32 -0500

Seen: 222 times

Last updated: Sep 06 '12