ROS rqt plugin: ImportError (unrelated to previous post)
Hello all. I am new to creating Plugins in ROS rqt_gui. I recently had the Plugin user interface working (it would pop up the widgets described in a separate .ui file I created); however, this was only the front end user interface popping up with no functionality. Once I tried adding back end functionality (allowing sliders to actually change data for other nodes through topics) it has stopped working. The user interface no longer comes up at all. This happened immediately after adding back end functionality and running a catkin_make. My current error is:
RosPluginProvider.load(drone_GUI/My Plugin) exception raised in __builtin__.__import__(drone_GUI.my_module, [MyPlugin]):
Traceback (most recent call last):
File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 77, in load
module = __builtin__.__import__(attributes['module_name'], fromlist=[attributes['class_from_class_type']], level=0)
ImportError: No module named my_module
PluginManager._load_plugin() could not load plugin "drone_GUI/My Plugin":
Traceback (most recent call last):
File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 98, in load
self._load()
File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 54, in _load
self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_gui_py/ros_py_plugin_provider.py", line 60, in load
return super(RosPyPluginProvider, self).load(plugin_id, plugin_context)
File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 83, in load
raise e
ImportError: No module named my_module
However, the module name has not changed since the catkin_make and it has been in the same location. The package paths are as follows:
/drone_GUI
/msg
colorRange.msg
/resource
widget.ui
/src
/drone_GUI
__init__.py
__init__.pyc
my_module.py
my_module.pyc
CMakeLists.txt
package.xml
plugin.xml
Thank you in advance for the help. I didn't include any of the files for brevity, but let me know what else you need and I'll post it quickly.
This is the new information that 130s requested:
angel@g6:~/catkin_ws/src/drone_GUI/src/drone_GUI$ export | grep ROS
declare -x ROSLISP_PACKAGE_DIRECTORIES="/home/angel/catkin_ws/devel/share/common-lisp"
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/angel/catkin_ws/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/angel/catkin_ws/build/test_results"
angel@g6:~/catkin_ws/src/drone_GUI/src/drone_GUI$ echo $PYTHONPATH
/home/angel/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/hydro/lib/python2.7/dist-packages
I am not sure if the environment variables are correct, but looking through the other posts, they seem to be?