0

我正在尝试为空气曲棍球桌编写一个 SDF 文件,该文件稍后将添加空气曲棍球比赛机器人的模型。我开始的模型有一个大的桌子和侧面的小矩形(目前只有 3 个)。目前,在 Gazebo 中生成时,顶部和右侧会从桌子上掉下来。我不确定为什么。左边不动。我根据铝的密度和每个侧面的体积(一切都以米和千克为单位)来确定侧面的质量。我在 ROS 1.0 附带的 .gazebo 文件夹中有 SDF 文件。任何帮助,将不胜感激!

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="table_sdf">

    <joint name="worldJoint" type="fixed">
            <parent link="world"/>
            <child link="base_link"/>
    </joint>

      <pose>0 0 0 0 0 0</pose>
    <self_collide>true</self_collide>
    <link name="base_link">
      <pose>0 0 0  0 0 0</pose>
      <inertial>
        <mass>1065.54</mass>
        <inertia>
          <ixx>1</ixx>
          <iyy>1</iyy>
          <izz>1</izz>
          <ixy>0.0</ixy>
          <ixz>0.0</ixz>
          <iyz>0.0</iyz>
        </inertia>
      </inertial>
      <collision name="tableCollision">
        <geometry>
          <box>
            <size>1.275 2.27 .869</size>
          </box>
        </geometry>
        <surface>
            <contact>
              <ode>
                <max_vel>0</max_vel>
                <min_depth>0.001</min_depth>
              </ode>
            </contact>
        </surface>
      </collision>
      <visual name="tableVisual">
        <geometry>
          <box>
            <size>1.275 2.27 .869</size>
          </box>
        </geometry>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Wood</name>
          </script>
        </material>
      </visual>
    </link>

    <joint name="LLJ" type="fixed">
            <pose>-.553805 0 .452  0 0 0</pose>
        <parent link="base_link"/>
            <child link="left_side"/>
    </joint>

    <self_collide>true</self_collide>
    <link name="left_side">
      <pose>-.553805 0 .452  0 0 0</pose>
      <inertial>
        <mass>1.287</mass>
        <inertia>
          <ixx>1</ixx>
          <iyy>1</iyy>
          <izz>1</izz>
          <ixy>0.0</ixy>
          <ixz>0.0</ixz>
          <iyz>0.0</iyz>
        </inertia>
      </inertial>
      <collision name="leftSideCollision">
        <geometry>
          <box>
            <size>.00649 2.0978 .03501</size>
          </box>
        </geometry>
        <surface>
            <contact>
              <ode>
                <max_vel>0</max_vel>
                <min_depth>0.001</min_depth>
              </ode>
            </contact>
        </surface>
      </collision>
      <visual name="leftSideVisual">
        <geometry>
          <box>
            <size>.00649 2.0978 .03501</size>
          </box>
        </geometry>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Wood</name>
          </script>
        </material>
      </visual>
    </link>

    <joint name="RLJ" type="fixed">
            <pose>.553805 0 .452  0 0 0</pose>
        <parent link="base_link"/>
            <child link="right_side"/>
    </joint>

    <self_collide>true</self_collide>
    <link name="right_side">
      <pose>.553805 0 .452  0 0 0</pose>
      <inertial>
        <mass>1.287</mass>
        <inertia>
          <ixx>1</ixx>
          <iyy>1</iyy>
          <izz>1</izz>
          <ixy>0.0</ixy>
          <ixz>0.0</ixz>
          <iyz>0.0</iyz>
        </inertia>
      </inertial>
      <collision name="rightSideCollision">
        <geometry>
          <box>
            <size>.00649 2.0978 .03501</size>
          </box>
        </geometry>
      </collision>
      <visual name="rightSideVisual">
        <geometry>
          <box>
            <size>.00649 2.0978 .03501</size>
          </box>
        </geometry>
        <surface>
            <contact>
              <ode>
                <max_vel>0</max_vel>
                <min_depth>0.001</min_depth>
              </ode>
            </contact>
        </surface>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Wood</name>
          </script>
        </material>
      </visual>
    </link>

    <joint name="topJ" type="fixed">
            <pose>0 1.05131 .452  0 0 0</pose>
        <parent link="base_link"/>
            <child link="top_side"/>
    </joint>

    <self_collide>true</self_collide>
    <link name="top_side">
      <pose>0 1.05131 .452  0 0 0</pose>
      <inertial>
        <mass>.666145</mass>
        <inertia>
          <ixx>1</ixx>
          <iyy>1</iyy>
          <izz>1</izz>
          <ixy>0.0</ixy>
          <ixz>0.0</ixz>
          <iyz>0.0</iyz>
        </inertia>
      </inertial>
      <collision name="topSideCollision">
        <geometry>
          <box>
            <size>1.085846 .00649 .03501</size>
          </box>
        </geometry>
      </collision>
      <visual name="topSideVisual">
        <geometry>
          <box>
            <size>1.085846 .00649 .03501</size>
          </box>
        </geometry>
        <surface>
            <contact>
              <ode>
                <max_vel>0</max_vel>
                <min_depth>0.001</min_depth>
              </ode>
            </contact>
        </surface>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Wood</name>
          </script>
        </material>
      </visual>
    </link>

  </model>
</sdf>
4

0 回答 0