Unit 3: Doing Motion Planning Programatically Demo 3.1 Error: no module named moveit_commander


I am working through unit 3 of the ROS Manipulation Course. Demo 3.1 provides python code to show how to programmatically plan a trajectory. We are instructed to select the box with the demo python code and then click the run button. However, when I do this, I get the following output below the demo code.

Why is the demo code showing an import error that there is no module named moveit_commander?
Thank you.

Hello! Is this error still happening to you?

Hi @albertoezquerro,

I tried Demo 3.1 again to see if the error is still happening.
I tried it 3 different ways and put the output of each in a picture below.

Option #1: Click on the cell that contains the python code for demo 3.1 and then click on the “Play” button at the top right hand corner of the notebook.

This results in the following message about failure to import pyassimp:

However, when I open the RVIZ view, I do see the robot doing the motion planning as shown in the
picture titled “Expected Result for Demo 3.1”. So…it works.

Option 2: Reset the entire demo by relaunching "roslaunch myfetch_moveit_config myfetch_planning_execution.launch. Click in the cell with the python code and press ctrl-enter. Then open RVIZ display.
This method of starting the code does not work and gives the following error output:

Option 3: Reset the demo and then copy/paste the code provided in the demo to a python file located within a package. This does not work either and gives the following output in the terminal.

Overall, the demo gives the desired results with option 1 (except the message about pyassimp), I am progressing through the ROS manipulation course, and learning alot.
I am just not sure why I see the errors with Option 2 and 3 and wonder if I am doing something wrong.

Thank you for your help.

1 Like

I have the same issue in Option 2 when running from jupyter notebook. Thanks for your help!

Ok I restarted the session, and tried Option 1 and it worked. I suspect it’s because of doing exercise 1 that caused issue with running demo 3.1

I recommend restarting the session to anyone having similar issues