Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to model simple URDF objects?

asked 2012-10-14 16:08:15 -0500

cosmic_cow gravatar image

I'm trying to model a simple hammer for use in Gazebo; I'm using ROS Fuerte in Ubuntu 12.04. It doesn't have to be terribly complicated, it's just to do some grasping stuff with the NASA Robonaut r2 model (which runs just fine). I've tried modeling a simple rectangle with a static joint to a cylinder in URDF, but I can't get anything to spawn. It either says it can't communicate or crashes Gazebo outright. I feel like I'm stumbling in the dark; there's precious little I can find for how to do object modeling for Gazebo, and any help would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

If you are using ROS Fuerte version, does this work for you?

http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation

hsu gravatar imagehsu ( 2013-01-11 18:07:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-10-18 10:59:55 -0500

nkoenig gravatar image

Try grabbing the latest Gazebo (version 1.2). The default install will allow you drag-and-drop a hammer into simulation.

Here is the SDF we use for the hammer:

<?xml version="1.0"?>
<gazebo version="1.2">
  <model name="hammer">
    <static>false</static>
    <link name="link">
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://hammer/meshes/hammer.dae</uri>
          </mesh>
        </geometry>
      </collision>

      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://hammer/meshes/hammer.dae</uri>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</gazebo>

An improvement can be made by using simple shapes for the collision object rather than the mesh itself.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-10-14 16:08:15 -0500

Seen: 992 times

Last updated: Oct 18 '12