Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

adding multiple sensors to SDF model

Hey, I'm modifying Iris drone from px4 stack and I not sure how to add multiple sensors. Now my SDF file is like this:

<sdf version='1.6'>
  <model name='iris_with_4sensors'>
    <include>
      <uri>model://iris</uri>
    </include>
        <include>
      <uri>model://sonar</uri>
      <pose>0.08 0 -0.03 0 0 3.141592</pose>
    </include>
        <include>
      <uri>model://sonar</uri>
      <pose>0 0.08 -0.03 0 0 -1.570796</pose>
    </include>
        <include>
      <uri>model://sonar</uri>
      <pose>0 -0.08 -0.03 0 0 1.570796</pose>
    </include>
        <include>
      <uri>model://sonar</uri>
      <pose>-0.08 0 -0.03 0 0 0</pose>
    </include>
        <include>
      <uri>model://sonar</uri>
      <pose>0 0 -0.03 0 1.570796 3.141592</pose>
    </include>
        <include>
      <uri>model://sonar</uri>
      <pose>0 0 0.03 0 -1.570796 3.141592</pose>
    </include>
        <joint name="sonar_front_joint" type="fixed">
      <child>sonar::link</child>
      <parent>iris::base_link</parent>
    </joint>
        <joint name="sonar_rear_joint" type="fixed">
      <child>sonar::link</child>
      <parent>iris::base_link</parent>
    </joint>
        <joint name="sonar_left_joint" type="fixed">
      <child>sonar::link</child>
      <parent>iris::base_link</parent>
    </joint>
        <joint name="sonar_right_joint" type="fixed">
      <child>sonar::link</child>
      <parent>iris::base_link</parent>
    </joint>
        <joint name="sonar_up_joint" type="fixed">
      <child>sonar::link</child>
      <parent>iris::base_link</parent>
    </joint>
        <joint name="sonar_down_joint" type="fixed">
      <child>sonar::link</child>
      <parent>iris::base_link</parent>
    </joint>
  </model>
</sdf>

and I'm not sure if overriding sonars names would broke things up...