I'd like to set up trajectory optimization for the compass gait system (as hinted in the lecture video, using control authority can expand the region of attraction for stable walking).
In trying to use the DirectTranscription
class on compass gait, I am running into the following issue:
plant = CompassGait()
context = plant.CreateDefaultContext()
DirectTranscription(plant, context, 21, TimeStep(0.01))
results in the following error:
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.
Is there a quick workaround for this issue? In looking at the compass gait implementation, the abstract state is only used for visualization. In principle, I could make a copy of the compass gait implementation and comment out the abstract state. But I'm using the colab notebook environment so I'm not sure how to easily do this.
Thanks!