ROS Gazebo 仿真加速设置

  [TOC]

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
posted @ 2021-01-15 09:36  采男孩的小蘑菇  阅读(1804)  评论(0编辑  收藏  举报