Gazebo的物理引擎(如ODE,Bullet,Simbody,DART)都有不同的摩擦模型,摩擦力参数列表可参见传送门。
假设使用的默认物理引擎ODE
ODE中由两部分组成,mu
和mu2
,ODE将自动计算第一、第二摩擦方向:
mu
是第一摩擦方向的库伦摩擦系数mu2
是垂直于第一摩擦方向的第二摩擦方向摩擦系数两个对象发生碰撞,Gazebo将从两个对象中选择最小的mu
和mu2
。
mu
和mu2
的范围为任何非负数,where,0表示无摩擦接触,较大值表示具有无限摩擦的表面。
各种材料的摩擦特性可从工程工具箱获取
栗子1:
<model name="box">
<pose>0 0 0.5 0 0 0pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>1 1 1size>
box>
geometry>
<surface>
<friction>
<ode>
<mu>0.01mu>
<mu2>0.01mu2>
ode>
friction>
surface>
collision>
<visual name="visual">
<geometry>
<box>
<size>1 1 1size>
box>
geometry>
visual>
link>
model>
栗子2:
<sdf version="1.4">
<world name="default">
<scene>
<ambient>1.000000 1.000000 1.000000 1.000000ambient>
<background>0.700000 0.700000 0.700000 1.000000background>
<shadows>1shadows>
scene>
<physics type="ode">
<gravity>0.000000 -1.000000 -1.000000gravity>
<ode>
<solver>
<type>quicktype>
<iters>50iters>
<precon_iters>0precon_iters>
<sor>1.300000sor>
solver>
<constraints>
<cfm>0.000000cfm>
<erp>0.200000erp>
<contact_max_correcting_vel>100.000000contact_max_correcting_vel>
<contact_surface_layer>0.001000contact_surface_layer>
constraints>
ode>
<real_time_update_rate>0.000000real_time_update_rate>
<max_step_size>0.001000max_step_size>
physics>
<model name="gplane">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<link name="plane">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<collision name="plane">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<plane>
<normal>0.000000 0.000000 1.000000normal>
plane>
geometry>
<surface>
<friction>
<ode>
<mu>50.000000mu>
<mu2>50.000000mu2>
<fdir1>0.000000 0.000000 0.000000fdir1>
<slip1>0.000000slip1>
<slip2>0.000000slip2>
ode>
friction>
<bounce>
<restitution_coefficient>0.000000restitution_coefficient>
<threshold>100000.000000threshold>
bounce>
<contact>
<ode>
<soft_cfm>0.000000soft_cfm>
<soft_erp>0.200000soft_erp>
<kp>1000000000.000000kp>
<kd>1.000000kd>
<max_vel>100.000000max_vel>
<min_depth>0.001000min_depth>
ode>
contact>
surface>
<laser_retro>0.000000laser_retro>
collision>
<gravity>1gravity>
<self_collide>0self_collide>
<kinematic>0kinematic>
link>
<static>1static>
model>
<model name="box_01_model">
<allow_auto_disable>0allow_auto_disable>
<pose>2.000000 8.000000 0.500000 0.000000 -0.000000 0.000000pose>
<link name="box_01_body">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<inertial>
<pose>0.000000 0.000000 -0.500000 0.000000 -0.000000 0.000000pose>
<inertia>
<ixx>10.000000ixx>
<ixy>0.000000ixy>
<ixz>0.000000ixz>
<iyy>10.000000iyy>
<iyz>0.000000iyz>
<izz>10.000000izz>
inertia>
<mass>1.000000mass>
inertial>
<collision name="box_01_geom">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<surface>
<friction>
<ode>
<mu>0.998000mu>
<mu2>0.998000mu2>
<fdir1>0.000000 0.000000 0.000000fdir1>
<slip1>0.000000slip1>
<slip2>0.000000slip2>
ode>
friction>
<bounce>
<restitution_coefficient>0.000000restitution_coefficient>
<threshold>100000.000000threshold>
bounce>
<contact>
<ode>
<soft_cfm>0.000000soft_cfm>
<soft_erp>0.200000soft_erp>
<kp>100000.000000kp>
<kd>1.000000kd>
<max_vel>100.000000max_vel>
<min_depth>0.001000min_depth>
ode>
contact>
surface>
<laser_retro>0.000000laser_retro>
collision>
<visual name="box_01_geom_visual">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<material>
<script>Gazebo/Rockyscript>
material>
<cast_shadows>1cast_shadows>
<laser_retro>0.000000laser_retro>
<transparency>0.000000transparency>
visual>
<gravity>1gravity>
<self_collide>0self_collide>
<kinematic>0kinematic>
link>
<static>0static>
model>
<model name="box_02_model">
<allow_auto_disable>0allow_auto_disable>
<pose>4.000000 8.000000 0.500000 0.000000 -0.000000 0.000000pose>
<link name="box_02_body">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<inertial>
<pose>0.000000 0.000000 -0.500000 0.000000 -0.000000 0.000000pose>
<inertia>
<ixx>10.000000ixx>
<ixy>0.000000ixy>
<ixz>0.000000ixz>
<iyy>10.000000iyy>
<iyz>0.000000iyz>
<izz>10.000000izz>
inertia>
<mass>1.000000mass>
inertial>
<collision name="box_02_geom">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<surface>
<friction>
<ode>
<mu>0.998500mu>
<mu2>0.998500mu2>
<fdir1>0.000000 0.000000 0.000000fdir1>
<slip1>0.000000slip1>
<slip2>0.000000slip2>
ode>
friction>
<bounce>
<restitution_coefficient>0.000000restitution_coefficient>
<threshold>100000.000000threshold>
bounce>
<contact>
<ode>
<soft_cfm>0.000000soft_cfm>
<soft_erp>0.200000soft_erp>
<kp>100000.000000kp>
<kd>1.000000kd>
<max_vel>100.000000max_vel>
<min_depth>0.001000min_depth>
ode>
contact>
surface>
<laser_retro>0.000000laser_retro>
collision>
<visual name="box_02_geom_visual">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<material>
<script>Gazebo/Rockyscript>
material>
<cast_shadows>1cast_shadows>
<laser_retro>0.000000laser_retro>
<transparency>0.000000transparency>
visual>
<gravity>1gravity>
<self_collide>0self_collide>
<kinematic>0kinematic>
link>
<static>0static>
model>
<model name="box_03_model">
<allow_auto_disable>0allow_auto_disable>
<pose>6.000000 8.000000 0.500000 0.000000 -0.000000 0.000000pose>
<link name="box_03_body">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<inertial>
<pose>0.000000 0.000000 -0.500000 0.000000 -0.000000 0.000000pose>
<inertia>
<ixx>10.000000ixx>
<ixy>0.000000ixy>
<ixz>0.000000ixz>
<iyy>10.000000iyy>
<iyz>0.000000iyz>
<izz>10.000000izz>
inertia>
<mass>1.000000mass>
inertial>
<collision name="box_03_geom">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<surface>
<friction>
<ode>
<mu>0.999000mu>
<mu2>0.999000mu2>
<fdir1>0.000000 0.000000 0.000000fdir1>
<slip1>0.000000slip1>
<slip2>0.000000slip2>
ode>
friction>
<bounce>
<restitution_coefficient>0.000000restitution_coefficient>
<threshold>100000.000000threshold>
bounce>
<contact>
<ode>
<soft_cfm>0.000000soft_cfm>
<soft_erp>0.200000soft_erp>
<kp>100000.000000kp>
<kd>1.000000kd>
<max_vel>100.000000max_vel>
<min_depth>0.001000min_depth>
ode>
contact>
surface>
<laser_retro>0.000000laser_retro>
collision>
<visual name="box_03_geom_visual">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<material>
<script>Gazebo/Rockyscript>
material>
<cast_shadows>1cast_shadows>
<laser_retro>0.000000laser_retro>
<transparency>0.000000transparency>
visual>
<gravity>1gravity>
<self_collide>0self_collide>
<kinematic>0kinematic>
link>
<static>0static>
model>
<model name="box_04_model">
<allow_auto_disable>0allow_auto_disable>
<pose>8.000000 8.000000 0.500000 0.000000 -0.000000 0.000000pose>
<link name="box_04_body">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<inertial>
<pose>0.000000 0.000000 -0.500000 0.000000 -0.000000 0.000000pose>
<inertia>
<ixx>10.000000ixx>
<ixy>0.000000ixy>
<ixz>0.000000ixz>
<iyy>10.000000iyy>
<iyz>0.000000iyz>
<izz>10.000000izz>
inertia>
<mass>1.000000mass>
inertial>
<collision name="box_04_geom">
<pose>0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000pose>
<geometry>
<box>
<size>1.000000 1.000000 1.000000size>
box>
geometry>
<surface>
<friction>
<ode>
<mu>0.999500mu>
<mu2>0.999500mu2>
<fdir1>0.000000 0.000000 0.000000fdir1>
<slip1>0.000000slip1>
<slip2>0.000000slip2>
ode>
friction>
<bounce>
<restitution_coefficient>0.000000restitution_coefficient>
<threshold>100000.000000threshold>
bounce>
<contact>
<ode>
<soft_cfm>0.000000soft_cfm>