Skip to content

Negative joint damping causes assertion failure in DART plugin #3266

@XINJIANGMO

Description

@XINJIANGMO

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build?
    Source , gz-sim10
    build options: -DCMAKE_BUILD_TYPE=Coverage

Description

  • Expected behavior: not crash but give users error or warning messages.
  • Actual behavior: gazebo crash

Steps to reproduce

  1. gz sim crash.sdf and then crash
<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="default">
    <plugin
      filename="gz-sim-physics-system"
      name="gz::sim::systems::Physics">
    </plugin>

    <model name="crash_test_model">
      <pose>0 0 1 0 0 0</pose>
      
      <link name="base_link">
        <inertial>
          <mass>1.0</mass>
          <inertia>
            <ixx>1</ixx><iyy>1</iyy><izz>1</izz>
          </inertia>
        </inertial>
      </link>

      <link name="child_link">
        <pose>0 0 0.1 0 0 0</pose>
        <inertial>
          <mass>0.1</mass>
          <inertia>
            <ixx>0.1</ixx><iyy>0.1</iyy><izz>0.1</izz>
          </inertia>
        </inertial>
      </link>

      <joint name="bad_joint" type="revolute">
        <parent>base_link</parent>
        <child>child_link</child>
        <axis>
          <xyz>1 0 0</xyz>
          <dynamics>
            <damping>-5.0</damping>
          </dynamics>
        </axis>
      </joint>
    </model>

  </world>
</sdf>

Output

This is the crash.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions