• 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
  • 相关阅读:
    工厂方法模式
    策略模式
    MySQL
    装饰模式
    里式代换原则
    依赖倒转原则
    Java 7 for Absolute Beginners/Java 7基础教程--读后感
    Java 7 for Absolute Beginners/Java 7基础教程--代码纠错
    Eclipse JVM terminated.exit code=13
    Java程序设计教程(第2版)阅读总结
  • 原文地址:https://www.cnblogs.com/flyinggod/p/14280527.html
Copyright © 2020-2023  润新知