mkoltisko
mkoltisko

Reputation: 13

PyDrake ImportError: cannot import name 'DiscreteContactSolver' from 'pydrake.all'

Trying to follow the Force Control examples from the Manipulation textbook however I'm running into this issue at the beginning:

ImportError: cannot import name 'DiscreteContactSolver' from 'pydrake.all'

I've checked my installation and I'm at drake 1.9.0. The online pydrake documentation says that the DiscreteContactSolver is under pydrake.multibody.plant but even specifying that path does not help. I've also had this issue with AddWeld() but got around that with plant.WeldFrames(). Is the online documentation out of date?

Upvotes: 1

Views: 162

Answers (1)

jwnimmer-tri
jwnimmer-tri

Reputation: 2449

Drake v1.9.0 does not contain python bindings for DiscreteContactSolver. The website API documentation current reflects the nightly build, not the stable release.

The pydrake bindings for DiscreteContactSolver were added in #18214 on October 30th. The pydrake release 1.9.0 was approximately three weeks prior, on October 10th.

To use DiscreteContactSolver, you'll need to use the nightly release (until v1.10.0 comes out):

Upvotes: 1

Related Questions