The modle can't show in gazebo

asked 2019-06-10 08:42:05 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

*1. This is from the tutorial *http://gazebosim.org/tutorials?cat=gu...

*2. This is the SDF file *

<sdf version='1.6'>


<model name="velodyne_hdl-32">
  <!-- Give the base link a unique name -->
  <link name="base">

    <!-- Offset the base by half the lenght of the cylinder -->
    <inertial>
      <mass>1.2</mass>
      <inertia>
        <ixx>0.001087473</ixx>
        <iyy>0.001087473</iyy>
        <izz>0.001092437</izz>
        <ixy>0</ixy>
        <ixz>0</ixz>
        <iyz>0</iyz>
      </inertia>
    </inertial>
    <pose>0 0 0.029335 0 0 0</pose>
    <collision name="base_collision">
      <geometry>
        <cylinder>
          <!-- Radius and length provided by Velodyne -->
          <radius>.04267</radius>
          <length>.05867</length>
        </cylinder>
      </geometry>
    </collision>

    <!-- The visual is mostly a copy of the collision -->
    <visual name="base_visual">


  <pose>0 0 -0.029335 0 0 0</pose>
  <geometry>
    <mesh>
      <uri>model://velodyne_hdl32/meshes/velodyne_base.dae</uri>
    </mesh>
  </geometry>


    </visual>
  </link>

  <!-- Give the base link a unique name -->
  <link name="top">

<!-- Add a ray sensor, and give it a name -->
<sensor type="ray" name="sensor">

  <!-- Position the ray sensor based on the specification. Also rotate
       it by 90 degrees around the X-axis so that the <horizontal> rays
       become vertical -->
  <pose>0 0 -0.004645 1.5707 0 0</pose>

  <!-- Enable visualization to see the rays in the GUI -->
  <visualize>true</visualize>

  <!-- Set the update rate of the sensor -->
  <update_rate>30</update_rate>

<ray>

  <!-- The scan element contains the horizontal and vertical beams.
       We are leaving out the vertical beams for this tutorial. -->
  <scan>

    <!-- The horizontal beams -->
    <horizontal>
      <!-- The velodyne has 32 beams(samples) -->
      <samples>32</samples>

      <!-- Resolution is multiplied by samples to determine number of
           simulated beams vs interpolated beams. See:
           http://sdformat.org/spec?ver=1.6&elem=sensor#horizontal_resolution
           -->
      <resolution>1</resolution>

      <!-- Minimum angle in radians -->
      <min_angle>-0.53529248</min_angle>

      <!-- Maximum angle in radians -->
      <max_angle>0.18622663</max_angle>
    </horizontal>
  </scan>

  <!-- Range defines characteristics of an individual beam -->
  <range>

    <!-- Minimum distance of the beam -->
    <min>0.05</min>

    <!-- Maximum distance of the beam -->
    <max>70</max>

    <!-- Linear resolution of the beam -->
    <resolution>0.02</resolution>
  </range>
</ray>


</sensor>

    <!-- Vertically offset the top cylinder by the length of the bottom
        cylinder and half the length of this cylinder. -->
   <inertial>
     <mass>0.1</mass>
     <inertia>
       <ixx>0.000090623</ixx>
       <iyy>0.000090623</iyy>
       <izz>0.000091036</izz>
       <ixy>0</ixy>
       <ixz>0</ixz>
       <iyz>0</iyz>
     </inertia>
   </inertial>
    <pose>0 0 0.095455 0 0 0</pose>
    <collision name="top_collision">
      <geometry>
        <cylinder>
          <!-- Radius and length provided by Velodyne -->
          <radius>0.04267</radius>
          <length>0.07357</length>
        </cylinder>
      </geometry>
    </collision>

    <!-- The visual is mostly a copy of the collision -->
    <visual name="top_visual">
     <pose>0 0 -0.0376785 0 0 1.5707</pose>
      <geometry>

     <mesh>
       <!-- The URI should refer to the 3D mesh. The "model:"
           URI scheme indicates that the we are referencing a Gazebo
           model. -->
       <uri>model://velodyne_hdl32/meshes/velodyne_top.dae</uri>
     </mesh>

    </geometry>
    </visual>
  </link>

<joint type="revolute" name="joint1">

  <!-- Position the joint at the bottom of the top link -->
  <pose>0 0 -0.036785 0 0 0</pose>

  <!-- Use the base link as the parent ...
(more)
edit retag flag offensive close merge delete

Comments

What is your problem again?

kumpakri gravatar imagekumpakri ( 2019-06-11 04:25:40 -0500 )edit