applying force on joints make the simulation halt.

asked 2023-06-25 07:09:42 -0500

Asif Khan gravatar image

updated 2023-06-26 20:23:39 -0500

azeey gravatar image

I am applying very small forces on the joints on my robot in gazebo. And they are working weirdly when i apply a very small force on it works normal. but as the force increase becomes very unstable and halts the simulation. This happens for every joint.

<joint name='Joint_4' type='revolute'>
 <pose relative_to='Link_3'>0 -0.3258 0.05 0 -0 0</pose>
      <parent>Link_3</parent>
      <child>Link_4</child>
      <axis>
        <xyz>0 0 -1</xyz>
        <limit>
          <lower>-2.62</lower>
          <upper>2.62</upper>
          <effort>50</effort> 
          <velocity>7.12</velocity>
        </limit>
        <dynamics>
          <spring_reference>0</spring_reference>
          <damping>10</damping>
          <friction>10</friction>
          <spring_stiffness>0</spring_stiffness>
        </dynamics>
      </axis>
    </joint>
    <link name='Link_4'>
      <pose relative_to='Joint_4'>0 0 -0.05 0 0 0</pose>
      <!-- <gravity>0</gravity> -->
      <inertial>
        <pose>0.002268 -0.081323 0.043708 0 -0 0</pose>
        <mass>0.175</mass> <!-- 0.132175 -->
        <inertia>
          <ixx>6.17127e-05</ixx>
          <ixy>-7.21112e-07</ixy>
          <ixz>1.13386e-10</ixz>
          <iyy>4.02522e-05</iyy>
          <iyz>2.38703e-07</iyz>
          <izz>6.29737e-05</izz>
        </inertia>
      </inertial>
      <collision name='Link_4_collision'>
        <pose>0 0 0 0 0 0</pose>
        <geometry>
          <mesh>
            <scale>1 1 1</scale>
            <uri>model://robot/meshes/Link_4.STL</uri>
          </mesh>
        </geometry>
        <surface>
          <contact>
            <ode>
              <min_depth>0.0001</min_depth>
              <kp>1e+07</kp>
              <kd>1</kd>
            </ode>
          </contact>
          <friction>
            <ode>
              <mu>100</mu>
              <mu2>100</mu2>
              <fdir1>1 0 0</fdir1>
            </ode>
          </friction>
        </surface>
      </collision>
edit retag flag offensive close merge delete

Comments

Do the links in your model have proper inertia values?

azeey gravatar imageazeey ( 2023-06-26 20:25:00 -0500 )edit

Yeah the inertia (purple in gazebo) covers the .stl identically (a box structure). I also tried changing my arm links to simple meshes (boxes without collision) but still didn't help.

Asif Khan gravatar imageAsif Khan ( 2023-07-06 13:00:46 -0500 )edit