在我的模拟中,我不断遇到仅在运行时发生的错误,例如
terminate called after throwing an instance of 'std::logic_error'
what(): Vector appears to be nearly zero.
和
abort: Failure at multibody/plant/implicit_stribeck_solver.cc:216 in SolveQuadraticForTheSmallestPositiveRoot(): condition 'Delta > 0' failed.
我希望能够记录这些问题发生的时间,以追踪导致这些错误的特定状态。我还希望能够记录不同的状态参数,例如我的不同身体的力和位置,我知道该怎么做。
在不同时间检查身体位置和状态的功能已记录在案,例如EvalPoseInWorld()
. 我正在寻找的是用于输出此数据的某种故障触发器。我还希望能够real_time_factor
在德雷克模拟器中记录可见,但不知道如何访问它。
作为参考,我正在运行我在这个 fork 中制作的一个示例:https ://github.com/joaqgira/drake
drake/
您可以在with中运行示例bazel run examples/springboard:shape_collision
。