0

我想为罗盘步态系统设置轨迹优化(如讲座视频中所暗示的,使用控制权限可以扩大吸引区域以实现稳定行走)。

在尝试DirectTranscription在指南针步态上使用该类时,我遇到了以下问题:

plant = CompassGait()
context = plant.CreateDefaultContext()
DirectTranscription(plant, context, 21, TimeStep(0.01))

导致以下错误:

An exception has occurred, use %tb to see the full traceback.

SystemExit: Failure at bazel-out/k8-opt/bin/systems/framework/_virtual_includes/context/drake/systems/framework/context.h:111 in num_total_states(): condition 'num_abstract_states() == 0' failed.

这个问题有快速的解决方法吗?在查看指南针步态实现时,抽象状态仅用于可视化。原则上,我可以复制指南针步态实现并注释掉抽象状态。但我正在使用 colab notebook 环境,所以我不确定如何轻松做到这一点。

谢谢!

4

1 回答 1

0

The DirectCollocation implementation has an option, assume_non_continuous_states_are_fixed which gets around this issue for the rimless wheel example I have here: http://underactuated.mit.edu/contact.html

I'll try to push this feature into DirectTranscription shortly. But you should be able to use DirectCollocation immediately. Does that work?

于 2020-04-15T09:57:13.417 回答