Search code examples
drake

pyDrake import Error: cannot import name 'DrakeVisualizer', ClippingRange, DepthRange, et al


I am using the latest pydrake docker image and trying to visualize some of my results. Everything else in pydrake imports and works really well. Specifically packages in the pydrake.geometry cannot be imported correctly for some reason. I need to use a number of methods related to DepthRenderCamera. Another colleague is able to import everything just fine in the same setup. The code is similar to the the pydrake tutorial here. https://notebooks.gesis.org/binder/jupyter/user/robotlocomotion-drake-qtseq8o3/notebooks/tutorials/rendering_multibody_plant.ipynb Any pointers or help is appreciated!

from pydrake.geometry.render import ( ClippingRange, DepthRange, DepthRenderCamera, RenderCameraCore, RenderLabel, MakeRenderEngineVtk, RenderEngineVtkParams, )


Solution

  • The ClippingRange binding wasn't added to pydrake until:

    commit 9b7a97b302214002a320088761b4d76196503618
    Author: Eric Cousineau <eric.cousineau@tri.global>
    Date:   Wed Oct 21 18:24:51 2020 -0400
    

    Your 20201013064707 revision is too old (2020-10-13).