0
$\begingroup$

Rosanswers logo

Hello,

I want to create a rqt plugin for bagfile comparison called rqt_bag_comparison. Therefore I have followed the tutorial "Create your new rqt plugin", step by step.

When trying to start the plugin from the rqt_gui, I get the following error message:

RosPluginProvider.load(rqt_bag_comparison/BagComparisonPlugin) exception raised in __builtin__.__import__(rqt_bag_comparison.bag_comparsion, [BagComparison]):
Traceback (most recent call last):
  File "/opt/ros/groovy/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 bag_comparsion

Apparently, my module is not found. However, in the relative folder to where all my nodes are placed rqt_bag_comparison/src/rqt_bag_comparison/ there is the file bag_comparison.pyas well as __init__.py. Is there anything I might have done wrong in the setup, that explains that the module cannot be found?


Originally posted by Kerstin on ROS Answers with karma: 11 on 2014-08-04

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

From your directory structure containing the init.py file src/rqt_bag_comparison/ your module name would be rqt_bag_comparison, not bag_comparison.

So I would guess your plugin.xml has the wrong setting for type. It should be type="rqt_bag_comparison.bag_comparison.BagComparison", if your plugin's class is named BagComparison inside bag_comparison.py.


Originally posted by Dorian Scholz with karma: 391 on 2014-09-12

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.