首页 > 其他 > 详细

Gazebo-Turorial(Physics Library)

时间:2020-12-21 12:26:03      阅读:34      评论:0      收藏:0      [点我收藏+]

地址:http://gazebosim.org/tutorials?cat=physics

1.Friction

  通常在模型的sdf文件中,通过标签设置摩擦力系数,<ode>表示使用的物理引擎模型,其包括两个参数<mu>,<mu2>表示两个垂直方向上的摩擦系数。设置好之后,ODF会自动解析。

2.Torsional friction(扭转摩擦)

  相对于平移摩擦(translaational friction),默认平移摩擦是启动的,而扭转摩擦是关闭的

  只在ODE物理引擎中工作,可以在GUI和SDF文件中设置,编辑模型,<friction>, <torsional>,参数有:<coefficient>, <surface_radius>, <use_path_radius>

  下面这个例子可以说明,摩擦系数高的物体先停止旋转

gazebo -u worlds/torsional_friction_demo.world

3.Collide bitmask

  用于控制几何体的碰撞,通过给几何体设置bitmask,然后通过bitmask-and(与)操作符输出两个物体碰撞的结果,利用这个结果控制碰撞的效果。

  下面这个例子,a,b不会产生碰撞,c产生碰撞,注意这里是碰撞而不是摩擦。

gazebo -u worlds/shapes_bitmask.world

  可以在sdf中设置,默认0xffff:

<contact>
     <collide_bitmask>0x01</collide_bitmask>
</contact>

4.Fluids

  这里是仿真流体粒子,使用了一个独立的物理引擎与Gazebo中的刚体物理引擎交互,核心是其中的插件

5.Aerodynamic(空气动力学)

  这里是仿真空气的升力和托力,核心是LiftDragPliugin,用于仿真空气动力学的机器人。

  给了一个实例:

gazebo --verbose worlds/cessna_demo.world

6.Hydrodynamics(流体力学)

  这里仿真了水下环境,使用BuoyancyPlugin(浮力)以及LiftDragPlugin,参数设置如下:

<model name="boat">
  <link name="body">
    <!-- ... link info here ... -->
  </link>

  <plugin name="BuoyancyPlugin" filename="libBuoyancyPlugin.so">
    <!-- a viscous liquid -->
    <fluid_density>2000</fluid_density>
    <link name="body">
      <center_of_volume>1 2 3</center_of_volume>
      <volume>50</volume>
    </link>
  </plugin>
</model>

7.clone a simulation

  当我们需要设置仿真中的不同参数进行对比时,克隆仿真是很好的方法。这边提供了两种方式,一种是通过GUI,另一种是通过脚本

8.Manage physics profiles

  这里可以预设一些物理属性,可以通过sdf设置不同的profile,再通过C++API进行profiles之间的切换

9.Parallel physics

  物理引擎的并行,提高性能。

10.Physics Parameters

  选择或者调整物理参数,这里主要关注ODE(open dynamics engine)上的物理参数

  1)Solver parameters: type(world:以精确的求解器,使用Dantzig;quick:迭代近似的求解器,使用PGS),min_step_size,iiters(只对ODE中的quick solver有效),precon_iters(用于quick solver),sor(用于quick solver),use_dynamic_moi_rescaling

  2)Constraints parameters:

    cfm Constraint Force Mixing (CFM) is a square diagonal matrix.

    erp Error Reduction Parameter (ERP) specifies what proportion of the joint error will be fixed during the next simulation step.

    contact_max_correcting_vel

    contact_surface_layer

  3)Friction parameters:略

  4)Contact parameters:

Gazebo-Turorial(Physics Library)

原文:https://www.cnblogs.com/jimlee123/p/14167241.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!