3

I'm trying to import SpatialForce for my code but it keeps failing with the error

ImportError: C++ type is not registered in pybind: N5Eigen14AutoDiffScalarINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEEE

Simply running

from pydrake.multibody.math import SpatialForce

or

import pydrake.multibody.math

in a python interpreter causes this error. Any idea what is causing this?

Mark
  • 51
  • 2
  • 1
    If I import `pydrake.math` before running these imports, the problem goes away. – Mark Sep 15 '20 at 15:10
  • Can you describe which version of Drake you're using? https://drake.mit.edu/getting_help.html#helpful-information And can you try ensuring that nothing else is on your path? https://github.com/RobotLocomotion/drake/issues/13187 – Eric Cousineau Sep 15 '20 at 19:17
  • Ah, sorry, I thought this was just isolated to `pydrake.math`, didn't read it carefully enough. Will debug now. – Eric Cousineau Sep 15 '20 at 19:42
  • https://github.com/RobotLocomotion/drake/issues/14071 – Eric Cousineau Sep 15 '20 at 19:45

1 Answers1

1

Fixed it in the following PR:
https://github.com/RobotLocomotion/drake/pull/14072

(Also added in a new test to try and catch things like this in the future!)

Thanks!

Eric Cousineau
  • 1,944
  • 14
  • 23