Hello!
I'am trying to build a ros node which use a custom message. I have installed ROS Indigo on Ubuntu 12.04. The workspace I use is **rosbuild** and the code is in **Python**.
The problem I am facing with is that I'm unable to import the custom message I just created.
The import statement for my message is the following:
from roi_py.msg import *
or
from roi_py.msg import sendMsg
Where "sendMsg" is the name of my message located in **msg/sendMsg.msg**
But the result is the following:
user@system:~/ROS_Workspace/sandbox/roi_py$ rosrun roi_py roi.py
Traceback (most recent call last):
File "/home/user/ROS_Workspace/sandbox/roi_py/scripts/roi.py", line 10, in
from roi_py.msg import *
ImportError: No module named roi_py.msg
In the same project I also have some CPP files. In those file I can use my messages and works. It looks like only Python is not recognizing my custom messages.
Also the package path seems to be good:
user@system:~/ROS_Workspace/sandbox/roi_py$ echo $ROS_PACKAGE_PATH
/home/user/ROS_Workspace/sandbox:/opt/ros/indigo/share:/opt/ros/indigo/stacks
PS: However, the statement to include standard messages is working:
from std_msgs.msg import String
Do you guys have any idea?
PS: rosbuild_genmsg() is also uncommented on CMakeLists.txt
And the tree of **roi_py** looks like:
├── bin
├── CMakeLists.txt
├── lib
├── mainpage.dox
├── Makefile
├── manifest.xml
├── msg
│ ├── recvMsg.msg
│ └── sendMsg.msg
├── README.md
├── scripts
│ └── roi.py
└── src
└── roi_py
└── __init__.py
↧