Drake 工具包中的 Atlas 示例警告

Atlas example warning in Drake toolkit

我有 ubuntu 20.04。我在 drake 工具包中构建了 atlas 示例。当我 运行 这个文件时,我收到了这个警告。我该如何解决?

[2021-09-15 23:59:06.432] [console] [warning] Ignoring collision group heel on link l_foot
[2021-09-15 23:59:06.433] [console] [warning] Ignoring collision group heel on link l_foot
[2021-09-15 23:59:06.433] [console] [warning] Ignoring collision group heel on link l_foot
[2021-09-15 23:59:06.433] [console] [warning] Ignoring collision group toe on link l_foot
[2021-09-15 23:59:06.434] [console] [warning] Ignoring collision group toe on link l_foot
[2021-09-15 23:59:06.434] [console] [warning] Ignoring collision group midfoot on link l_foot
[2021-09-15 23:59:06.434] [console] [warning] Ignoring collision group midfoot on link l_foot
[2021-09-15 23:59:06.450] [console] [warning] Ignoring collision group heel on link r_foot
[2021-09-15 23:59:06.450] [console] [warning] Ignoring collision group heel on link r_foot
[2021-09-15 23:59:06.450] [console] [warning] Ignoring collision group heel on link r_foot
[2021-09-15 23:59:06.451] [console] [warning] Ignoring collision group toe on link r_foot
[2021-09-15 23:59:06.451] [console] [warning] Ignoring collision group toe on link r_foot
[2021-09-15 23:59:06.451] [console] [warning] Ignoring collision group midfoot on link r_foot
[2021-09-15 23:59:06.452] [console] [warning] Ignoring collision group midfoot on link r_foot
[2021-09-15 23:59:06.466] [console] [warning] Ignoring collision group left_hand_robotiq on link left_palm
[2021-09-15 23:59:06.467] [console] [warning] Ignoring collision group right_hand_robotiq on link right_palm
[2021-09-15 23:59:06.468] [console] [warning] WARNING: Skipping transmission since it's attached to a fixed joint "hokuyo_joint".
[2021-09-15 23:59:06.469] [console] [warning] MultibodyPlant has at least one body 'atlas/l_foot' with multiple contact geometries. Contacts with this body may be unclear in the visualizer if contact is made with multiple geometries simultaneously. To clarify the visualization, pass in a geometry naming functor to the constructor. See the documentation for ContactResultsToLcmSystem for details.
terminate called after throwing an instance of 'std::runtime_error'
  what():  MultibodyPlant's discrete update solver failed to converge at simulation time =   0.498 with discrete update period =   0.001. This usually means that the plant's discrete update period is too large to resolve the system's dynamics for the given simulation conditions. This is often the case during abrupt collisions or during complex and fast changing contact configurations. Another common cause is the use of high gains in the simulation of closed loop systems. These might cause numerical instabilities given our discrete solver uses an explicit treatment of actuation inputs. Possible solutions include:
  1. reduce the discrete update period set at construction,
  2. decrease the high gains in your controller whenever possible,
  3. switch to a continuous model (discrete update period is zero),      though this might affect the simulation run time.
Aborted (core dumped)

你有两个警告(一个有多个实例)和一个错误。

  1. “忽略 link Y 上的碰撞组 X”
    • 在 URDF 中,您可以在 <link> <collision> 标签中指定“组”属性。德雷克没有使用这个属性,而是让你知道它没有被使用。
  2. “MultibodyPlant 至少有一个具有多个接触几何体的物体。”
    • 这是不应再在 master 中给出的警告。它与短暂的可视化事物有关。
  3. 离散求解器收敛失败。
    • 模拟失败,因为接触解算器失败。作为错误消息的一部分给出的说明几乎概述了您 can/should 所做的事情。您对选项 1、2 或 3 有具体问题吗?
    • 选项 1 涉及 MultibodyPlant 的构造函数。您当前正在向它传递一个非零值。传递一个较小的非零值。
    • 选项 2 涉及您的控制器。我不知道你有什么控制器,但调整它的增益将取决于你。
    • 选项 3 同样涉及构造函数 MultibodyPlant,而不是非零值,传递零。

据说MultibodyPlant's discrete update solver failed to converge。以我的理解,MultibodyPlant's discrete update solver就像一个模拟引擎,当它失败时,模拟就不会继续。

原因可能是mbp_discrete_update_period太大了。在我的电脑上,我将它设置为 5.0E-4 而不是 1.0E-3 并且它有效。如果设置为零,那么系统会switch to a continuous model,你可以试试

DEFINE_double(
    mbp_discrete_update_period, 5.0E-4,
    "The fixed-time step period (in seconds) of discrete updates for the "
    "multibody plant modeled as a discrete system. Strictly positive. "
    "Set to zero for a continuous plant model.");

这是代码。以上回答很专业,但我觉得更适合熟悉Drake的人。