uuvsimulator / uuv_simulator

Gazebo/ROS packages for underwater robotics simulation
https://uuvsimulator.github.io/
Other
675 stars 355 forks source link

UUV is frozen at spawn #425

Closed CraigWang1 closed 3 years ago

CraigWang1 commented 3 years ago

Hi,

I have run into this odd issue lately; sometimes, around 50% of the time, my robot will spawn in Gazebo, but it is stuck and unable to move. It also appears that for some reason the thrusters have not spawned in for some reason, and I am very puzzled.

Even when I publish thrust messages to thruster topics such as /uuv/thrusters/0/input it does not move the robot, whereas when it spawns normally, publishing to that topic does move the robot.

uuv_sim1 uuvsim_2

Has anyone experienced any similar issues?

My apologies in advance if this is a simple question, but I have looked through various files and I have yet to find the problem.

Thank you in advance!

MakinoharaShouko commented 3 years ago

Is there some way to reproduce this problem? It is hard to guess why just from the description.

CraigWang1 commented 3 years ago

@MakinoharaShouko Thank you very much for the response. I checked with a fellow team member and he said that it did not crash on his end, which leads me to believe that this occurs because my personal laptop hardware sometimes cannot handle the Gazebo load. For reproducing the problem, I suspect this is the issue, so I think I can close this issue. Though, I'm curious to see if there's anything that I can do about it.

Here is some information:

My .world file physics setup:

    <physics default="true" name="default_physics" type="ode">      
      <max_step_size>0.01</max_step_size>
      <real_time_factor>1</real_time_factor>
      <real_time_update_rate>100</real_time_update_rate>
      <ode>
        <solver>
          <type>quick</type>
          <iters>50</iters>
          <sor>1.2</sor>
        </solver>
      </ode>
    </physics>
    <scene>
      <ambient>0.9 0.9 0.9 1.0</ambient>
      <shadows>0</shadows>
      <sky>
        <clouds>
          <speed>2</speed>
        </clouds>
      </sky>
      <fog>
        <color>0.1 0.5 0.5 1.0</color>
        <type>linear</type>
        <density>1</density>
        <start>0</start>
        <end>8</end>
      </fog>
    </scene>

I'm very sorry, but I cannot share my urdf files and meshes for team security reasons.

CraigWang1 commented 3 years ago

After searching online, it seems that this has fixed my issue:

In snippets.xacro, I changed

      <inertial>
        <mass value="0.001" />
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <inertia ixx="0.000000017" ixy="0.0" ixz="0.0"
               iyy="0.000000017" iyz="0.0"
               izz="0.000000017" />
      </inertial>

to

      <inertial>
        <mass value="0.001" />
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <inertia ixx="0.0001" ixy="0.0001" ixz="0.0001"
               iyy="0.0001" iyz="0.0001"
               izz="0.0001" />
      </inertial>

I also made sure that my inertia values for my robot in base.xacro were also at least 0.001, and for some reason it works! Closing this issue.