RussTedrake / underactuated

The course text for MIT 6.832 (and 6.832x on edX)
Other
753 stars 215 forks source link

Error Importing MeshcatVisualizerCpp from pydrake #561

Closed ARFANseu2022 closed 5 months ago

ARFANseu2022 commented 5 months ago

Dear ,

I am writing to seek assistance with an error I encountered while attempting to import MeshcatVisualizerCpp from the pydrake library. I am working on Throw and Catch, utilizing Deepnote as my collaborative coding environment and Ubuntu 22.04 as my local development environment.

I am specifically trying to utilize MeshcatVisualizerCpp to visualize my robot simulations. However, when I try to import the library, I receive the following error:

Execution error
ImportError: cannot import name 'MeshcatVisualizerCpp' from 'pydrake' (/opt/drake/lib/python3.10/site-packages/pydrake/__init__.py)

I have tried reinstalling the pydrake library using pip install pydrake but the error persists. I have also searched the pydrake documentation and online forums for a solution but have not found one.

Here's a summary of my setup and the software versions I'm using:

Development Environment: Deepnote

Local Development Environment: Ubuntu 22.04

I have ensured that my local development environment on Ubuntu 22.04 is consistent with the Deepnote environment in Python and Drake versions. Additionally, I have implemented robust exception-handling practices using throw and catch mechanisms to ensure error prevention and program stability.

I would be grateful if you could guide me in resolving this issue. I am eager to continue working on my project and utilize the visualization capabilities of MeshcatVisualizerCpp.

Thank you for your time and consideration.

RussTedrake commented 5 months ago

MeshcatVisualizerCpp was a temporary name, only used over a short period to transition with deprecation to the new c++ version of Meshcat / MeshcatVisualizer. I guess you found an old notebook? Please use MeshcatVisualizer instead.