ImportError: No module named my_package.msg
Hi I have created a package, that contains custom messages. They seem to be compiled correctly. Because I can call
rosmsg package my_package
and get
my_package/Collision
which is correct. But when I try to run a python script that depends on this message like:
from my_package.msg import Collision
I get:
ImportError: No module named my_package.msg
Do you have any Ideas what I am doing wrong?
Some additional Info:
export | grep ROS
declare -x ROS
declare -x ROS_DISTRO="hydro"
declare -x ROS_ETC_DIR="/opt/ros/hydro/etc/ros"
declare -x ROS_MASTER_URI="http://localhost:11311"
declare -x ROS_PACKAGE_PATH="/home/aub-ch/ros/hydro_ws/src:/home/aub-ch/ros/hydro_mynavigationtest/src:/opt/ros/hydro/share:/opt/ros/hydro/stacks"
declare -x ROS_ROOT="/opt/ros/hydro/share/ros"
declare -x ROS_TEST_RESULTS_DIR="/home/aub-ch/ros/hydro_mynavigationtest/build/test_results"
and
echo $PYTHONPATH
/home/aub-ch/ros/hydro_mynavigationtest/devel/lib/python2.7/dist-packages:/opt/ros/hydro/lib/python2.7/dist-packages
For clarification: I have set the my_package as dependency in both CMakeLists.txt and package.xml of the package using the message.
Hi al-dev. I added the data. Do I have to add the oder path to the PYTHONPATH as well?