ROS Gazebo 仿真加速設置



Physics Properties

In the World tab, select the physics item. A list of physics properties will be displayed in the list box below.

  • The enable physics check-box can be used to disable physics while allowing plugins and sensors to continue running.
  • The real time update rate parameter specifies in Hz the number of physics updates that will be attempted per second. If this number is set to zero, it will run as fast as it can. Note that the product of real time update rate and max step size represents the target real time factor, or ratio of simulation time to real-time.
  • The max step size specifies the time duration in seconds of each physics update step.

默認.world

    <physics name="default_physics" default="true" type="ode">
      <max_step_size>0.01</max_step_size>
      <real_time_factor>1</real_time_factor>
      <real_time_update_rate>1000</real_time_update_rate>
      <ode>
        <solver>
          <type>quick</type>
          <iters>50</iters>
          <sor>1.2</sor>
        </solver>
      </ode>
    </physics>

<max_step_size>: 這個參數指定了每個物理更新步驟的持續時間(秒)。
<real_time_factor>: 該參數以赫茲為單位指定每秒嘗試的物理更新次數。如果這個數字設為0,它就會盡可能快地運行

注意<real_time_update_rate><max_step_size>的乘積表示 <real_time_factor>,即模擬時間與實時的比率。

加速Gazebo仿真的.world

<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> -->
  <gravity>0 0 -9.8</gravity>
</physics>

<real_time_factor><real_time_update_rate>注釋掉,你會發現gazebo的仿真時間比真實時間快了10倍.

參考

  1. Gazebo仿真加速
  2. 知乎 將Gazebo的仿真速度加快10倍
  3. Gazebo Tutorials


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM