Flip video file i
Hi,
I am having a hard time making my python code execute with rosrun
. My project structure looks like this:
~/workspace/src/my_package
which contains two subdirectories with my code, lets say a
with contains main.py
and b
with contains b.py
. Each folder contains (my_package
, a
and b
) contains a __init__.py
.
In main.py
, I have from b.b import ClassName
When I try to run my module with rosrun my_package main.py
, I get the following error: "ImportError: No module named b"
I have a setup.py at the root of my_package
:
#!/usr/bin/env python
# ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['my_package'],
package_dir={'': 'src'}
)
setup(**setup_args)
I also added the line in the CMakeLists.txt that execute it.
Any ideas?
Thank you
Asked by gariepya on 2015-02-11 18:06:11 UTC
Comments