0.0 mass causes exception

Create issue
Issue #307 new
Brian Gerkey created an issue

Putting the following inertial block in a link causes an exception on insertion into the world:


Comments (8)

  1. Brian Gerkey reporter

    Here's the entire model, in case it's relevant:

    <?xml version="1.0"?>
    <sdf version="1.3">
      <model name="Polaris Ranger EV">
        <link name="chassis">
          <pose>0 0 0 0 0 0</pose>
          <visual name="visual">
          <!-- collision name="chassis_bottom">
          </collision -->
        <link name="rear_right_wheel">
          <pose>-1.0 -1.0 0.25 0 1.5707 1.5707</pose>
          <collision name="collision">
        <joint type="revolute" name="rear_right_wheel_joint">
          <pose>0 0 -0.03 0 0 0</pose>
            <xyz>0 1 0</xyz>
  2. Jackie K

    Resurrecting the discussion old issue here: how should Gazebo treat a link of mass 0? Crashing on exception is suboptimal.

    We could allow for links with zero or negative mass and simply warn the user that this will result in very unrealistic physics behavior. I've made a branch test_zero_mass that gets rid of this exception and sets the "invalid" mass with a warning. If we decide we want to allow nonpositive mass-links, this branch could become a pull request.

    However, if we want to restrict the user to only positive mass objects, we need to prevent the model from being spawned.

  3. Log in to comment