Basics: Moving Ignisbot

I’m trying to run
from cv_bridge.boost.cv_bridge_boost import getCvType
from inside python and receive

from cv_bridge.boost.cv_bridge_boost import getCvType
Traceback (most recent call last):
File “”, line 1, in
ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)

The course says there should be no error so I need help in determining what I did wrong.

(py3venv) user:~/catkin_ws/src/my_catkin_ws_python3$ rospack profile

Full tree crawl took 0.081352 seconds.
Directories marked with (*) contain no manifest. You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only

0.063428 /opt/ros/kinetic/share
0.014994 /home/simulations/public_sim_ws/src
0.014820 /home/simulations/public_sim_ws/src/all
0.011224 /home/simulations/public_sim_ws/src/all/orb_slam2_tc
0.011068 /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2
0.005365 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty
0.003495 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/g2o
0.003309 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/build
0.003109 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/build/CMakeFiles
0.001703 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/DBoW2
0.001608 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/g2o/g2o
0.001539 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/g2o/build
0.001404 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/g2o/build/CMakeFiles
0.001316 /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Examples
0.001202 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/DBoW2/build
0.001037 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/DBoW2/build/CMakeFiles
0.000987 /home/simulations/public_sim_ws/src/all/ros_basics_examples
0.000829 * /opt/ros/kinetic/share/doc
0.000780 * /home/simulations/public_sim_ws/src/all/orb_slam2_tc/ORB_SLAM2/Thirdparty/g2o/build/CMakeFiles/g2o.dir
0.000728 * /opt/ros/kinetic/share/doc/eigenpy

Sorry for the stoopid formatting. I don’t know how to format so I guess I accidentally formatted some stuff with spaces. I don’t know markdown.

Hi, you can format by inserting code into two sets of three of these `
For example

your code here

Please specify the Unit number and exercise you are trying to do.

How are you running that file? Does it only have library imports? What is the reason to run rospack profile in the output you pasted?

I am in Unit 1…Basics: Moving Ignisbot. Hence, the reason I gave this post a clue in the title but I guessed wrong.
The very first exercise as documented in the unit is what I am trying to accomplish.
Still don’t understand what formatting is. No matter. I would prefer the exercise to work rather than present in a pretty box.

The first thing I did in Web Shell #1 was to type:
cd ~/catkin_ws/src
mkdir -p my_catkin_ws_python3/src

That seemed to work because it made the directory.

cd ~/catkin_ws/src/my_catkin_ws_python3
source ~/.py3venv/bin/activate
source /home/user/.catkin_ws_python3/devel/setup.bash
catkin_make -DPYTHON_EXECUTABLE:FILEPATH=/home/user/.py3venv/bin/python
source devel/setup.bash
rospack profile

There’s that rospack profile command. I have no reasons…just copying and pasting. The output of this command I tried to paste in my post.

Then I copied and pasted:

( It should appear python 3 prompt)
from cv_bridge.boost.cv_bridge_boost import getCvType
( There shouldnt be any error)

The output I show in my previous post. I’m disabled and find it very difficult typing so I’m doing my best.

Thank you for the extra context

I tried following the instructions and it gave me no error.

Try simply deleting the src, build and devel folders and redo the exercise step by step, carefully.

This is how you can delete those folders:

cd ~/catkin_ws
rm -rf build/ devel/ src/

after that, you can start again with the

cd ~/catkin_ws/src
mkdir -p my_catkin_ws_python3/src