0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by cosmic_cow on Gazebo Answers with karma: 1 on 2012-10-14

Post score: 0


Original comments

Comment by hsu on 2013-01-11:
If you are using ROS Fuerte version, does this work for you?

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

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by nkoenig with karma: 7676 on 2012-10-18

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.